payResult.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view class="payResult">
  3. <u-icon name="checkmark-circle-fill" :color="vuex_theme.bgColor" style="margin-top: 50rpx;" size="100"></u-icon>
  4. <view>订单支付成功</view>
  5. <u-button shape="circle" :custom-style="customStyle" style="margin-top: 50rpx;" @click="goback">返回</u-button>
  6. </view>
  7. </template>
  8. <script>
  9. let goldPlan = require('@/utils/jgoldplan-1.0.0.js');
  10. export default {
  11. data() {
  12. return {
  13. customStyle: {
  14. color: 'white',
  15. background: "#E72226",
  16. width: '200rpx',
  17. margin: '10rpx',
  18. height:"60rpx",
  19. fontSize:"26rpx"
  20. }
  21. }
  22. },
  23. onLoad(options) {
  24. console.log("商品小票",options)
  25. this.customStyle.background = this.vuex_theme.bgColor;
  26. },
  27. onReady() {
  28. let mchData = {
  29. action: 'onIframeReady',
  30. displayStyle: 'SHOW_CUSTOM_PAGE'
  31. };
  32. let postData = JSON.stringify(mchData);
  33. parent.postMessage(postData, 'https://payapp.weixin.qq.com');
  34. },
  35. methods: {
  36. goback() {
  37. let mchData = {
  38. action: 'jumpOut',
  39. jumpOutUrl: 'https://vote.guosen-fumao.cn/h5/#/pages/activity/activityDetail' //跳转的页面
  40. }
  41. var postData = JSON.stringify(mchData);
  42. parent.postMessage(postData, 'https://payapp.weixin.qq.com')
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss">
  48. .payResult{
  49. display: flex;
  50. flex-direction: column;
  51. align-items: center;
  52. }
  53. </style>