index.vue 701 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <div class="forex-calendar-wrap">
  3. <web-view :src="url" @message="handleGetMessage"></web-view>
  4. </div>
  5. </template>
  6. <script>
  7. import {h5BaseUrl} from '@/utils/config'
  8. export default {
  9. data() {
  10. return {
  11. url:''
  12. };
  13. },
  14. onLoad(options){
  15. const token=this.$store.state.user.token
  16. this.url = `${h5BaseUrl}/hzyb/forex/transindex?token=${token}#wechat_redirect`
  17. },
  18. methods: {
  19. handleGetMessage(e){
  20. console.log('test,test')
  21. const data=e.detail.data[e.detail.data.length-1]
  22. console.log('h5传来的数据',data);
  23. }
  24. },
  25. };
  26. </script>
  27. <style scoped lang="scss">
  28. </style>