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

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