index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="flex-direction plr-100-30 box-sizing-border">
  3. <view class="align-items-center flex-justify-center pt-50 mb-20">
  4. <view class="sys-color-547BFA sys-size-32">
  5. ¥
  6. </view>
  7. <view class="sys-color-547BFA sys-size-64 sys-weight-bold">
  8. {{orderInfo.pay_money}}
  9. </view>
  10. </view>
  11. <view class="align-items-center flex-justify-center cg-box">
  12. <uni-icons class="mr-10" type="checkbox-filled" size="25" color="#547BFA"></uni-icons>
  13. <view class="">
  14. 支付成功
  15. </view>
  16. </view>
  17. <view class="align-items-center flex-justify-space mb-20">
  18. <view class="sys-color-AD flex-shrink0 mr-20">
  19. 商户名称
  20. </view>
  21. <view class="sys-size-28">
  22. {{orderInfo.shop_name}}
  23. </view>
  24. </view>
  25. <view class="align-items-center flex-justify-space mb-20">
  26. <view class="sys-color-AD flex-shrink0 mr-20">
  27. 订单号
  28. </view>
  29. <view class="sys-size-28">
  30. {{orderInfo.rs_sn}}
  31. </view>
  32. </view>
  33. <view class="align-items-center flex-justify-space mb-64">
  34. <view class="sys-color-AD flex-shrink0 mr-20">
  35. 交易流水号
  36. </view>
  37. <view class="sys-size-28">
  38. {{orderInfo.pay_sn}}
  39. </view>
  40. </view>
  41. <view class="flex-justify-center">
  42. <view @click="jumpOut" class="but-box border-449470 sys-radius-200 text-align-center sys-color-195E3F">
  43. 返回首页
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import {
  50. shopOrderInfo
  51. } from '@/api/shop_order';
  52. export default {
  53. components: {},
  54. data() {
  55. return {
  56. orderInfo:{
  57. }
  58. }
  59. },
  60. onLoad(data) {
  61. var mchData = {
  62. action: 'onIframeReady',
  63. displayStyle: 'SHOW_CUSTOM_PAGE'
  64. };
  65. var postData = JSON.stringify(mchData);
  66. parent.postMessage(postData, "https://payapp.weixin.qq.com");
  67. if(data.order_sn) {
  68. this.shopOrderInfo(data.order_sn)
  69. }
  70. },
  71. mounted() {},
  72. methods: {
  73. shopOrderInfo(order) {
  74. shopOrderInfo({
  75. order_sn: order
  76. }).then((res) => {
  77. if (res.code === 1) {
  78. this.orderInfo = res.data
  79. }
  80. })
  81. },
  82. jumpOut() {
  83. var mchData = {
  84. action: 'jumpout',
  85. jumpOutUrl: "https://wap.jhcs888.com/"
  86. }
  87. var postData = JSoN.stringify(mchData)
  88. parent.postMessage(postData, 'https://payapp.weixin.qq.com')
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .plr-100-30 {
  95. padding: 0 8%;
  96. }
  97. .pt-50 {
  98. padding-top: 100rpx;
  99. }
  100. .cg-box {
  101. padding-bottom: 50rpx;
  102. border-bottom: 1rpx solid #F5F5F5;
  103. margin-bottom: 50rpx;
  104. }
  105. .but-box {
  106. width: 40%;
  107. padding: 15rpx 0;
  108. }
  109. </style>