index.vue 833 B

12345678910111213141516171819202122232425262728293031323334353637
  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. onShareAppMessage() {
  19. return {
  20. title:'外汇日历表',
  21. path:`/pages/forexCalendar/index`,
  22. }
  23. },
  24. methods: {
  25. handleGetMessage(e){
  26. console.log('test,test')
  27. const data=e.detail.data[e.detail.data.length-1]
  28. console.log('h5传来的数据',data);
  29. }
  30. },
  31. };
  32. </script>
  33. <style scoped lang="scss">
  34. </style>