From 8e644896cdd616d7f6c734f56a9cc642e20ee0cb Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 31 七月 2024 15:49:50 +0800
Subject: [PATCH] lll
---
wechat_staff/pages/login/index.js | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/wechat_staff/pages/login/index.js b/wechat_staff/pages/login/index.js
index 8182f8c..084b641 100644
--- a/wechat_staff/pages/login/index.js
+++ b/wechat_staff/pages/login/index.js
@@ -64,6 +64,25 @@
code,
phone
} = this.data
+ if (!this.data.agreementFalg) {
+ return wx.showToast({
+ title: '璇峰厛闃呰骞跺悓鎰忕浉鍏冲崗璁�',
+ icon: 'none'
+ })
+ }
+ if (phone.length != 11) {
+ return wx.showToast({
+ title: '璇疯緭鍏ユ纭殑鎵嬫満鍙�',
+ icon: 'none'
+ })
+ }
+ if (!code) {
+ return wx.showToast({
+ title: '璇疯緭鍏ラ獙璇佺爜',
+ icon: 'none'
+ })
+ }
+
loginByPhone({
code,
phone
@@ -98,12 +117,6 @@
})
},
changeStatus() {
- if (!this.data.agreementFalg) {
- return wx.showToast({
- title: '璇峰厛闃呰骞跺悓鎰忕浉鍏冲崗璁�',
- icon: 'none'
- })
- }
this.setData({
status: '1'
})
@@ -128,7 +141,7 @@
getWxMiniPhone({
encryptedData: data.encryptedData,
iv: data.iv,
- sessionKey: wx.getStorageSync('sessionKey') || data.iv,
+ sessionKey: wx.getStorageSync('sessionKey'),
}).then(res => {
if (res.data && res.data.token) {
wx.login({
--
Gitblit v1.9.3