webview.vue 801 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <web-view :src="src"></web-view>
  3. </template>
  4. <script>
  5. import { mapGetters } from 'vuex';
  6. // import { getSelfInfo } from '@/utils/auth'
  7. export default {
  8. data() {
  9. return {
  10. src: '',
  11. roleName: ''
  12. };
  13. },
  14. computed: {
  15. // ...mapGetters({ userInfo: 'getSelfInfo' })
  16. },
  17. onLoad(option) {
  18. if (option.url) {
  19. console.log(option.url);
  20. this.src = decodeURIComponent(option.url);
  21. }
  22. },
  23. /**
  24. * 用户点击右上角分享
  25. */
  26. onShareAppMessage: function (option) {
  27. let shareObj = {};
  28. shareObj = {
  29. title: this.userInfo.nick_name + this.userInfo.role_name,
  30. path: `/pages/design/designCompany/indexNew?${params}`
  31. };
  32. return shareObj;
  33. },
  34. methods: {
  35. init() {}
  36. }
  37. };
  38. </script>
  39. <style lang="scss" scoped></style>