webview.vue 651 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <view>
  3. <web-view :webview-styles="webviewStyles" :src="obj"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. webviewStyles: {
  11. progress: {
  12. color: '#FF3333'
  13. }
  14. },
  15. obj:"",
  16. url:''
  17. }
  18. },
  19. onLoad(e) {
  20. // 传入需要跳转的链接 使用web-view标签进行跳转
  21. console.log('-----xiba------',e)
  22. let obj = JSON.parse(decodeURIComponent(e.obj)).obj
  23. this.url=e.url;
  24. this.obj=this.url+'?'+obj
  25. console.log( this.obj)
  26. }
  27. }
  28. </script>
  29. <style>
  30. </style>