From 13de1fdac0303f7faa29c34ad2401ecc3f56c129 Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Wed, 21 Oct 2020 11:39:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 49 +++++++++++++++-- src/views/login/Login.vue | 2 +- src/views/login/Reset.vue | 111 +++++++++++++++++++++++++++++--------- 3 files changed, 133 insertions(+), 29 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 5f87acc..acb02e0 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -395,21 +395,23 @@ export async function transactioninfo(data?: any){ /** * 修改密码 */ -export async function editpassword(data?:any) :Promise { +export async function editpassword(data?:any) :Promise { console.log(data,111) const newdata={ memberid:0, password:"", topassword:"" } - newdata.memberid=store.state.userinfo.memberid + newdata.memberid=data.memberid newdata.password=data.password - newdata.topassword=data.topassword + newdata.topassword=data.repassword console.log(newdata) const res = await post('resetPassword',newdata) if(res.code==0){ message.success("修改成功") + } + return res } /** @@ -533,6 +535,47 @@ export async function addcomment(data?:any):Promise { } return res } + + + /** + * 验证用户是否存在 + */ + interface CheckuserRule{ + memberid: number, + name: string, + mobile: string, + email: string, + code:string + } + interface CheckData{ + data: { + memberid: any, + name: string, + mobile: string, + email: string, + code:string + }, + code: number; + msg: string; + } +export async function checkuser(data?:any){ + const newdata={number:""} + newdata.number=data.phone + const res = await get('checkUser',newdata); + // console.log(res) + return { + code :res.code, + msg:res.msg, + data:{ + memberid:res.data.memberid, + name: res.data.name, + mobile: res.data.mobile, + email: res.data.email, + code:res.data.code + } + } +} + /** * 发送验证码 * @param phone 手机号 diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index 5702969..8048b8a 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -61,7 +61,7 @@ class="shuru" v-model:value="userinfo.password" /> -
忘记密码?
+
忘记密码?
立即登录
diff --git a/src/views/login/Reset.vue b/src/views/login/Reset.vue index 1e84ffa..fa460a2 100644 --- a/src/views/login/Reset.vue +++ b/src/views/login/Reset.vue @@ -9,12 +9,12 @@
想起密码? - 去登录 + 去登录
- +
下一步
@@ -24,22 +24,15 @@
已有账号? - 去登录 + 去登录
- -
13937984111
-
+ +
{{uinfo.phone}}
+
-
@@ -47,7 +40,7 @@
- +
@@ -55,16 +48,16 @@
- + - +
-
立刻注册
+
确认重置
Beelink公司版权所有 2019—2022
@@ -72,7 +65,7 @@
您已完成密码重置
-
恭喜您重置密码成功,点击跳转到登录页面
+
恭喜您重置密码成功,点击跳转到登录页面
@@ -106,7 +99,10 @@