From b4a3f1099b0464d6eb1b7d2620a66e632fc3c402 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 10 一月 2024 15:31:00 +0800
Subject: [PATCH] #

---
 Monitor-APP/manifest.json       |    8 +++
 Monitor-APP/pages/test/test.vue |   54 +++++++++++++++++++++++---
 Monitor-APP/pages.json          |    4 +-
 Monitor-APP/pages/home/home.css |    2 
 Monitor-APP/pages/home/home.vue |    1 
 5 files changed, 58 insertions(+), 11 deletions(-)

diff --git a/Monitor-APP/manifest.json b/Monitor-APP/manifest.json
index 9b89881..6c5100a 100644
--- a/Monitor-APP/manifest.json
+++ b/Monitor-APP/manifest.json
@@ -107,5 +107,11 @@
     "uniStatistics" : {
         "enable" : false
     },
-    "vueVersion" : "2"
+    "vueVersion" : "2",
+    "h5" : {
+        "router" : {
+            "mode" : "hash",
+            "base" : "./"
+        }
+    }
 }
diff --git a/Monitor-APP/pages.json b/Monitor-APP/pages.json
index 81bde86..654e330 100644
--- a/Monitor-APP/pages.json
+++ b/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",
 				// 鍘绘帀椤堕儴瀵艰埅鏍�
diff --git a/Monitor-APP/pages/home/home.css b/Monitor-APP/pages/home/home.css
index e34c0e7..758aeeb 100644
--- a/Monitor-APP/pages/home/home.css
+++ b/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 {
diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue
index 2ef9df5..e9ab206 100644
--- a/Monitor-APP/pages/home/home.vue
+++ b/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) {
diff --git a/Monitor-APP/pages/test/test.vue b/Monitor-APP/pages/test/test.vue
index ded83e4..5ac8d6a 100644
--- a/Monitor-APP/pages/test/test.vue
+++ b/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>
\ No newline at end of file

--
Gitblit v1.9.1