goldPlan.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="container">
  3. <view class="text-img">
  4. <image src="../../static/img/text-html-bg.png" mode="aspectFit" />
  5. </view>
  6. <view class="car-img">
  7. <image src="../../static/img/car-html-bg.png" mode="aspectFit" />
  8. </view>
  9. <view @click="goToBgzchina()" class="button">回到{{ project_name }}智慧停车</view>
  10. </view>
  11. </template>
  12. <script>
  13. const goldPlan = require('../../static/js/jgoldplan-1.0.0.js');
  14. export default {
  15. data() {
  16. return {
  17. sub_mch_id: '',
  18. out_trade_no: '',
  19. project_name: process.env.H_PROJECT_NAME
  20. };
  21. },
  22. onLoad(option) {
  23. this.sub_mch_id = option.sub_mch_id; //特约商户号
  24. this.out_trade_no = option.out_trade_no; //商户订单号
  25. },
  26. onReady() {
  27. let mchData = {
  28. action: 'onIframeReady',
  29. displayStyle: 'SHOW_CUSTOM_PAGE',
  30. height: 960
  31. };
  32. let postData = JSON.stringify(mchData);
  33. parent.postMessage(postData, 'https://payapp.weixin.qq.com');
  34. },
  35. methods: {
  36. /**
  37. * @description: 返回停车页面
  38. * @return {*}
  39. */
  40. goToBgzchina() {
  41. const mchData = {
  42. action: 'jumpOut',
  43. jumpOutUrl: process.env.H_PROJECT_URL //跳转的页面
  44. };
  45. const pData = JSON.stringify(mchData);
  46. parent.postMessage(pData, 'https://payapp.weixin.qq.com');
  47. }
  48. }
  49. };
  50. </script>
  51. <style lang="scss" scoped>
  52. .container {
  53. height: 100vh;
  54. width: 100%;
  55. padding: 50px 0;
  56. text-align: center;
  57. background: linear-gradient(138deg, #7ebab8 0%, #48999a 100%);
  58. box-shadow: 0px 2px 4px 0px #0b7c7d;
  59. }
  60. .text-img {
  61. margin: 0 auto;
  62. width: 80%;
  63. height: 20%;
  64. image {
  65. width: 100%;
  66. height: 100%;
  67. }
  68. }
  69. .car-img {
  70. margin: 39px auto 0;
  71. width: 65%;
  72. height: 25%;
  73. image {
  74. width: 100%;
  75. height: 100%;
  76. }
  77. }
  78. .button {
  79. display: inline-block;
  80. width: calc(100% - 84px);
  81. height: 6vh;
  82. line-height: 6vh;
  83. text-decoration: none;
  84. margin-top: 4vh;
  85. outline: none;
  86. border: none;
  87. background: #ffffff;
  88. box-shadow: 0px 7px 13px 0px rgba(0, 105, 106, 0.26);
  89. border-radius: 10px;
  90. font-size: 1.1em;
  91. font-weight: 500;
  92. color: #1d8587;
  93. font-family: 'PingFangSC-Medium, PingFang SC';
  94. cursor: pointer;
  95. }
  96. </style>