orderDetail.vue 5.0 KB

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