index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
  3. </template>
  4. <script>
  5. // +----------------------------------------------------------------------
  6. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  7. // +----------------------------------------------------------------------
  8. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  9. // +----------------------------------------------------------------------
  10. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  11. // +----------------------------------------------------------------------
  12. // | Author: CRMEB Team <admin@crmeb.com>
  13. // +----------------------------------------------------------------------
  14. import {
  15. mapGetters
  16. } from "vuex";
  17. export default {
  18. computed: mapGetters(['chatUrl']),
  19. data() {
  20. return {
  21. windowH: 0,
  22. windowW: 0,
  23. webviewStyles: {
  24. progress: {
  25. color: 'transparent'
  26. }
  27. },
  28. url: ''
  29. }
  30. },
  31. onLoad(option) {
  32. this.url = this.chatUrl;
  33. try {
  34. const res = uni.getSystemInfoSync();
  35. this.windowW = res.windowWidth;
  36. this.windowH = res.windowHeight;
  37. } catch (e) {
  38. // error
  39. }
  40. }
  41. }
  42. </script>