orderDetail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="default_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='我的订单' bgColor="transparent"></cus-header>
  4. <image class="top_bg" :src="imgBase+'order_detail_bg.png'" mode="widthFix"></image>
  5. <view class="top adf">
  6. <view class="top-left adfac">
  7. <image :src="imgBase+'order_detail_success.png'"></image>
  8. <view class="top-left-texts adffc">
  9. <text>{{statusCfg[orderInfo.status]}}</text>
  10. <text class="tip" v-if="orderInfo.status>0">{{statusTip[orderInfo.status]}}</text>
  11. <text class="tip" v-else>剩余支付时间 {{'00:05:00'}},超时将自动取消</text>
  12. </view>
  13. </view>
  14. <view class="top-right">¥{{orderInfo.price}}</view>
  15. </view>
  16. <view class="form">
  17. <view class="form-item adfacjb">
  18. <view class="form-item-title">订单号</view>
  19. <view class="form-item-value">{{orderInfo.no}}</view>
  20. </view>
  21. <view class="form-item adfacjb">
  22. <view class="form-item-title">订单类型</view>
  23. <view class="form-item-value">{{typeCfg[orderInfo.type]}} {{orderInfo.sum}}次</view>
  24. </view>
  25. <view class="form-item adfacjb">
  26. <view class="form-item-title">订单金额</view>
  27. <view class="form-item-value">¥{{orderInfo.price}}</view>
  28. </view>
  29. <view class="form-item adfacjb">
  30. <view class="form-item-title">下单时间</view>
  31. <view class="form-item-value">{{'2025-10-10 09:10:11'}}</view>
  32. </view>
  33. <view class="form-item adfacjb">
  34. <view class="form-item-title">有效期至</view>
  35. <view class="form-item-value">{{orderInfo.date}}</view>
  36. </view>
  37. </view>
  38. <view class="bottom adfacjb">
  39. <template v-if="orderInfo.status!=0">
  40. <view class="bottom-default" @click="buyAgain">再次购买</view>
  41. </template>
  42. <template v-else>
  43. <view class="bottom-default half qx" @click="orderCancel">取消</view>
  44. <view class="bottom-default half" @click="orderPay">去支付</view>
  45. </template>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. data(){
  52. return {
  53. orderInfo:null,
  54. statusCfg:{
  55. 0:'待支付',
  56. 1:'已完成',
  57. 2:'已取消'
  58. },
  59. typeCfg:{
  60. 1:'基础版',
  61. 2:'专业版'
  62. },
  63. statusTip:{
  64. 1:'您的问卷已激活,开始PREILL评估',
  65. 2:'您的订单已取消,可重新购买'
  66. }
  67. }
  68. },
  69. onLoad(options) {
  70. if(options.item) this.orderInfo = JSON.parse(decodeURIComponent(options.item))
  71. console.log(this.orderInfo);
  72. },
  73. methods:{
  74. buyAgain(){
  75. },
  76. orderCancel(){
  77. },
  78. orderPay(){
  79. },
  80. }
  81. }
  82. </script>
  83. <style scoped lang="scss">
  84. .default_page{
  85. padding: 0 24rpx 192rpx;
  86. box-sizing: border-box;
  87. background: #F7F7F7;
  88. .top_bg{
  89. width: 100%;
  90. position: absolute;
  91. left: 0;
  92. top: 0;
  93. }
  94. .top{
  95. margin-top: 54rpx;
  96. padding: 0 24rpx;
  97. position: relative;
  98. justify-content: space-between;
  99. &-left{
  100. image{
  101. width: 69rpx;
  102. height: 69rpx;
  103. }
  104. &-texts{
  105. margin-left: 20rpx;
  106. text{
  107. font-family: PingFang-SC, PingFang-SC;
  108. font-weight: bold;
  109. font-size: 40rpx;
  110. color: #002846;
  111. line-height: 40rpx;
  112. &.tip{
  113. font-family: PingFangSC, PingFang SC;
  114. font-weight: 400;
  115. font-size: 24rpx;
  116. color: #667E90;
  117. line-height: 26rpx;
  118. margin-top: 24rpx;
  119. }
  120. }
  121. }
  122. }
  123. &-right{
  124. font-family: PingFang-SC, PingFang-SC;
  125. font-weight: bold;
  126. font-size: 36rpx;
  127. color: #002846;
  128. line-height: 30rpx;
  129. text-align: right;
  130. }
  131. }
  132. .form{
  133. background: #FFFFFF;
  134. border-radius: 25rpx;
  135. margin-top: 54rpx;
  136. padding: 0 24rpx;
  137. position: relative;
  138. &-item{
  139. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
  140. padding: 34rpx 0;
  141. &-title{
  142. font-family: PingFangSC, PingFang SC;
  143. font-weight: 400;
  144. font-size: 30rpx;
  145. color: #002846;
  146. line-height: 30rpx;
  147. }
  148. &-value{
  149. font-family: PingFangSC, PingFang SC;
  150. font-weight: 400;
  151. font-size: 30rpx;
  152. color: #667E90;
  153. line-height: 30rpx;
  154. text-align: right;
  155. }
  156. }
  157. }
  158. .bottom{
  159. width: calc(100% - 88rpx);
  160. height: 88rpx;
  161. position: fixed;
  162. left: 44rpx;
  163. bottom: 54rpx;
  164. &-default{
  165. width: 100%;
  166. height: 88rpx;
  167. border: 1rpx solid #904A87;
  168. background: #904A87;
  169. border-radius: 44rpx;
  170. font-family: PingFang-SC, PingFang-SC;
  171. font-weight: bold;
  172. font-size: 32rpx;
  173. color: #FFFFFF;
  174. line-height: 88rpx;
  175. text-align: center;
  176. letter-spacing: 2rpx;
  177. &.half{
  178. width: calc(50% - 19rpx);
  179. }
  180. &.qx{
  181. color: #657588;
  182. background: #FFFFFF;
  183. border: 1rpx solid #CCD4DA;
  184. }
  185. }
  186. }
  187. }
  188. </style>