|
@@ -1,9 +1,29 @@
|
|
|
<template>
|
|
|
<!-- 忘记密码 -->
|
|
|
<div class="ForgetPassword">
|
|
|
+ <img
|
|
|
+ src="../../assets/login/close-forget.png"
|
|
|
+ class="close-win"
|
|
|
+ @click="closeWin"
|
|
|
+ />
|
|
|
<div class="title">
|
|
|
<p>忘记密码</p>
|
|
|
</div>
|
|
|
+ <!-- 先择老师还是学生 -->
|
|
|
+ <div class="teacherAndStudent">
|
|
|
+ <div
|
|
|
+ @click="selectTS('teacher')"
|
|
|
+ :class="TorS == 'teacher' ? 'select' : ''"
|
|
|
+ >
|
|
|
+ <p>我是老师</p>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ @click="selectTS('student')"
|
|
|
+ :class="TorS == 'teacher' ? '' : 'select'"
|
|
|
+ >
|
|
|
+ <p>我是学生</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="main">
|
|
|
<div class="ploneEmail">
|
|
|
<div>
|
|
@@ -122,8 +142,10 @@
|
|
|
</div>
|
|
|
<!-- 验证 -->
|
|
|
<div class="btnLogin">
|
|
|
- <img v-if="isLogin" src="../../assets/login/Ellipse87.png" alt="" />
|
|
|
- <p @click="gotoLogin" v-else>验证</p>
|
|
|
+ <div class="inner">
|
|
|
+ <img v-if="isLogin" src="../../assets/login/Ellipse87.png" alt="" />
|
|
|
+ <p @click="gotoLogin" v-else>完成</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-show="shadow" class="shadow"></div>
|
|
@@ -137,7 +159,7 @@ import { getLogin } from "@/api/api";
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: {},
|
|
|
- props: ["ForgetType", "changeLoginReg"],
|
|
|
+ props: ["ForgetType", "changeLoginReg", "changeLoginType"],
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
@@ -157,6 +179,7 @@ export default {
|
|
|
twopassword: "",
|
|
|
passwordError: false, //密码错误
|
|
|
passwordErrorTwo: false, //第二次输入的密码错误
|
|
|
+ TorS: "",
|
|
|
};
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -165,6 +188,13 @@ export default {
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ closeWin() {
|
|
|
+ this.changeLoginReg("login");
|
|
|
+ },
|
|
|
+ // 选择老师或者学生
|
|
|
+ selectTS(user_type) {
|
|
|
+ this.TorS = user_type;
|
|
|
+ },
|
|
|
// 显示选择登录方式
|
|
|
showLoginType() {
|
|
|
this.ShowloginType = !this.ShowloginType;
|
|
@@ -227,9 +257,7 @@ export default {
|
|
|
console.log(res);
|
|
|
});
|
|
|
} else {
|
|
|
- this_.$message.warning(
|
|
|
- "请先输入电子邮箱或手机号码"
|
|
|
- );
|
|
|
+ this_.$message.warning("请先输入电子邮箱或手机号码");
|
|
|
}
|
|
|
},
|
|
|
// 验证码的验证只能输入数字
|
|
@@ -300,6 +328,7 @@ export default {
|
|
|
this.$message.success("密码修改成功”");
|
|
|
this.changeLoginReg("login");
|
|
|
this.isLogin = false;
|
|
|
+ this.changeLoginType(this.TorS);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.isLogin = false;
|
|
@@ -309,7 +338,9 @@ export default {
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ this.TorS = this.ForgetType;
|
|
|
+ },
|
|
|
//生命周期-创建之前
|
|
|
beforeCreated() {},
|
|
|
//生命周期-挂载之前
|
|
@@ -329,19 +360,19 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
/* @import url(); 引入css类 */
|
|
|
.ForgetPassword {
|
|
|
+ position: relative;
|
|
|
width: 820px;
|
|
|
height: 500px;
|
|
|
background: #f8f8f8;
|
|
|
border-radius: 8px;
|
|
|
- margin-left: 30px;
|
|
|
- .title {
|
|
|
- height: 100px;
|
|
|
- line-height: 100px;
|
|
|
- p {
|
|
|
- text-align: center;
|
|
|
- font-size: 20px;
|
|
|
- color: #ff9900;
|
|
|
- }
|
|
|
+ margin-left: 40px;
|
|
|
+ .close-win {
|
|
|
+ position: absolute;
|
|
|
+ right: 24px;
|
|
|
+ top: 24px;
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
.teacherAndStudent {
|
|
|
margin: 0 auto;
|
|
@@ -352,6 +383,7 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
+ margin-bottom: 28px;
|
|
|
> div {
|
|
|
width: 164px;
|
|
|
height: 36px;
|
|
@@ -360,20 +392,34 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
cursor: pointer;
|
|
|
+ color: #a6a6a6;
|
|
|
}
|
|
|
.select {
|
|
|
background: #ffffff;
|
|
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
|
|
|
border-radius: 2px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ff9900;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ padding: 48px 0 20px;
|
|
|
+ p {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #ff9900;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 0;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.main {
|
|
|
.ploneEmail {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
> div {
|
|
|
// margin: 24px auto;
|
|
|
- margin: 20px 10px;
|
|
|
+ margin: 16px 12px;
|
|
|
width: 334px;
|
|
|
position: relative;
|
|
|
.input {
|
|
@@ -525,27 +571,34 @@ export default {
|
|
|
}
|
|
|
|
|
|
.btnLogin {
|
|
|
- margin: 0 auto;
|
|
|
- margin-top: 90px;
|
|
|
- position: relative;
|
|
|
- width: 693px;
|
|
|
- height: 50px;
|
|
|
- background: #ff9900;
|
|
|
- border-radius: 4px;
|
|
|
- color: white;
|
|
|
- line-height: 48px;
|
|
|
- text-align: center;
|
|
|
- cursor: pointer;
|
|
|
- z-index: 2;
|
|
|
- p {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- img {
|
|
|
- vertical-align: middle;
|
|
|
- animation: rotated 1s linear infinite;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 37px;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .inner {
|
|
|
+ margin: 0 auto;
|
|
|
+ width: 693px;
|
|
|
+ height: 50px;
|
|
|
+ background: #ff9900;
|
|
|
+ border-radius: 4px;
|
|
|
+ color: white;
|
|
|
+ line-height: 48px;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 2;
|
|
|
+ p {
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ img {
|
|
|
+ vertical-align: middle;
|
|
|
+ animation: rotated 1s linear infinite;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.agreement {
|