推广小程序前端代码
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.

199 lines
4.6 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="orderDetails">
  3. <Navbar title="订单详情" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx"
  4. :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
  5. <view class="content">
  6. <view class="baseInfo cardBackground_">
  7. <view class="statusBox">
  8. <i></i>
  9. <view class="status">{{orderStatus}}</view>
  10. </view>
  11. <view class="info grayBg cardStyle_">
  12. <view class="left">
  13. <image :src="dataInfo.image" >
  14. </view>
  15. <view class="right">
  16. <view class="detailed">
  17. <view class="title">{{dataInfo.title}}</view>
  18. <view class="date">{{dataInfo.startTime}}</view>
  19. <view class="address">{{dataInfo.address}}</view>
  20. </view>
  21. <view class="price"><text>总计</text>¥{{dataInfo.payPrice}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="orderInfo">
  26. <view class="title">订单信息</view>
  27. <view class="details">
  28. <uv-cell :border="false" titleStyle="{color: 'red'}" title="订单编号" :value="showOrderId"></uv-cell>
  29. <uv-cell :border="false" titleStyle="{color: 'red'}" title="下单时间" :value="dataInfo.createTime"></uv-cell>
  30. <uv-cell :border="false" titleStyle="{color: 'red'}" title="订单金额" :value="'¥' + dataInfo.payPrice"></uv-cell>
  31. <uv-cell :border="false" titleStyle="{color: 'red'}" title="订单状态" :value="orderStatus"></uv-cell>
  32. </view>
  33. </view>
  34. <view class="tips">
  35. <view class="title">旅行须知</view>
  36. <view class="details">
  37. <p>行程安排请仔细阅读旅行社提供的行程安排了解每天的具体活动和时间表 </p>
  38. <p>退改政策了解清楚旅行社的退改政策以便在必要时进行调整</p>
  39. <p>健康安全携带必要的药品和个人用品确保旅途中的健康和安全</p>
  40. <p>个人需求如果有特殊饮食要求或身体状况请提前告知旅行社以便他们做出相应的安排</p>
  41. </view>
  42. </view>
  43. </view>
  44. <view style="padding: 65rpx 35rpx;" v-if="dataInfo.state == 1 && dataInfo.type == 0">
  45. <uv-button :custom-style="customStyle" type="primary" shape="circle" color="#381615" text="活动签到"></uv-button>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import Navbar from '@/pages/components/Navbar.vue'
  51. import {
  52. globalMixin
  53. } from '../pages/mixins/globalMixin';
  54. export default {
  55. mixins: [globalMixin],
  56. components: {
  57. Navbar
  58. },
  59. data() {
  60. return {
  61. orderId:'',
  62. dataInfo:null,
  63. customStyle:{
  64. color:'#FF5858'
  65. }
  66. }
  67. },
  68. onLoad(e) {
  69. this.orderId = e.id
  70. this.getorderInfo()
  71. },
  72. computed:{
  73. orderStatus() {
  74. let text = ""
  75. let state = this.dataInfo.state
  76. if( state == 0) {
  77. text = '未付款'
  78. }else if(state == 1) {
  79. text = '待参加'
  80. }else if(state == 2) {
  81. text = '已完成'
  82. }else{
  83. text = '已取消'
  84. }
  85. return text
  86. },
  87. showOrderId() {//0活动 1旅行
  88. let id = ""
  89. if(this.dataInfo.type == 0) {
  90. id = this.dataInfo.activityOrderId
  91. }else{
  92. id = this.dataInfo.travelOrderId
  93. }
  94. return id
  95. }
  96. },
  97. methods:{
  98. getorderInfo() {
  99. this.$api('orderInfo',{orderId:this.orderId},res=>{
  100. if(res.code == 200) {
  101. this.dataInfo = res.result
  102. }
  103. })
  104. }
  105. }
  106. }
  107. </script>
  108. <style scoped lang="scss">
  109. .details {
  110. padding: 50rpx 40rpx;
  111. /deep/.uv-cell {
  112. .uv-cell__body {
  113. padding: 0rpx;
  114. padding-bottom: 30rpx;
  115. }
  116. &:last-child {
  117. .uv-cell__body {
  118. padding-bottom: 0rpx;
  119. }
  120. }
  121. .uv-cell__body__content {
  122. .uv-cell__title-text {
  123. color: $uni-text-color-grey !important;
  124. font-size: 28rpx
  125. }
  126. }
  127. .uv-cell__value {
  128. color: #DCDCDC !important;
  129. font-size: 28rpx
  130. }
  131. }
  132. }
  133. .orderDetails {
  134. margin-top: 40rpx;
  135. /deep/.uv-navbar__content__title {
  136. color: #fff;
  137. }
  138. .content {
  139. padding: 0 35rpx;
  140. color: #fff;
  141. padding-top: calc(var(--status-bar-height) + 110rpx);
  142. .baseInfo {
  143. .statusBox {
  144. display: flex;
  145. align-items: center;
  146. padding: 33rpx 47rpx 24rpx;
  147. i {
  148. background: url('@/static/image/cart/U-status.png') no-repeat;
  149. background-size: 100% 100%;
  150. display: block;
  151. width: 39rpx;
  152. height: 34rpx;
  153. margin-right: 15rpx;
  154. }
  155. .status {
  156. font-size: 32rpx;
  157. }
  158. }
  159. }
  160. .orderInfo,
  161. .tips {
  162. .title {
  163. font-size: 29rpx;
  164. padding-bottom: 26rpx;
  165. margin-top: 36rpx;
  166. }
  167. .details {
  168. background-color: $uni-color-card-background;
  169. border-radius: 26rpx;
  170. }
  171. }
  172. .tips {
  173. .details {
  174. p {
  175. color: #CCC;
  176. font-size: 25rpx;
  177. line-height: 50rpx;
  178. }
  179. }
  180. }
  181. }
  182. }
  183. </style>