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

241 lines
4.4 KiB

1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
1 year ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="详情" />
  4. <view class="swipe">
  5. <uv-swiper :list="detail.images" indicator height="540rpx"></uv-swiper>
  6. </view>
  7. <view class="box">
  8. <view class="title">
  9. {{ detail.name }}
  10. <view class="spot">
  11. 3A景区
  12. </view>
  13. </view>
  14. <view class="pig">
  15. 江华同志故居位于永州市江华瑶族自治县大石桥...
  16. </view>
  17. <hr />
  18. <view class="mie">
  19. <view class="dog">
  20. 开园时间 830-17.30
  21. </view>
  22. <view class="look">
  23. 入园须知
  24. </view>
  25. <uv-icon name="arrow-right"></uv-icon>
  26. </view>
  27. <hr />
  28. <!-- <view class="createBy">
  29. <view class="">
  30. // 发布时间:{{ $dayjs(detail.createTime).format('YYYY-MM-DD') }}
  31. </view>
  32. </view> -->
  33. <!-- <view class="createBy">
  34. <view class="">
  35. 地址{{ detail.address }}
  36. </view>
  37. </view> -->
  38. <addressSpot :address="detail.address" :latitude="detail.latitude" :longitude="detail.longitude" />
  39. </view>
  40. <view style="background-color: #fff;margin-top: 20rpx;">
  41. <uv-tabs :list="tags"
  42. :activeStyle="{color : '#000', fontWeight : 900}"
  43. lineColor="#5baaff"
  44. lineHeight="8rpx"
  45. lineWidth="50rpx"
  46. :scrollable="false"
  47. @click="tabsClick"></uv-tabs>
  48. </view>
  49. <view class="content" v-if="tagIndex == 1">
  50. <uv-parse :content="detail.details"></uv-parse>
  51. </view>
  52. <commentList v-if="tagIndex == 0" @getData="getData" :list="list" :params="params" />
  53. </view>
  54. </template>
  55. <script>
  56. import mixinsList from '@/mixins/list.js'
  57. import commentList from '../components/list/comment/commentList.vue'
  58. export default {
  59. mixins: [mixinsList],
  60. components: {
  61. commentList
  62. },
  63. data() {
  64. return {
  65. detail: {},
  66. mixinsListApi: 'getCommentPage',
  67. params: {
  68. type: '3',
  69. orderId: '',
  70. name: '',
  71. },
  72. id: 0,
  73. tags : [
  74. {
  75. name : '景区评论'
  76. },
  77. {
  78. name : '景区详情'
  79. },
  80. ],
  81. tagIndex : 0,
  82. }
  83. },
  84. onLoad(options) {
  85. // this.$route.query的参数
  86. console.log(options)
  87. this.id = options.id
  88. this.queryParams.type = this.params.type
  89. this.queryParams.orderId = options.id
  90. this.params.orderId = options.id
  91. // 设置分享路径
  92. this.share.path = '/pages_order/scenicSpot/scenicSpotDetail?id=' + this.id
  93. },
  94. onPullDownRefresh() {
  95. this.getDetail()
  96. },
  97. onShow() {
  98. this.getDetail()
  99. },
  100. methods: {
  101. tabsClick({index}){
  102. this.tagIndex = index
  103. },
  104. click(item) {
  105. console.log('item', item);
  106. },
  107. getDetail() {
  108. this.$api('getScenicDetail', {
  109. id: this.id
  110. }, res => {
  111. uni.stopPullDownRefresh()
  112. if (res.code == 200) {
  113. this.params.name = res.result.name
  114. this.detail = res.result
  115. this.detail.images = res.result.images && res.result.images.split(',')
  116. // 设置分享信息
  117. this.share.title = res.result.name
  118. this.share.imageUrl = this.$utils.getImageOne(res.result.images)
  119. }
  120. })
  121. },
  122. }
  123. }
  124. </script>
  125. <style lang="scss" scoped>
  126. .postDetail {
  127. .box {
  128. padding: 20rpx;
  129. width: 100vw;
  130. background-color: #fff;
  131. box-sizing: border-box;
  132. .title {
  133. display: flex;
  134. font-size: 34rpx;
  135. font-weight: 600;
  136. color: #000;
  137. .spot {
  138. margin: 0rpx 20rpx;
  139. padding: 5rpx;
  140. background-color: $uni-color;
  141. border-radius: 10rpx;
  142. color: #fff;
  143. font-size: 30rpx;
  144. letter-spacing: 5rpx;
  145. }
  146. }
  147. .pig {
  148. margin: 50rpx 0rpx;
  149. font-size: 25rpx;
  150. color: $uni-color;
  151. }
  152. .mie {
  153. display: flex;
  154. justify-content: space-between;
  155. .dog {
  156. margin: 30rpx 0rpx;
  157. font-size: 25rpx;
  158. color: $uni-color;
  159. }
  160. .look {
  161. margin: 30rpx 0rpx;
  162. margin-left: 320rpx;
  163. font-size: 25rpx;
  164. }
  165. }
  166. hr {
  167. opacity: 0.5;
  168. }
  169. .createBy {
  170. display: flex;
  171. margin-top: auto;
  172. margin-bottom: 10rpx;
  173. font-size: 24rpx;
  174. margin-top: 20rpx;
  175. color: #555;
  176. &>view {
  177. display: flex;
  178. align-items: center;
  179. justify-content: center;
  180. padding-right: 20rpx;
  181. }
  182. }
  183. .ditu {
  184. display: flex;
  185. justify-content: space-between;
  186. .weizhi {
  187. font-size: 25rpx;
  188. margin-top: 25rpx;
  189. opacity: 0.7;
  190. }
  191. }
  192. .controls {
  193. margin-top: 30rpx;
  194. }
  195. }
  196. .content {
  197. padding: 30rpx;
  198. margin-top: 30rpx;
  199. font-size: 28rpx;
  200. background-color: #fff;
  201. padding-bottom: 100rpx;
  202. }
  203. }
  204. </style>