From 904436a616ca08fc95e1cbbbd13059835ef37e72 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 23 一月 2025 13:51:37 +0800
Subject: [PATCH] ll

---
 h5/pages/wdata/home.vue |   56 +++++++++++++++++++++++++++++---------------------------
 1 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/h5/pages/wdata/home.vue b/h5/pages/wdata/home.vue
index db0bc8e..ad1fc28 100644
--- a/h5/pages/wdata/home.vue
+++ b/h5/pages/wdata/home.vue
@@ -24,9 +24,9 @@
 
 <script>
 	import {
-		sendSms,
+		sendSms,
 		wxAuthorizea,
-		loginDriverWithCode,
+		loginDriverWithCode,
 		getUserInfo
 	} from '@/api'
 	export default {
@@ -65,20 +65,20 @@
 				if (!code) return this.showToast('楠岃瘉鐮佷笉鑳戒负绌�')
 				loginDriverWithCode({
 					phone,
-					code,
+					code,
 					openid: this.$store.state.openId || '111'
 				}).then(res => {
-					if (res && res.code == 200) {
-						if (res.data) {
-							this.$store.commit('setToken', res.data)
-							getUserInfo().then(ress => {
-								this.$store.commit('setDriverInfo', ress.data)
-								setTimeout(() => {
-									uni.navigateTo({
-										url: '/pages/wdata/list'
-									})
-								}, 100)
-							})
+					if (res && res.code == 200) {
+						if (res.data) {
+							this.$store.commit('setToken', res.data)
+							getUserInfo().then(ress => {
+								this.$store.commit('setDriverInfo', ress.data)
+								setTimeout(() => {
+									uni.navigateTo({
+										url: '/pages/wdata/list'
+									})
+								}, 100)
+							})
 						}
 					}
 				})
@@ -91,11 +91,13 @@
 				sendSms({
 					phone: this.form.phone
 				}).then(res => {
-					this.countDown = 10
-					setInterval(() => {
-						if (this.countDown == 0) return
-						this.countDown--
-					}, 1000)
+					if (res.code === 200) {
+						this.countDown = 60
+						setInterval(() => {
+							if (this.countDown == 0) return
+							this.countDown--
+						}, 1000)
+					}
 				})
 			},
 			userAuth(source) {
@@ -116,14 +118,14 @@
 					}).then(res => {
 						if (res.code === 200) {
 							that.$store.commit('setOpenId', res.data.openid)
-							if (res.data.token) {
-								that.$store.commit('setToken', res.data.token)
-								getUserInfo().then(ress => {
-									that.$store.commit('setDriverInfo', ress.data)
-									uni.navigateTo({
-										url: '/pages/wdata/list'
-									})
-								})
+							if (res.data.token) {
+								that.$store.commit('setToken', res.data.token)
+								getUserInfo().then(ress => {
+									that.$store.commit('setDriverInfo', ress.data)
+									uni.navigateTo({
+										url: '/pages/wdata/list'
+									})
+								})
 							}
 						}
 					})

--
Gitblit v1.9.3