| | |
| | | "uniStatistics" : { |
| | | "enable" : false |
| | | }, |
| | | "vueVersion" : "2" |
| | | "vueVersion" : "2", |
| | | "h5" : { |
| | | "router" : { |
| | | "mode" : "hash", |
| | | "base" : "./" |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
| | | { |
| | | "path": "pages/test/test", |
| | | "path": "pages/home/home", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | // 去掉顶部导航栏 |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/home/home", |
| | | "path": "pages/test/test", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | // 去掉顶部导航栏 |
| | |
| | | .text-content { |
| | | width: 100%; |
| | | height: 100%; |
| | | font-size: 44px; |
| | | font-size: 44rpx; |
| | | /* background-color: aliceblue; */ |
| | | } |
| | | .swiper-head { |
| | |
| | | that.timeOut = false |
| | | that.times = 0 |
| | | var res = result.data |
| | | console.log(res); |
| | | if (res.data && res.data !== "") { |
| | | var errorInfo = res.data |
| | | if (that.infoType == 1) { |
| | |
| | | <template> |
| | | <view>1231</view> |
| | | <view> |
| | | <button class="clear" @click="clearUrl">Clear</button> |
| | | <web-view v-if="data != ''" :src="data"></web-view> |
| | | |
| | | <view style="margin-top: 100px;" v-if="data == ''"> |
| | | <input v-model="url" type="text" placeholder="输入URL"> |
| | | <button @click="setUrl">设置</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | data: '', |
| | | url: 'http://10.10.10.120:9090/wcs/h5/index.html' |
| | | } |
| | | }, |
| | | onShow() { |
| | | var i; |
| | | setInterval(()=>{ |
| | | console.log(i++); |
| | | },1000) |
| | | let that = this |
| | | uni.getStorage({ |
| | | key: "data", |
| | | success(e) { |
| | | that.data = e.data |
| | | } |
| | | }) |
| | | // 隐藏时间,电量,信号等 |
| | | }, |
| | | methods: { |
| | | |
| | | setUrl() { |
| | | if(this.url != '') { |
| | | uni.setStorage({ |
| | | key: "data", |
| | | data: this.url |
| | | }) |
| | | this.data = this.url; |
| | | } |
| | | }, |
| | | clearUrl() { |
| | | this.data = "" |
| | | this.url = "http://10.10.10.120:9090/wcs/h5/index.html" |
| | | uni.removeStorage({ |
| | | key: "data" |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .clear { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: 9999; |
| | | background: transparent; |
| | | border: none; |
| | | } |
| | | |
| | | .clear:hover { |
| | | background: #fff; |
| | | } |
| | | </style> |