From 5d1179bb45532d042c3a9711f56955efb436b114 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 19 八月 2025 09:30:15 +0800
Subject: [PATCH] 代码初始化

---
 h5/App.vue |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/h5/App.vue b/h5/App.vue
index 8840678..bba739d 100644
--- a/h5/App.vue
+++ b/h5/App.vue
@@ -11,13 +11,14 @@
 		},
 		methods: {
 			async init() {
-				// if (!this.$store.state.userInfo) {
-				// 	let res = await this.$u.api.login({ code: 'ShiXuHui' })
-				// 	if (res.code === 200) {
-				// 		this.$store.commit('setUserInfo', res.data)
-				// 	}
-				// }
-				// return
+				// ShiXuHui GuoJiWenWu
+				if (!this.$store.state.userInfo) {
+					let res = await this.$u.api.login({ code: 'GuoJiWenWu' })
+					if (res.code === 200) {
+						this.$store.commit('setUserInfo', res.data)
+					}
+				}
+				return
 				let code = this.getQueryVariable('code')
 				if (code) {
 					if (!uni.getStorageSync('code')) {
@@ -50,10 +51,8 @@
 								}
 							}
 						}
-					} else if (uni.getStorageSync('code') !== code) {
-						
+					} else if (uni.getStorageSync('code') !== code) {						
 						uni.setStorageSync('code', code);
-						
 						let res = await this.$u.api.login({ code: code })
 						if (res.code === 200) {
 							this.$store.commit('setUserInfo', res.data)
@@ -81,7 +80,7 @@
 								}
 							}
 						}
-						
+
 					} else {
 						let loc_href = encodeURIComponent("https://dmtest.ahapp.net/lianhelihua_web/")
 						

--
Gitblit v1.9.3