瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
2.3 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="详情" />
  4. <view class="swipe">
  5. <uv-swiper :list="item.image &&
  6. item.image.split(',')" indicator height="420rpx"></uv-swiper>
  7. </view>
  8. <view class="box">
  9. <view class="title">
  10. {{ item.title }}
  11. </view>
  12. <view class="createBy">
  13. <view class="">
  14. 发布人{{ item.userName }}
  15. </view>
  16. <view class="">
  17. 发布时间{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
  18. </view>
  19. </view>
  20. <view class="content">
  21. <uv-parse :content="item.content"></uv-parse>
  22. </view>
  23. <!-- <view class="controls">
  24. <contentControls
  25. :type="2"
  26. :up="isThumbs_up"
  27. :down="isThumbs_down"
  28. @loadData="getData"
  29. :detail="item"/>
  30. </view> -->
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. // import contentControls from '@/components/content/contentControls.vue'
  36. export default {
  37. components: {
  38. // contentControls
  39. },
  40. data() {
  41. return {
  42. list: [
  43. ],
  44. item: {},
  45. isThumbs_up: undefined,//是否点赞
  46. isThumbs_down: undefined,//是否踩
  47. id : 0,
  48. }
  49. },
  50. onLoad(options) {
  51. // this.$route.query的参数
  52. console.log(options)
  53. this.id = options.id
  54. },
  55. onPullDownRefresh(){
  56. this.getData()
  57. },
  58. onShow() {
  59. this.getData()
  60. },
  61. onShareAppMessage(res) {
  62. return {
  63. title: this.detail.title,
  64. path: '/pages_order/activity/activityDetail?id=' + this.id
  65. }
  66. },
  67. methods: {
  68. getData() {
  69. this.$api('getActivityDetail', {
  70. id : this.id
  71. }, res => {
  72. uni.stopPullDownRefresh()
  73. if (res.code == 200) {
  74. this.item = res.result
  75. // this.isThumbs_up = res.result.isThumbs_up//是否点赞
  76. // this.isThumbs_down = res.result.isThumbs_down//是否踩
  77. }
  78. })
  79. },
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .postDetail {
  85. .box {
  86. padding: 20rpx;
  87. width: 100vw;
  88. .title {
  89. font-size: 34rpx;
  90. font-weight: 600;
  91. color: #000;
  92. }
  93. .createBy {
  94. display: flex;
  95. margin-top: auto;
  96. margin-bottom: 10rpx;
  97. font-size: 24rpx;
  98. margin-top: 20rpx;
  99. color: #555;
  100. &>view {
  101. display: flex;
  102. align-items: center;
  103. justify-content: center;
  104. padding-right: 20rpx;
  105. }
  106. }
  107. .controls {
  108. margin-top: 30rpx;
  109. }
  110. .content {
  111. margin-top: 30rpx;
  112. font-size: 28rpx;
  113. }
  114. }
  115. }
  116. </style>