bank-success.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="flex-direction plr-40-24 box-sizing-border box-b">
  3. <view @click="jumpOut" class="but-box sys-radius-200 text-align-center sys-color-4D72FA sys-size-28 sys-weight-600">
  4. 返回首页
  5. </view>
  6. <view class="align-items-center flex-justify-center cg-box">
  7. <uni-icons v-if="orderInfo.status === 2 || orderInfo.status === 6" class="mr-18" type="checkbox-filled"
  8. size="24" color="#547BFA"></uni-icons>
  9. <uni-icons v-else class="mr-18" type="clear" size="24" color="#FF0000"></uni-icons>
  10. <view class="sys-size-28" v-if="orderInfo.status === 2 || orderInfo.status === 6">
  11. 支付成功
  12. </view>
  13. <view class="sys-size-28" v-else>
  14. 支付失败
  15. </view>
  16. </view>
  17. <view class="align-items-center flex-justify-center pb-32 pay_money-box mb-24">
  18. <view class="sys-color-3 sys-size-60 sys-weight-bold">
  19. ¥
  20. </view>
  21. <view class="sys-color-3 sys-size-60 sys-weight-bold">
  22. {{orderInfo.pay_money || '0.00'}}
  23. </view>
  24. </view>
  25. <view class="align-items-center flex-justify-space mb-24">
  26. <view class="sys-color-9 flex-shrink0 sys-size-28 mr-20">
  27. 商户名称
  28. </view>
  29. <view class="sys-size-28 sys-color-3">
  30. {{orderInfo.shop_name || '无'}}
  31. </view>
  32. </view>
  33. <view class="align-items-center flex-justify-space">
  34. <view class="sys-color-9 flex-shrink0 sys-size-28 mr-20">
  35. 支付订单
  36. </view>
  37. <view class="sys-size-28 sys-color-3">
  38. {{orderInfo.rs_sn || '无'}}
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import { shopOrderInfo, } from '@/http/shop_order';
  45. export default {
  46. components: {},
  47. data() {
  48. return {
  49. orderInfo: {}
  50. }
  51. },
  52. onLoad(data) {
  53. var mchData = {
  54. action: 'onIframeReady',
  55. displayStyle: 'SHOW_CUSTOM_PAGE'
  56. };
  57. var postData = JSON.stringify(mchData);
  58. parent.postMessage(postData, "https://payapp.weixin.qq.com");
  59. if (data.order_sn) {
  60. this.shopOrderInfo(data.order_sn)
  61. }
  62. },
  63. mounted() {},
  64. methods: {
  65. shopOrderInfo(order) {
  66. shopOrderInfo({
  67. order_sn: order
  68. }).then((res) => {
  69. if (res.code === 1) {
  70. this.orderInfo = res.data
  71. }
  72. })
  73. },
  74. jumpOut() {
  75. if (this.orderInfo.status === 2 || this.orderInfo.status === 6) {
  76. var mchData = {
  77. action: 'jumpOut',
  78. jumpOutUrl: "https://wap.jhcs888.com/#/pages/index-my/index"
  79. }
  80. var postData = JSON.stringify(mchData)
  81. parent.postMessage(postData, 'https://payapp.weixin.qq.com')
  82. } else {
  83. window.location.href = "https://wap.jhcs888.com/#/pages/index-my/index"
  84. }
  85. },
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .flex-direction {
  91. display: flex;
  92. flex-direction: column;
  93. }
  94. .box-sizing-border {
  95. box-sizing: border-box;
  96. }
  97. .sys-radius-200 {
  98. border-radius: 200rpx;
  99. }
  100. .text-align-center {
  101. text-align: center;
  102. }
  103. .sys-color-4D72FA {
  104. color: #4D72FA;
  105. }
  106. .sys-size-28 {
  107. font-size: 28rpx;
  108. }
  109. .sys-weight-600 {
  110. font-weight: 600;
  111. }
  112. .align-items-center {
  113. display: flex;
  114. align-items: center;
  115. }
  116. .flex-justify-center {
  117. display: flex;
  118. justify-content: center;
  119. }
  120. .pb-32 {
  121. padding-bottom: 32rpx;
  122. }
  123. .mb-24 {
  124. margin-bottom: 24rpx;
  125. }
  126. .sys-color-3489FF {
  127. color: #3489FF;
  128. }
  129. .sys-size-60 {
  130. font-size: 60rpx;
  131. }
  132. .sys-weight-bold {
  133. font-weight: bold;
  134. }
  135. .flex-justify-space {
  136. display: flex;
  137. justify-content: space-between;
  138. }
  139. .flex-shrink0 {
  140. flex-shrink: 0;
  141. }
  142. .sys-color-9 {
  143. color: #999;
  144. }
  145. .box-b{
  146. position: relative;
  147. }
  148. .plr-40-24 {
  149. padding: 24rpx 40rpx 0;
  150. }
  151. .pt-50 {
  152. padding-top: 50rpx;
  153. }
  154. .cg-box {
  155. padding-bottom: 8rpx;
  156. padding-top: 32rpx;
  157. }
  158. .pay_money-box {
  159. border-bottom: 1rpx solid #F5F5F5;
  160. }
  161. .but-box {
  162. width: 148rpx;
  163. height: 48rpx;
  164. line-height: 48rpx;
  165. border: 1rpx solid #4D72FA;
  166. position: absolute;
  167. right: 40rpx;
  168. top: 40rpx;
  169. }
  170. </style>