From cbaf3a2512f8a35e54d1ee67d8523aab01f00387 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 28 Dec 2023 23:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E4=B8=AA=E4=BA=BA=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=EF=BC=9A=E6=89=8B=E6=9C=BA=20+=20=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/api/member/auth.js | 13 ++++++ sheep/api/user.js | 46 +------------------ .../s-auth-modal/components/account-login.vue | 26 +++++------ sheep/validate/form.js | 37 --------------- 4 files changed, 27 insertions(+), 95 deletions(-) diff --git a/sheep/api/member/auth.js b/sheep/api/member/auth.js index b30f306c..3cb98126 100644 --- a/sheep/api/member/auth.js +++ b/sheep/api/member/auth.js @@ -1,6 +1,19 @@ import request from '@/sheep/request'; const AuthUtil = { + // 使用手机 + 密码登录 + login: (data) => { + return request({ + url: '/app-api/member/auth/login', + method: 'POST', + data, + custom: { + showSuccess: true, + loadingMsg: '登录中', + successMsg: '登录成功', + }, + }); + }, // 使用手机 + 验证码登录 smsLogin: (data) => { return request({ diff --git a/sheep/api/user.js b/sheep/api/user.js index c8e61579..6f87b0e3 100644 --- a/sheep/api/user.js +++ b/sheep/api/user.js @@ -3,38 +3,8 @@ import request2 from '@/sheep/request2'; import $platform from '@/sheep/platform'; export default { - getUnused: () => - request2({ - url: 'promotion/coupon/get-unused-count', - method: 'GET', - custom: { - showLoading: false, - auth: true, - }, - }), - // 账号登录 - accountLogin: (data) => - request({ - url: '/user/api/user/accountLogin', - method: 'POST', - data, - custom: { - showSuccess: true, - loadingMsg: '登录中', - }, - }), - // 绑定、更换手机号 - changeMobile: (data) => - request({ - url: '/user/api/user/changeMobile', - method: 'POST', - data, - custom: { - showSuccess: true, - loadingMsg: '验证中', - }, - }), + // 添加分享记录 addShareLog: (data) => @@ -54,20 +24,6 @@ export default { params, }), }, - // 账号登出 - logout: (data) => - request({ - url: '/user/api/user/logout', - method: 'POST', - data, - }), - // 账号注销 - logoff: (data) => - request({ - url: '/user/api/user/logoff', - method: 'POST', - data, - }), address: { default: () => diff --git a/sheep/components/s-auth-modal/components/account-login.vue b/sheep/components/s-auth-modal/components/account-login.vue index 187e2a9f..579614c3 100644 --- a/sheep/components/s-auth-modal/components/account-login.vue +++ b/sheep/components/s-auth-modal/components/account-login.vue @@ -21,8 +21,8 @@ labelWidth="140" labelAlign="center" > - - + + diff --git a/sheep/validate/form.js b/sheep/validate/form.js index 2c4e2c94..07b57259 100644 --- a/sheep/validate/form.js +++ b/sheep/validate/form.js @@ -22,24 +22,6 @@ export const mobile = { ], }; -// 账户 -export const account = { - rules: [ - { - required: true, - errorMessage: '请输入账号', - }, - { - validateFunction: function (rule, value, data, callback) { - if (value.length < 5) { - callback('账号长度不能小于5位'); - } - return true; - }, - }, - ], -}; - // 密码 export const password = { rules: [ @@ -58,24 +40,6 @@ export const password = { ], }; -// 昵称 -export const username = { - rules: [ - { - required: true, - errorMessage: '请输入用户名', - }, - { - validateFunction: function (rule, value, data, callback) { - if (value.length < 5) { - callback('用户名长度不能小于5位'); - } - return true; - }, - }, - ], -}; - // 短信验证码 export const code = { rules: [ @@ -195,7 +159,6 @@ export default { realName, password, code, - account, taxNo, taxName, };