From 1d9b30402693e10fe4e687e16cc83667e9a28f09 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 17 Dec 2023 19:29:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20=E7=9F=AD=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=EF=BC=9A=E6=8E=A5=E5=85=A5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/api/member/auth.js | 21 +++++++++++++++---- .../s-auth-modal/components/account-login.vue | 2 +- .../s-auth-modal/components/sms-login.vue | 18 +++++++++------- .../components/s-auth-modal/s-auth-modal.vue | 4 ++-- sheep/hooks/useModal.js | 5 ++++- sheep/request/index.js | 1 + 6 files changed, 36 insertions(+), 15 deletions(-) diff --git a/sheep/api/member/auth.js b/sheep/api/member/auth.js index d265e20..92ec829 100644 --- a/sheep/api/member/auth.js +++ b/sheep/api/member/auth.js @@ -1,6 +1,19 @@ import request from '@/sheep/request'; const AuthUtil = { + // 使用手机 + 验证码登录 + smsLogin: (data) => { + return request({ + url: '/app-api/member/auth/sms-login', + method: 'POST', + data, + custom: { + showSuccess: true, + loadingMsg: '登录中', + successMsg: '登录成功', + }, + }); + }, // 发送手机验证码 sendSmsCode: (mobile, scene) => { return request({ @@ -8,20 +21,20 @@ const AuthUtil = { method: 'POST', data: { mobile, - scene + scene, }, custom: { loadingMsg: '发送中', showSuccess: true, - successMsg: '发送成功' - } + successMsg: '发送成功', + }, }); }, // 登出系统 logout: () => { return request({ url: '/app-api/member/auth/logout', - method: 'POST' + method: 'POST', }); }, }; diff --git a/sheep/components/s-auth-modal/components/account-login.vue b/sheep/components/s-auth-modal/components/account-login.vue index 7663204..187e2a9 100644 --- a/sheep/components/s-auth-modal/components/account-login.vue +++ b/sheep/components/s-auth-modal/components/account-login.vue @@ -4,10 +4,10 @@ - 账号登录 短信登录 + 账号登录 如果未设置过密码,请点击忘记密码 diff --git a/sheep/components/s-auth-modal/components/sms-login.vue b/sheep/components/s-auth-modal/components/sms-login.vue index 46ffc57..0651b78 100644 --- a/sheep/components/s-auth-modal/components/sms-login.vue +++ b/sheep/components/s-auth-modal/components/sms-login.vue @@ -4,10 +4,10 @@ + 短信登录 账号登录 - 短信登录 未注册的手机号,验证后自动注册账号 @@ -59,10 +59,11 @@