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

152 lines
2.6 KiB

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