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

135 lines
2.6 KiB

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