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

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