瑶都万能墙
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.

178 lines
3.4 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
10 months ago
11 months ago
8 months ago
8 months ago
10 months ago
8 months ago
11 months ago
8 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
8 months ago
11 months ago
11 months ago
8 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
8 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="详情" />
  4. <view class="works">
  5. <userHeadItem :item="detail"/>
  6. <daynamicInfo :item="detail"/>
  7. <dynamicToShop
  8. :shop="detail.shop"
  9. />
  10. <statisticalDataInfo :item="detail"/>
  11. </view>
  12. <view style="background-color: #fff;margin-top: 20rpx;">
  13. <uv-tabs :list="tags"
  14. :activeStyle="{color : '#000', fontWeight : 900}"
  15. lineColor="#5baaff"
  16. lineHeight="8rpx"
  17. lineWidth="50rpx"
  18. :scrollable="false"
  19. @click="tabsClick"></uv-tabs>
  20. </view>
  21. <view class="content" v-if="tagIndex == 1">
  22. </view>
  23. <commentList v-if="tagIndex == 0" @getData="getData" :list="list" :params="params" />
  24. <!-- <commentList
  25. @getData="getData"
  26. :list="list"
  27. :params="params"
  28. /> -->
  29. </view>
  30. </template>
  31. <script>
  32. import mixinsSex from '@/mixins/sex.js'
  33. import mixinsList from '@/mixins/list.js'
  34. import commentList from '../components/list/comment/commentList.vue'
  35. import userHeadItem from '@/components/list/dynamic/userHeadItem.vue'
  36. import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
  37. import statisticalDataInfo from '@/components/list/statisticalDataInfo.vue'
  38. import dynamicToShop from '@/components/list/dynamic/dynamicToShop.vue'
  39. export default {
  40. mixins: [mixinsSex, mixinsList],
  41. components: {
  42. commentList,
  43. userHeadItem,
  44. daynamicInfo,
  45. statisticalDataInfo,
  46. dynamicToShop,
  47. },
  48. data() {
  49. return {
  50. detail: {},
  51. mixinsListApi : 'getCommentPage',
  52. params : {
  53. type : '0',
  54. orderId : '',
  55. name : '',
  56. },
  57. tags : [
  58. {
  59. name : '评论'
  60. },
  61. {
  62. name : '浏览'
  63. },
  64. {
  65. name : '点赞'
  66. },
  67. {
  68. name : '分享'
  69. },
  70. ],
  71. tagIndex : 0,
  72. id : 0,
  73. }
  74. },
  75. onLoad(options) {
  76. // this.$route.query的参数
  77. console.log(options)
  78. this.id = options.id
  79. this.queryParams.type = this.params.type
  80. this.queryParams.orderId = options.id
  81. this.params.orderId = options.id
  82. },
  83. onShareAppMessage(res) {
  84. return {
  85. title: this.detail.title,
  86. path: '/pages_order/post/postDetail?id=' + this.id
  87. }
  88. },
  89. onPullDownRefresh() {
  90. this.getDetail()
  91. },
  92. onShow() {
  93. this.getDetail()
  94. },
  95. onShareAppMessage(res) {
  96. // return {
  97. // title: this.item.title,
  98. // desc: this.item.content && this.item.content.slice(0, 30),
  99. // path: '/pages/publish/postDetail?id=' + this.id
  100. // }
  101. },
  102. methods: {
  103. tabsClick({index}){
  104. this.tagIndex = index
  105. },
  106. getDetail() {
  107. this.$api('getPostDetail', {
  108. id: this.id
  109. }, res => {
  110. uni.stopPullDownRefresh()
  111. if (res.code == 200) {
  112. this.params.name = res.result.userName
  113. this.detail = res.result
  114. }
  115. })
  116. },
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .postDetail {
  122. padding-bottom: env(safe-area-inset-bottom);
  123. .works {
  124. background-color: #fff;
  125. padding: 40rpx;
  126. border-radius: 20rpx;
  127. .bottom {
  128. display: flex;
  129. margin-top: 20rpx;
  130. font-size: 24rpx;
  131. .browse {
  132. margin: 0rpx 30rpx;
  133. color: rgb(132, 132, 132);
  134. }
  135. .Leavingamessage {
  136. margin-left: auto;
  137. display: flex;
  138. align-items: center;
  139. }
  140. .phone{
  141. background-color: rgba($uni-color, 0.2);
  142. color: $uni-color;
  143. padding: 8rpx 16rpx;
  144. border-radius: 10rpx;
  145. margin-left: auto;
  146. image{
  147. width: 20rpx;
  148. height: 20rpx;
  149. }
  150. }
  151. }
  152. }
  153. }
  154. </style>