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 3fc5b0e..ce7ec56 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 @@