fireBashDetail.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view class="padding fireBashDetailWrapper">
  3. <view class="margin-bottom fireD-tit">{{this.getData.title}}</view>
  4. <view class="flex justify-between align-center">
  5. <view>
  6. <view class="cu-avatar round" style="background-image:url(../../static/fireBase.png)"></view>
  7. <text class="margin-left-sm margin-right-sm text-sm">{{this.getData.author}}</text>
  8. <text>{{this.getData.release_time}}</text>
  9. </view>
  10. <view style="color:#999">阅读:{{this.getData.frequency}}</view>
  11. </view>
  12. <view class="fireD-content margin-top padding-top-xs">
  13. <view class="">
  14. <view v-html="this.getData.content"></view>
  15. </view>
  16. </view>
  17. <view class="preAndNext" style="display:none">
  18. <view class="flex align-top">
  19. <view style="width:120rpx">上一篇:</view>
  20. <view style="width:calc(100% - 120rpx)">火灾逃生十大要诀</view>
  21. </view>
  22. <view class="flex align-top">
  23. <view style="width:120rpx">下一篇:</view>
  24. <view style="width:calc(100% - 120rpx)">火灾逃生十大要诀</view>
  25. </view>
  26. </view>
  27. <!-- <view class="share grid col-3">
  28. <view class="share-item align">
  29. <text class="icon iconfont margin-right-xs margin-left-lg">&#xe60c;</text>
  30. 分享
  31. </view>
  32. <view class="share-item" @click="clickPraise()" :class="[praise?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg" >&#xe62a;</text>收藏</view>
  33. <view class="share-item" @click="clickZan()" :class="[zan?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg">&#xe600;</text>点赞</view>
  34. </view> -->
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. praise: false,
  42. zan: false,
  43. getData: {}
  44. }
  45. },
  46. onLoad: function(option) {
  47. this.getFireBaseDetail({
  48. 'company_code': uni.getStorageSync('selectedCode'),
  49. "id": option.id
  50. })
  51. },
  52. methods: {
  53. // 详情页数据请求
  54. async getFireBaseDetail(params = {}) {
  55. const res = await this.$myRequest({
  56. url: 'KnowledgeBase/getKnowledgeBaseDetails',
  57. data: params,
  58. showLoading: true
  59. })
  60. this.getData = res.data.data[0];
  61. console.log(this.getData)
  62. },
  63. clickPraise() {
  64. this.praise = !this.praise;
  65. },
  66. clickZan() {
  67. this.zan = !this.zan;
  68. },
  69. }
  70. }
  71. </script>
  72. <style>
  73. </style>