fireBashDetail.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. console.log('option')
  53. console.log(option)
  54. uni.setNavigationBarTitle({
  55. title:option.title
  56. });
  57. },
  58. methods: {
  59. // 详情页数据请求
  60. async getFireBaseDetail(params = {}) {
  61. const res = await this.$myRequest({
  62. url: 'KnowledgeBase/getKnowledgeBaseDetails',
  63. data: params,
  64. showLoading: true
  65. })
  66. this.getData = res.data.data[0];
  67. console.log(this.getData)
  68. },
  69. clickPraise() {
  70. this.praise = !this.praise;
  71. },
  72. clickZan() {
  73. this.zan = !this.zan;
  74. },
  75. }
  76. }
  77. </script>
  78. <style>
  79. </style>