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

191 lines
3.8 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
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
8 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
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="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. console.log(options)
  86. this.id = options.id
  87. this.queryParams.type = this.params.type
  88. this.queryParams.orderId = options.id
  89. this.queryParams.formId = options.id
  90. this.params.orderId = options.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.detail = res.result
  126. }
  127. })
  128. },
  129. }
  130. }
  131. </script>
  132. <style lang="scss" scoped>
  133. .postDetail {
  134. padding-bottom: env(safe-area-inset-bottom);
  135. .works {
  136. background-color: #fff;
  137. padding: 40rpx;
  138. border-radius: 20rpx;
  139. .bottom {
  140. display: flex;
  141. margin-top: 20rpx;
  142. font-size: 24rpx;
  143. .browse {
  144. margin: 0rpx 30rpx;
  145. color: rgb(132, 132, 132);
  146. }
  147. .Leavingamessage {
  148. margin-left: auto;
  149. display: flex;
  150. align-items: center;
  151. }
  152. .phone{
  153. background-color: rgba($uni-color, 0.2);
  154. color: $uni-color;
  155. padding: 8rpx 16rpx;
  156. border-radius: 10rpx;
  157. margin-left: auto;
  158. image{
  159. width: 20rpx;
  160. height: 20rpx;
  161. }
  162. }
  163. }
  164. }
  165. .avatarStack {
  166. }
  167. }
  168. </style>