payCentre.vue 852 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="body">
  3. <image src="/static/payCentre/loading.gif" mode=""></image>
  4. <view>支付中</view>
  5. </view>
  6. </template>
  7. <script>
  8. import uniWeb from '@/utils/uni.webview.1.5.4.js'
  9. export default {
  10. data() {
  11. return {
  12. data:""
  13. }
  14. },
  15. onLoad(options) {
  16. if(options.orderNo){
  17. // this.$nextTick(()=>{
  18. // this.goto(options.orderNo)
  19. // })
  20. setTimeout(()=>{
  21. this.goto(options.orderNo)
  22. },100)
  23. }
  24. },
  25. methods: {
  26. goto(orderNo) {
  27. try {
  28. uniWeb.webView.postMessage({
  29. data: {
  30. action: 'pay',
  31. orderNo:orderNo
  32. }
  33. })
  34. } catch (err) {
  35. console.log('err==>', err)
  36. }
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .body{
  43. text-align: center;
  44. padding-top: 300rpx;
  45. color: #303133;
  46. image{
  47. width: 200rpx;
  48. height: 200rpx;
  49. }
  50. }
  51. </style>