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

141 lines
2.8 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 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. <commentList
  13. @getData="getData"
  14. :list="list"
  15. :params="params"
  16. />
  17. </view>
  18. </template>
  19. <script>
  20. import mixinsSex from '@/mixins/sex.js'
  21. import mixinsList from '@/mixins/list.js'
  22. import commentList from '../components/list/comment/commentList.vue'
  23. import userHeadItem from '@/components/list/dynamic/userHeadItem.vue'
  24. import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
  25. import statisticalDataInfo from '@/components/list/statisticalDataInfo.vue'
  26. import dynamicToShop from '@/components/list/dynamic/dynamicToShop.vue'
  27. export default {
  28. mixins: [mixinsSex, mixinsList],
  29. components: {
  30. commentList,
  31. userHeadItem,
  32. daynamicInfo,
  33. statisticalDataInfo,
  34. dynamicToShop,
  35. },
  36. data() {
  37. return {
  38. detail: {},
  39. mixinsListApi : 'getCommentPage',
  40. params : {
  41. type : '0',
  42. orderId : '',
  43. name : '',
  44. },
  45. id : 0,
  46. }
  47. },
  48. onLoad(options) {
  49. // this.$route.query的参数
  50. console.log(options)
  51. this.id = options.id
  52. this.queryParams.type = this.params.type
  53. this.queryParams.orderId = options.id
  54. this.params.orderId = options.id
  55. },
  56. onShareAppMessage(res) {
  57. return {
  58. title: this.detail.title,
  59. path: '/pages_order/post/postDetail?id=' + this.id
  60. }
  61. },
  62. onPullDownRefresh() {
  63. this.getDetail()
  64. },
  65. onShow() {
  66. this.getDetail()
  67. },
  68. onShareAppMessage(res) {
  69. // return {
  70. // title: this.item.title,
  71. // desc: this.item.content && this.item.content.slice(0, 30),
  72. // path: '/pages/publish/postDetail?id=' + this.id
  73. // }
  74. },
  75. methods: {
  76. getDetail() {
  77. this.$api('getPostDetail', {
  78. id: this.id
  79. }, res => {
  80. uni.stopPullDownRefresh()
  81. if (res.code == 200) {
  82. this.params.name = res.result.userName
  83. this.detail = res.result
  84. }
  85. })
  86. },
  87. }
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. .postDetail {
  92. padding-bottom: env(safe-area-inset-bottom);
  93. .works {
  94. background-color: #fff;
  95. padding: 40rpx;
  96. border-radius: 20rpx;
  97. .bottom {
  98. display: flex;
  99. margin-top: 20rpx;
  100. font-size: 24rpx;
  101. .browse {
  102. margin: 0rpx 30rpx;
  103. color: rgb(132, 132, 132);
  104. }
  105. .Leavingamessage {
  106. margin-left: auto;
  107. display: flex;
  108. align-items: center;
  109. }
  110. .phone{
  111. background-color: rgba($uni-color, 0.2);
  112. color: $uni-color;
  113. padding: 8rpx 16rpx;
  114. border-radius: 10rpx;
  115. margin-left: auto;
  116. image{
  117. width: 20rpx;
  118. height: 20rpx;
  119. }
  120. }
  121. }
  122. }
  123. }
  124. </style>