| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <view class="webview">
- <web-view :src="url" id="webcon">
- </web-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- url: '',
- device_id: '',
- accessToken: ''
- }
- },
- onLoad(options) {
- this.device_id = options.device_id
- this.accessToken = uni.getStorageSync('session_key')
-
- this.url = "https://wx.hnyfwlw.com/wexin/index.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken
- // this.url = "http://192.168.2.167:5500/index.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken
- // this.url = "https://demo.nyzhwlw.com/wechat?device_id=" + this.device_id + "&accessToken=" + this.accessToken
- //设置 webview 界面的状态栏的 title
- uni.setNavigationBarTitle({
- title: '监控详情'
- });
- },
- methods: {
- }
- }
- </script>
- <style>
- .webview {
- width: 100vw;
- height: 100vh;
- }
- </style>
|