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

159 lines
2.8 KiB

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