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

202 lines
4.4 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 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" v-if="dataInfo.type == 1">
  35. <view class="title">旅行须知</view>
  36. <view class="details">
  37. <uv-parse :content="content"></uv-parse>
  38. </view>
  39. </view>
  40. </view>
  41. <view style="padding: 65rpx 35rpx;" v-if="dataInfo.state == 1 && dataInfo.type == 0">
  42. <uv-button :custom-style="customStyle" type="primary" shape="circle" color="#381615" text="活动签到"></uv-button>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import Navbar from '@/pages/components/Navbar.vue'
  48. import {
  49. globalMixin
  50. } from '../pages/mixins/globalMixin';
  51. export default {
  52. mixins: [globalMixin],
  53. components: {
  54. Navbar
  55. },
  56. data() {
  57. return {
  58. content:'',
  59. orderId:'',
  60. dataInfo:null,
  61. customStyle:{
  62. color:'#FF5858'
  63. }
  64. }
  65. },
  66. onLoad(e) {
  67. this.orderId = e.id
  68. this.getorderInfo()
  69. console.log(this.$store.state.configList)
  70. this.content = this.$store.state.configList.withdrawal_instructions
  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. .orderDetails {
  110. padding-bottom: 80rpx;
  111. }
  112. .details {
  113. padding: 50rpx 40rpx;
  114. /deep/.uv-cell {
  115. .uv-cell__body {
  116. padding: 0rpx;
  117. padding-bottom: 30rpx;
  118. }
  119. &:last-child {
  120. .uv-cell__body {
  121. padding-bottom: 0rpx;
  122. }
  123. }
  124. .uv-cell__body__content {
  125. .uv-cell__title-text {
  126. color: $uni-text-color-grey !important;
  127. font-size: 28rpx
  128. }
  129. }
  130. .uv-cell__value {
  131. color: #DCDCDC !important;
  132. font-size: 28rpx
  133. }
  134. }
  135. }
  136. .orderDetails {
  137. margin-top: 40rpx;
  138. /deep/.uv-navbar__content__title {
  139. color: #fff;
  140. }
  141. .content {
  142. padding: 0 35rpx;
  143. color: #fff;
  144. padding-top: calc(var(--status-bar-height) + 110rpx);
  145. .baseInfo {
  146. .statusBox {
  147. display: flex;
  148. align-items: center;
  149. padding: 33rpx 47rpx 24rpx;
  150. i {
  151. background: url('@/static/image/cart/U-status.png') no-repeat;
  152. background-size: 100% 100%;
  153. display: block;
  154. width: 39rpx;
  155. height: 34rpx;
  156. margin-right: 15rpx;
  157. }
  158. .status {
  159. font-size: 32rpx;
  160. }
  161. }
  162. }
  163. .orderInfo,
  164. .tips {
  165. .title {
  166. font-size: 29rpx;
  167. padding-bottom: 26rpx;
  168. margin-top: 36rpx;
  169. }
  170. .details {
  171. background-color: $uni-color-card-background;
  172. border-radius: 26rpx;
  173. }
  174. }
  175. .tips {
  176. .details {
  177. p {
  178. color: #CCC;
  179. font-size: 25rpx;
  180. line-height: 50rpx;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. </style>