pass.vue 859 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <view class="">
  3. </view>
  4. </template>
  5. <script>
  6. export default {
  7. data() {
  8. payInfo: {}
  9. },
  10. onLoad(opt) {
  11. this.payInfo = uni.getStorageSync('payInfo') || {}
  12. if(opt.from_wxpay) {
  13. let date = new Date()
  14. let year = date.getFullYear()
  15. let month = date.getMonth() >= 9 ? date.getMonth() + 1 : '0' + (date
  16. .getMonth() + 1)
  17. let day = date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()
  18. let money = uni.getStorageSync('money')
  19. uni.navigateTo({
  20. url:'/pages/index/thank?money=' + this.payInfo.money +'&name=' + this.payInfo.donate_er + '&time=' + encodeURI(year + '年' + month + '月' + day + '日') + '&order_name=' + encodeURI(this.payInfo.order_name)
  21. })
  22. }else {
  23. // uni.switchTab({
  24. // url:'/pages/index/index'
  25. // })
  26. }
  27. },
  28. methods: {
  29. }
  30. }
  31. </script>
  32. <style>
  33. </style>