index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. console.log(resp);
  29. window.location.href = resp.data;
  30. })
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss">
  36. page {
  37. background-color: #fff;
  38. }
  39. .box {
  40. display: flex;
  41. flex: 1;
  42. align-items: center;
  43. justify-content: center;
  44. flex-direction: column;
  45. padding: 100rpx 0;
  46. .text {
  47. color: #191919;
  48. font-size: 36rpx;
  49. font-weight: bold;
  50. margin-top: 40rpx;
  51. }
  52. .count-down-box {
  53. display: flex;
  54. flex: 1;
  55. align-items: center;
  56. justify-content: center;
  57. margin-top: 30rpx;
  58. text {
  59. margin-left: 20rpx;
  60. }
  61. }
  62. }
  63. </style>