apt15e安装修改
This commit is contained in:
28
uni_modules/yykj-tv/pages/home/home1.vue
Normal file
28
uni_modules/yykj-tv/pages/home/home1.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: ''
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
const url = 'http://192.168.100.201'
|
||||
const timestamp = new Date().getTime()
|
||||
this.url = `${url}?timestamp=${timestamp}`
|
||||
uni.onNetworkStatusChange((res) => {
|
||||
if (res.isConnected) {
|
||||
this.url = `${url}?timestamp=${timestamp}`;
|
||||
}
|
||||
})
|
||||
},
|
||||
onUnload () {
|
||||
uni.offNetworkStatusChange()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -11,7 +11,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: 'http://192.168.2.100:8011'
|
||||
url: 'http://192.168.100.201'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user