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

211 lines
4.7 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
1 month ago
2 months ago
1 month 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 month 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. <uv-parse :content="configList.recharge_instructions"></uv-parse>
  38. </view>
  39. </view>
  40. <view class="tips" v-if="dataInfo.type == 0">
  41. <view class="title">活动须知</view>
  42. <view class="details">
  43. <uv-parse :content="configList.withdrawal_instructions"></uv-parse>
  44. </view>
  45. </view>
  46. <view class="tips" v-else-if="dataInfo.type == 1">
  47. <view class="title">旅行须知</view>
  48. <view class="details">
  49. <uv-parse :content="configList.withdrawal_instructions"></uv-parse>
  50. </view>
  51. </view>
  52. </view>
  53. <view style="padding: 65rpx 35rpx;" v-if="dataInfo.state == 1 && dataInfo.type == 0">
  54. <uv-button :custom-style="customStyle" type="primary" shape="circle" color="#381615" text="活动签到"></uv-button>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import Navbar from '@/pages/components/Navbar.vue'
  60. import {
  61. globalMixin
  62. } from '../pages/mixins/globalMixin';
  63. export default {
  64. mixins: [globalMixin],
  65. components: {
  66. Navbar
  67. },
  68. data() {
  69. return {
  70. orderId:'',
  71. dataInfo:null,
  72. customStyle:{
  73. color:'#FF5858'
  74. }
  75. }
  76. },
  77. onLoad(e) {
  78. this.orderId = e.id
  79. this.getorderInfo()
  80. },
  81. computed:{
  82. orderStatus() {
  83. let text = ""
  84. let state = this.dataInfo.state
  85. if( state == 0) {
  86. text = '未付款'
  87. }else if(state == 1) {
  88. text = '待参加'
  89. }else if(state == 2) {
  90. text = '已完成'
  91. }else{
  92. text = '已取消'
  93. }
  94. return text
  95. },
  96. showOrderId() {//0活动 1旅行
  97. let id = ""
  98. if(this.dataInfo.type == 0) {
  99. id = this.dataInfo.activityOrderId
  100. }else{
  101. id = this.dataInfo.travelOrderId
  102. }
  103. return id
  104. }
  105. },
  106. methods:{
  107. getorderInfo() {
  108. this.$api('orderInfo',{orderId:this.orderId},res=>{
  109. if(res.code == 200) {
  110. this.dataInfo = res.result
  111. }
  112. })
  113. }
  114. }
  115. }
  116. </script>
  117. <style scoped lang="scss">
  118. .orderDetails {
  119. padding-bottom: 80rpx;
  120. }
  121. .details {
  122. padding: 50rpx 40rpx;
  123. /deep/.uv-cell {
  124. .uv-cell__body {
  125. padding: 0rpx;
  126. padding-bottom: 30rpx;
  127. }
  128. &:last-child {
  129. .uv-cell__body {
  130. padding-bottom: 0rpx;
  131. }
  132. }
  133. .uv-cell__body__content {
  134. .uv-cell__title-text {
  135. color: $uni-text-color-grey !important;
  136. font-size: 28rpx
  137. }
  138. }
  139. .uv-cell__value {
  140. color: #DCDCDC !important;
  141. font-size: 28rpx
  142. }
  143. }
  144. }
  145. .orderDetails {
  146. margin-top: 40rpx;
  147. /deep/.uv-navbar__content__title {
  148. color: #fff;
  149. }
  150. .content {
  151. padding: 0 35rpx;
  152. color: #fff;
  153. padding-top: calc(var(--status-bar-height) + 110rpx);
  154. .baseInfo {
  155. .statusBox {
  156. display: flex;
  157. align-items: center;
  158. padding: 33rpx 47rpx 24rpx;
  159. i {
  160. background: url('@/static/image/cart/U-status.png') no-repeat;
  161. background-size: 100% 100%;
  162. display: block;
  163. width: 39rpx;
  164. height: 34rpx;
  165. margin-right: 15rpx;
  166. }
  167. .status {
  168. font-size: 32rpx;
  169. }
  170. }
  171. }
  172. .orderInfo,
  173. .tips {
  174. .title {
  175. font-size: 29rpx;
  176. padding-bottom: 26rpx;
  177. margin-top: 36rpx;
  178. }
  179. .details {
  180. background-color: $uni-color-card-background;
  181. border-radius: 26rpx;
  182. }
  183. }
  184. .tips {
  185. .details {
  186. p {
  187. color: #CCC;
  188. font-size: 25rpx;
  189. line-height: 50rpx;
  190. }
  191. }
  192. }
  193. }
  194. }
  195. </style>