news_view.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <gui-page :customHeader="true" :isLoading="pageLoading" :fullPage="true" :headerSets="{height:44, zIndex:100}" >
  3. <view slot="gHeader">
  4. <view class="gui-flex gui-nowrap gui-rows gui-align-items-center gui-padding">
  5. <!-- 使用组件实现返回按钮及返回首页按钮 -->
  6. <gui-header-leading :onlyBack="true"></gui-header-leading>
  7. <!-- 导航文本此处也可以是其他自定义内容 -->
  8. <text class="gui-h4 gui-ellipsis gui-text-center gui-header-content gui-primary-color">{{fetch.name}}</text>
  9. <!-- 如果右侧有其他内容可以利用条件编译和定位来实现-->
  10. </view>
  11. </view>
  12. <view slot="gBody" class="gui-margin">
  13. <dever-content :item="fetch.content_array" :pics="fetch.content_pic"></dever-content>
  14. </view>
  15. </gui-page>
  16. </template>
  17. <script>
  18. import deverContent from '@/lib/dever/components/content.vue';
  19. export default {
  20. data() {
  21. return {
  22. fetch : {
  23. name : '',
  24. content_array : [],
  25. content_pic : [],
  26. },
  27. id : 0,
  28. }
  29. },
  30. components:{
  31. deverContent
  32. },
  33. onLoad : function(o) {
  34. this.id = o.id;
  35. this.getInfo();
  36. },
  37. methods: {
  38. getInfo : function() {
  39. var data = {};
  40. data.id = this.id;
  41. this.Dever.get(this, 'package/article/?l=api.getInfo', data);
  42. },
  43. }
  44. }
  45. </script>
  46. <style>
  47. </style>