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

146 lines
2.5 KiB

7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="详情" />
  4. <view class="swipe">
  5. <uv-swiper
  6. :list="detail.images"
  7. indicator
  8. height="420rpx"></uv-swiper>
  9. </view>
  10. <view class="box">
  11. <view class="title">
  12. {{ detail.name }}
  13. </view>
  14. <view class="createBy">
  15. <view class="">
  16. 发布时间{{ $dayjs(detail.createTime).format('YYYY-MM-DD') }}
  17. </view>
  18. </view>
  19. <view class="createBy">
  20. <view class="">
  21. 地址{{ detail.address }}
  22. </view>
  23. </view>
  24. <view class="content">
  25. <uv-parse :content="detail.details"></uv-parse>
  26. </view>
  27. </view>
  28. <commentList
  29. @getData="getData"
  30. :list="list"
  31. :params="params"
  32. />
  33. </view>
  34. </template>
  35. <script>
  36. import mixinsList from '@/mixins/list.js'
  37. import commentList from '../components/list/comment/commentList.vue'
  38. export default {
  39. mixins: [mixinsList],
  40. components: {
  41. commentList
  42. },
  43. data() {
  44. return {
  45. detail: {},
  46. mixinsListApi : 'getCommentPage',
  47. params : {
  48. type : '3',
  49. orderId : '',
  50. name : '',
  51. },
  52. id : 0,
  53. }
  54. },
  55. onLoad(options) {
  56. // this.$route.query的参数
  57. console.log(options)
  58. this.id = options.id
  59. this.queryParams.type = this.params.type
  60. this.queryParams.orderId = options.id
  61. this.params.orderId = options.id
  62. },
  63. onPullDownRefresh(){
  64. this.getDetail()
  65. },
  66. onShow() {
  67. this.getDetail()
  68. },
  69. onShareAppMessage(res) {
  70. return {
  71. title: this.detail.name,
  72. path: '/pages_order/scenicSpot/scenicSpotDetail?id=' + this.id
  73. }
  74. },
  75. methods: {
  76. getDetail() {
  77. this.$api('getScenicDetail', {
  78. id : this.id
  79. }, res => {
  80. uni.stopPullDownRefresh()
  81. if (res.code == 200) {
  82. this.params.name = res.result.name
  83. this.detail = res.result
  84. this.detail.images = res.result.images && res.result.images.split(',')
  85. }
  86. })
  87. },
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .postDetail {
  93. .box {
  94. padding: 20rpx;
  95. width: 100vw;
  96. background-color: #fff;
  97. box-sizing: border-box;
  98. .title {
  99. font-size: 34rpx;
  100. font-weight: 600;
  101. color: #000;
  102. }
  103. .createBy {
  104. display: flex;
  105. margin-top: auto;
  106. margin-bottom: 10rpx;
  107. font-size: 24rpx;
  108. margin-top: 20rpx;
  109. color: #555;
  110. &>view {
  111. display: flex;
  112. align-items: center;
  113. justify-content: center;
  114. padding-right: 20rpx;
  115. }
  116. }
  117. .controls {
  118. margin-top: 30rpx;
  119. }
  120. .content {
  121. margin-top: 30rpx;
  122. font-size: 28rpx;
  123. }
  124. }
  125. }
  126. </style>