cover.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template name="cover">
  2. <view class="gui-padding">
  3. <view class="grace-title grace-margin-top">
  4. <text class="grace-title-icon grace-icons icon-article grace-blue"></text>
  5. <text class="grace-title-text grace-black">{{item.parent_name}}</text>
  6. <text class="grace-gray grace-black">{{item.author_name}}{{item.username}}</text>
  7. </view>
  8. <view class="grace-line-title grace-margin-top">
  9. <view class="grace-line-title-line"></view>
  10. <text class="grace-line-title-text grace-blue">{{item.name}}</text>
  11. <view class="grace-line-title-line"></view>
  12. </view>
  13. <view class="grace-margin-top">
  14. <view class="grace-flex-center grace-flex-vcenter">
  15. <image :src="item.pic" mode="widthFix" style="height: auto;"></image>
  16. </view>
  17. </view>
  18. <view class="grace-margin-top">
  19. <view class="grace-h5 grace-blod grace-text-center" v-if="item.times">
  20. <text class="grace-icons icon-spliter"></text>
  21. <text class="grace-black" style="margin:0 20rpx;">{{item.times_parent}} {{item.times}}</text>
  22. <text class="grace-icons icon-spliter"></text>
  23. </view>
  24. <view class="grace-text grace-text-center">{{item.desc}}</view>
  25. </view>
  26. <view class="grace-margin-top" @click="showModal">
  27. <view class="grace-flex-center grace-flex-vcenter">
  28. <text class="grace-gray grace-text-small grace-text-center">{{item.copyright}}</text>
  29. <text class="grace-icons grace-text-small icon-arrow-right grace-gray"></text>
  30. </view>
  31. </view>
  32. <y-Fab :bottom="20" :right="140" @click="showDrawer" bgColor="#e55d52" text="更多"></y-Fab>
  33. <view v-if="showComment">
  34. <dever-publish :title="title" :is_upload="true" @hideModal="hideModal" @getRefresh="getRefresh" :type="`feedback`" :type_id="item.id" :api="api"></dever-publish>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import deverPublish from '@/lib/dever/components/publish.vue';
  40. export default {
  41. name: "cover",
  42. props: {
  43. item : {
  44. type : Object,
  45. value : null
  46. },
  47. },
  48. data() {
  49. return {
  50. title : '发表反馈',
  51. showComment : false,
  52. api : 'app/user/?l=api.addFeedback',
  53. }
  54. },
  55. methods:{
  56. showDrawer : function() {
  57. var key = 'cate';
  58. if (key) {
  59. this.$emit('showDrawer', key);
  60. } else {
  61. this.Dever.alert('您点错了吧~');
  62. }
  63. },
  64. showModal : function() {
  65. this.showComment = true;
  66. },
  67. hideModal : function() {
  68. this.showComment = false;
  69. },
  70. getRefresh : function() {
  71. this.Dever.alert('感谢您的反馈,我们的客服会尽快联系您~');
  72. this.hideModal();
  73. }
  74. },
  75. components:{deverPublish}
  76. }
  77. </script>
  78. <style>
  79. .grace-h5 {
  80. margin-top: 40rpx;
  81. margin-bottom: 40rpx;
  82. }
  83. </style>