From 37058e5c0132304dc0f87f51adc4f482335e67ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Tue, 12 Nov 2024 11:14:30 +0800 Subject: [PATCH] =?UTF-8?q?login=E4=BF=AE=E6=94=B9=20=E6=97=A0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E7=99=BB=E5=BD=95=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=20Vue2=E5=8D=87=E7=BA=A7Vue3=2010/25-11/8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.js | 2 +- src/pages/login/index.vue | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/api/login.js b/src/api/login.js index cdae3094..c34828f3 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -11,7 +11,7 @@ export function login(username, password, captchaVerification, tenantName, remem code, uuid, } - return http.post('/system/auth/login', data) + return http.post('/system/auth/loginNoCode', data) } // 获取用户详细信息 diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 26aa51a1..b19985a9 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -43,7 +43,7 @@ - + @@ -87,6 +87,7 @@ const code = ref('') const uuid = ref('') const version = ref('') const comMessageRef = ref('') +const needCode = ref(false) // 返回首页 onNavigationBarButtonTap((e) => { if (e.index === 0) { @@ -102,8 +103,8 @@ onLoad(() => { tenantValue.value = tenantArray.value[0].value storage.clearStorage() if (import.meta.env.VITE_USER_NODE_ENV === 'development') { - username.value = 'admin' - password.value = 'win123456' + username.value = '' + password.value = '' } uni.setNavigationBarColor({ frontColor: '#ffffff', @@ -123,9 +124,11 @@ const handelerlogin = () => { proxy.$modal.showToast('用户名不能为空') } else if (password.value === '') { proxy.$modal.showToast('密码不能为空') - } else if (code.value === '') { - proxy.$modal.showToast('验证码不能为空') - } else { + } + // else if (code.value === '') { + // proxy.$modal.showToast('验证码不能为空') + // } + else { // console.log("用户名:", this.username, "密码:", this.password, this.tapstyle, this.smloginmsg) const logininfo = { username: '',