1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| <template>
| <web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| windowH: 0,
| windowW: 0,
| webviewStyles: {
| progress: {
| color: 'transparent'
| }
| },
| url: ''
| }
| },
| onLoad(option) {
| if(option.webUel) this.url = decodeURIComponent(option.webUel);
| // 蚂蚁智能客服场景参数
| if(option.scene) this.url += `&scene=${option.scene}`;
| uni.setNavigationBarTitle({
| title: option.title
| })
| try {
| const res = uni.getSystemInfoSync();
| this.windowW = res.windowWidth;
| this.windowH = res.windowHeight;
| } catch (e) {
| // error
| }
| }
| }
| </script>
|
|