index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view class="box">
  3. </view>
  4. </template>
  5. <script>
  6. export default {
  7. data() {
  8. return {
  9. timestamp: 3,
  10. param: ''
  11. }
  12. },
  13. onLoad(options) {
  14. this.param = options.p;
  15. },
  16. created() {
  17. this.$common.showLoading('正在加载...')
  18. },
  19. mounted() {
  20. this.getRedirectUri();
  21. },
  22. beforeDestroy() {
  23. this.$common.hidingLoading()
  24. },
  25. methods: {
  26. getRedirectUri() {
  27. this.$api.getRedirectUrl({path: '/pages/wx/pay', state: this.param}).then(resp => {
  28. window.location.href = resp.data;
  29. })
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. page {
  36. background-color: #fff;
  37. }
  38. .box {
  39. display: flex;
  40. flex: 1;
  41. align-items: center;
  42. justify-content: center;
  43. flex-direction: column;
  44. padding: 100rpx 0;
  45. .text {
  46. color: #191919;
  47. font-size: 36rpx;
  48. font-weight: bold;
  49. margin-top: 40rpx;
  50. }
  51. .count-down-box {
  52. display: flex;
  53. flex: 1;
  54. align-items: center;
  55. justify-content: center;
  56. margin-top: 30rpx;
  57. text {
  58. margin-left: 20rpx;
  59. }
  60. }
  61. }
  62. </style>