webview.vue 583 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view>
  3. <web-view :src="src"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import $api from '@/static/js/api.js'
  8. export default {
  9. data() {
  10. return {
  11. src: '',
  12. }
  13. },
  14. onShow() {
  15. $api.req({
  16. url: '/data/api.auth.Center/get',
  17. method: 'POST',
  18. }, function(res) {
  19. if(res.code == 1) {
  20. console.log(res);
  21. var user = res.data
  22. if(user.is_auth == 1) {
  23. $api.jump('/pages/tabbar/mine/mine',3)
  24. }
  25. }
  26. })
  27. },
  28. onLoad(options) {
  29. this.src = decodeURIComponent(options.url)
  30. },
  31. methods: {
  32. }
  33. }
  34. </script>
  35. <style>
  36. </style>