#
whycq
2024-01-10 b4a3f1099b0464d6eb1b7d2620a66e632fc3c402
#
5个文件已修改
69 ■■■■ 已修改文件
Monitor-APP/manifest.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/home/home.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/home/home.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/pages/test/test.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor-APP/manifest.json
@@ -107,5 +107,11 @@
    "uniStatistics" : {
        "enable" : false
    },
    "vueVersion" : "2"
    "vueVersion" : "2",
    "h5" : {
        "router" : {
            "mode" : "hash",
            "base" : "./"
        }
    }
}
Monitor-APP/pages.json
@@ -1,7 +1,7 @@
{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/test/test",
            "path": "pages/home/home",
            "style": {
                "navigationStyle": "custom",
                // 去掉顶部导航栏
@@ -11,7 +11,7 @@
            }
        },
        {
            "path": "pages/home/home",
            "path": "pages/test/test",
            "style": {
                "navigationStyle": "custom",
                // 去掉顶部导航栏
Monitor-APP/pages/home/home.css
@@ -1,7 +1,7 @@
.text-content {
    width: 100%;
    height: 100%;
    font-size: 44px;
    font-size: 44rpx;
    /* background-color: aliceblue;     */
}
.swiper-head {
Monitor-APP/pages/home/home.vue
@@ -572,6 +572,7 @@
                        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) {
Monitor-APP/pages/test/test.vue
@@ -1,25 +1,65 @@
<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>