pay-status.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view class="ps">
  3. <view class="ps_status_icon"><image src="../../static/Buy_soap_tape/success.png"></image></view>
  4. <text class="ps_status_text">下单成功</text>
  5. <view class="ps_control">
  6. <text>订单号:{{ order_no }}</text>
  7. <text class="copy_btn" @click="copy(order_no)">复制</text>
  8. </view>
  9. <view class="ps_money">
  10. 已付金额:<text>¥{{ total }}</text>
  11. </view>
  12. <view class="ps_bottom flexB">
  13. <view class="left" @click="again">继续下单</view>
  14. <view class="right" @click="lookOrder">订单详情</view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. // import { handleClipboard } from '../../common/util/index.js';
  20. export default {
  21. data() {
  22. return {
  23. order_no: '',
  24. total: 200,
  25. data: {},
  26. type: ''
  27. };
  28. },
  29. onLoad(ops) {
  30. if (ops.order_no) {
  31. this.order_no = ops.order_no;
  32. this.total = ops.total
  33. }
  34. const form = JSON.parse(decodeURIComponent(ops.data))
  35. this.type = form.goods_type == 1 ? 'soap' : 'tape'
  36. this.data = ops.data
  37. },
  38. methods: {
  39. // 订单详情
  40. lookOrder() {
  41. uni.navigateTo({
  42. url: './orderDetail?data=' + this.data
  43. });
  44. },
  45. // 再次下单
  46. again() {
  47. uni.navigateTo({
  48. url: './goods?type=' + this.type
  49. });
  50. },
  51. /*复制单号*/
  52. copy(order_no) {
  53. try {
  54. uni.setClipboardData({
  55. data: order_no,
  56. success: () => {
  57. uni.showToast({
  58. title: '复制成功'
  59. })
  60. }
  61. })
  62. } catch (e) {
  63. uni.showModal({
  64. content: '您的手机暂不支持复制',
  65. showCancel: false
  66. })
  67. }
  68. },
  69. }
  70. };
  71. </script>
  72. <style>
  73. page {
  74. background-color: #fff;
  75. }
  76. </style>
  77. <style lang="scss" scoped>
  78. .ps {
  79. padding: 62rpx 56rpx 0 56rpx;
  80. @include flex(column)
  81. .ps_status_icon {
  82. width: 100%;
  83. display: flex;
  84. align-items: center;
  85. justify-content: center;
  86. image {
  87. width: 212rpx;
  88. height: 157rpx;
  89. }
  90. }
  91. .ps_status_text {
  92. color: #333333;
  93. font-size: 48rpx;
  94. text-align: center;
  95. margin-top: 50rpx;
  96. }
  97. .ps_control {
  98. margin-top: 64rpx;
  99. text {
  100. font-size: 30rpx;
  101. }
  102. .copy_btn {
  103. padding: 8rpx;
  104. font-size: 28rpx;
  105. height: 44rpx;
  106. background: #FFF4F3;
  107. border-radius: 4rpx 4rpx 4rpx 4rpx;
  108. font-weight: 400;
  109. color: #FB231F;
  110. text-align: center;
  111. margin-left: 20rpx;
  112. }
  113. }
  114. &_money {
  115. font-size: 32rpx;
  116. margin-top: 58rpx;
  117. text {
  118. font-size: 44rpx;
  119. font-weight: bold;
  120. color: #FB231F;
  121. }
  122. }
  123. &_bottom {
  124. width: 100%;
  125. margin-top: 140rpx;
  126. view {
  127. width: 300rpx;
  128. font-size: 32rpx;
  129. line-height: 88rpx;
  130. text-align: center;
  131. border-radius: 44rpx 44rpx 44rpx 44rpx;
  132. }
  133. .left {
  134. color: #FF0000;
  135. border: 2rpx solid #F30100;
  136. background: #FFF4F3;
  137. }
  138. .right {
  139. color: #FFFFFF;
  140. background: linear-gradient(93deg, #F30000 0%, #FE4815 100%);
  141. }
  142. }
  143. }
  144. </style>