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

197 lines
4.0 KiB

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