fireBashDetail.vue 2.3 KB

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