From e597d2905326e907f4ff5ad3665b882239b6fb11 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 24 一月 2025 18:01:21 +0800
Subject: [PATCH] ll
---
 h5/pages/login.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/h5/pages/login.vue b/h5/pages/login.vue
index ebe40f2..dc65036 100644
--- a/h5/pages/login.vue
+++ b/h5/pages/login.vue
@@ -45,14 +45,20 @@
 				form: {
 					phone: '',
 					code: ''
-				},
+				},
+				ywinfo: {},
 				downTime: 0,
 				code: ''
 			}
 		},
 		onLoad(option) {
 			console.log('onLoad');
-			// https://zhcg.fnwtzx.com/#/pages/login?type=0&ywid=ywid
+			// https://zhcg.fnwtzx.com/#/pages/login?type=0&ywid=ywid
+			const ywinfo = uni.getStorageSync('ywinfo') || {}
+			if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
+				this.ywinfo = ywinfo
+				uni.setStorageSync('ywinfo', {})
+			}
 			if (option.ywid || option.ywid == 0) {
 				uni.setStorageSync('ywinfo', {
 					type: option.type,
@@ -84,11 +90,10 @@
 							getUserInfo().then(ress => {
 								that.$store.commit('setUserInfo', ress.data)
 							})
-							const ywinfo = uni.getStorageSync('ywinfo') || {}
+							const ywinfo = this.ywinfo
 							if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
 								getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
 									if(res.data && res.data.id){
-										uni.setStorageSync('ywinfo', {})
 										uni.redirectTo({
 											url: "/pages/polling/point?id=" + res.data.id
 										})
@@ -141,12 +146,11 @@
 						this.showToast('鐧诲綍鎴愬姛')
 						getUserInfo().then(ress => {
 							this.setUserInfo(ress.data)
-							const ywinfo = uni.getStorageSync('ywinfo') || {}
+							const ywinfo = this.ywinfo
 							if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
 							getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
 								getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
 									if(res.data && res.data.id){
-										uni.setStorageSync('ywinfo', {})
 										uni.redirectTo({
 											url: "/pages/polling/point?id=" + res.data.id
 										})
--
Gitblit v1.9.3