Commit 2a9d7b5d authored by 杨梦雪's avatar 杨梦雪

修改

parent 0d845aa4
......@@ -21,16 +21,30 @@
>
</div>
<div class="btn">
<el-button @click="next()">下一步</el-button>
</div>
<el-button :disabled='!checked' @click="next()">下一步</el-button>
</div>
</div>
</template>
<script>
/* eslint-disable */
export default {
name: "Confirm",
data() {
return {
checked:false
};
},
methods:{
next(){
// if(!this.checked){
// return this.$message.console.error('请');
// }
console.log(this.checked)
this.$router.push( "/signUp/invitation");
}
}
};
</script>
......
......@@ -3,8 +3,10 @@ import {
request
} from './network'
const identity = localStorage.getItem('index-identity')
// 登录
export function login(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/auth/login',
......@@ -15,6 +17,7 @@ export function login(data) {
// 退出
export function logout(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/auth/loginOut',
......@@ -24,6 +27,7 @@ export function logout(data) {
// 通过旧密码找回密码
export function changePassOld(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/auth/changePassOld',
......@@ -33,6 +37,7 @@ export function changePassOld(data) {
// 通过验证码找回密码
export function changePassCode(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/auth/changePassCode',
......
......@@ -11,10 +11,17 @@ export function registerCode(data) {
return request({
method: 'post',
url: '/web/code/registerCode',
data
params:data
})
}
export function passwordCode(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/code/passwordCode',
params:data
})
}
// 填写注册信息
export function setAccountInfo(data) {
......
......@@ -3,8 +3,10 @@ import {
request
} from './network'
const identity = localStorage.getItem('index-identity')
// 报名初始化
export function signUpInit(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/signUp/signUpInit',
......@@ -14,6 +16,7 @@ export function signUpInit(data) {
// 确认报名须知
export function setSignShould(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/signUp/setSignShould',
......@@ -23,6 +26,7 @@ export function setSignShould(data) {
// 页面个人获取
export function getAccount(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/signUp/getAccount',
......@@ -32,6 +36,7 @@ export function getAccount(data) {
// 获取学习成绩证明材料上传图片
export function getAchievementOss(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/signUp/getAchievementOss',
......@@ -41,6 +46,7 @@ export function getAchievementOss(data) {
// 页面个人信息保存
export function setAccount(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/signUp/setAccount',
......@@ -50,6 +56,7 @@ export function setAccount(data) {
// 获取报名省份城市
export function getProAndCity(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/signUp/getProAndCity',
......@@ -59,6 +66,7 @@ export function getProAndCity(data) {
// 获取报名学校
export function getSchool(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/signUp/getSchool',
......
......@@ -38,10 +38,10 @@ const routes = [{
}
]
// const originalPush = VueRouter.prototype.push
// VueRouter.prototype.push = function push (location) {
// return originalPush.call(this, location).catch(err => err)
// }
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
}
const router = new VueRouter({
mode: 'history',
......
export default [{
path: '/signUp',
path: '/signUp/:type',
name: 'index-signUp',
component: () => import(/* webpackChunkName: "login" */ 'v/index/camp/SignUp.vue'),
meta: {
......
......@@ -5,7 +5,7 @@
<div class="cc flex">
<div class="camp_left">
<ul class="camp_left_box">
<li @click="ToSignUp" :class="activeMenu == 0 ? 'active' : ''">
<li @click="ToSignUp" >
<img src="@/assets/img/signUp/icon-bm.png" />营地报名
</li>
<li @click="ToHomework">
......
......@@ -6,11 +6,11 @@
<Breadcrumb> </Breadcrumb>
</div>
</div>
<Confirm> </Confirm>
<!-- <Invitation> </Invitation> -->
<!-- <ReferInfo> </ReferInfo> -->
<!-- <Pass> </Pass> -->
<!-- <Paying> </Paying> -->
<Confirm v-if="type == 'examInfo'"> </Confirm>
<Invitation v-else-if="type == 'invitation'"> </Invitation>
<ReferInfo v-else-if="type == 'referInfo'"> </ReferInfo>
<Pass v-else-if="type == 'check'"> </Pass>
<Paying v-else-if="type == 'pay'"> </Paying>
</div>
</template>
......@@ -33,7 +33,13 @@ export default {
Paying,
},
data() {
return {};
return {
type: "examInfo",
};
},
created() {
this.type = this.$route.params.type;
console.log(this.$route);
},
};
</script>
......
......@@ -108,17 +108,11 @@ export default {
methods: {
// 忘记账号/密码
forgetPwd() {
// window.localStorage.setItem("f_forgetpwd", 0);
this.$router.replace({ name: "index-reset" });
},
// 去注册
register() {
// this.dialogFormFu = {
// title: "提示",
// message: 1,
// };
// this.dialogVisibleFu = true;
this.$router.replace({ name: "index-register" });
},
// 改变密码显示状态
......@@ -127,16 +121,21 @@ export default {
},
// 登录
submitForm() {
this.$refs["loginFormRef"].validate((valid) => {
if (!valid) return;
login({
phone: this.loginForm.phone,
password: this.loginForm.password,
}).then((res) => {
console.log(res);
if (res.code != 200) {
if (res.status != 200) {
return this.$message.error(res.message);
}
this.$router.replace({ name: "cerificateIndex" });
this.$message.success("登录成功");
// token存储
window.localStorage.setItem("index-token", res.token);
this.$router.replace({ path: "/signUp/examInfo" });
});
});
},
},
......
......@@ -11,7 +11,7 @@
class="demo-registerForm"
>
<el-form-item prop="phone">
<img class="img_l" src="@/assets/img/reset/username.png" alt=""/>
<img class="img_l" src="@/assets/img/reset/username.png" alt="" />
<el-input
v-model="registerForm.phone"
placeholder="请输入手机号"
......@@ -20,7 +20,7 @@
></el-input>
</el-form-item>
<el-form-item prop="code">
<img class="img_l" src="@/assets/img/reset/code.png" alt=""/>
<img class="img_l" src="@/assets/img/reset/code.png" alt="" />
<el-input
v-model="registerForm.code"
placeholder="请输入短信验证码"
......@@ -29,12 +29,14 @@
></el-input>
<!-- 短信验证码 -->
<div class="phoneCode">
<span class="code" v-show="show" @click="getCode">获取验证码</span>
<span class="code" v-show="show" @click="getCode"
>获取验证码</span
>
<span v-show="!show" class="count">{{ count }} s</span>
</div>
</el-form-item>
<el-form-item prop="password">
<img class="img_l" src="@/assets/img/reset/password.png" alt=""/>
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<el-input
v-model="registerForm.password"
:type="isShowPwd ? 'password' : 'text'"
......@@ -58,7 +60,7 @@
/>
</el-form-item>
<el-form-item prop="rq_password">
<img class="img_l" src="@/assets/img/reset/password.png" alt=""/>
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<el-input
v-model="registerForm.rq_password"
placeholder="请再次输入登录密码"
......@@ -80,16 +82,16 @@
</template>
<script>
/* eslint-disable */
// 请求接口
import {registerCode, setAccountInfo} from "r/index/register";
import {mobileCheck} from "@/common/utils.js";
/* eslint-disable */
// 请求接口
import { registerCode, setAccountInfo } from "r/index/register";
import { mobileCheck } from "@/common/utils.js";
export default {
export default {
name: "index-register",
data() {
const pwdCheck = async (rule, value, callback) => {
if (value !== this.stepForm.password) {
if (value !== this.registerForm.password) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
......@@ -111,7 +113,7 @@
registerRules: {
// 对手机号进行校验
phone: [
{required: true, message: "请输入手机号", trigger: "blur"},
{ required: true, message: "请输入手机号", trigger: "blur" },
{
validator: function (rule, value, callback) {
if (mobileCheck(value) === false) {
......@@ -125,17 +127,17 @@
],
// 对验证码进行校验
code: [
{required: true, message: "请输入验证码", trigger: "blur"},
{min: 6, max: 20, message: "请输入正确的验证码", trigger: "blur"},
{ required: true, message: "请输入验证码", trigger: "blur" },
{ min: 6, max: 20, message: "请输入正确的验证码", trigger: "blur" },
],
// 对密码进行校验
password: [
{required: true, message: "请输入密码", trigger: "blur"},
{min: 6, max: 20, message: "请输入正确的密码", trigger: "blur"},
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "请输入正确的密码", trigger: "blur" },
],
// 对密码进行校验
rq_password: [
{required: true, message: "请输入确认密码", trigger: "blur"},
{ required: true, message: "请输入确认密码", trigger: "blur" },
{
validator: pwdCheck,
trigger: "blur",
......@@ -150,7 +152,7 @@
methods: {
// 去注册
toLogin() {
this.$router.replace({name: "index-login"});
this.$router.replace({ name: "index-login" });
},
// 改变密码显示状态
changePwdStatus() {
......@@ -158,8 +160,8 @@
},
// 获取手机验证短信
getCode() {
if(!this.registerForm.phone){
return this.$message.error('请输入手机号');
if (!this.registerForm.phone) {
return this.$message.error("请输入手机号");
}
// 倒计时60s
const TIME_COUNT = 60;
......@@ -181,14 +183,17 @@
phone: this.registerForm.phone,
}).then((res) => {
console.log(res);
if (res.code != 200) {
return this.$message.error(res.message);
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
})
this.$message.success(res.data.message);
});
},
// 表单验证
submitForm() {
this.$refs["registerFormRef"].validate((valid) => {
if (!valid) return;
setAccountInfo({
phone: this.registerForm.phone,
code: this.registerForm.code,
......@@ -199,17 +204,20 @@
if (res.code != 200) {
return this.$message.error(res.message);
}
// this.$router.replace({ name: "" });
this.$message.success(res.message);
// token存储
window.localStorage.setItem("index-token", res.token);
this.$router.replace({ name: "index-signUp" });
});
});
}
},
};
},
};
</script>
<style scoped lang="scss">
// 内容区域
.box_content {
// 内容区域
.box_content {
.content {
max-width: 1150px;
margin: 40px auto;
......@@ -309,10 +317,10 @@
}
}
}
}
}
// 注册输入
.container {
// 注册输入
.container {
width: 440px;
// height: 640px;
background: #ffffff;
......@@ -419,7 +427,6 @@
padding: 0;
margin: 30px 0 0 0;
}
}
}
......@@ -443,23 +450,23 @@
}
}
}
}
}
@media screen and (max-width: 1601px) {
@media screen and (max-width: 1601px) {
.container {
right: 18%;
}
}
}
@media screen and (max-width: 1501px) {
@media screen and (max-width: 1501px) {
.container {
right: 16%;
}
}
}
@media screen and (max-width: 1401px) {
@media screen and (max-width: 1401px) {
.container {
right: 14%;
}
}
}
</style>
......@@ -2,80 +2,75 @@
<div>
<div style="border: none">
<div class="container">
<div class="title">重置密码</div>
<div class="title">忘记密码</div>
<div class="line"></div>
<el-form
:model="loginForm"
:rules="loginFormRules"
ref="loginFormRef"
class="demo-ruleForm"
:model="resetForm"
:rules="resetRules"
ref="resetFormRef"
class="demo-resetForm"
>
<el-form-item prop="username">
<img
class="img_l"
src="../../../assets/img/reset/username.png"
alt=""
/>
<el-form-item prop="phone">
<img class="img_l" src="@/assets/img/reset/username.png" alt="" />
<el-input
v-model="loginForm.username"
v-model="resetForm.phone"
placeholder="请输入手机号"
maxlength="20"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item prop="username">
<img
class="img_l"
src="../../../assets/img/reset/code.png"
alt=""
/>
<el-form-item prop="code">
<img class="img_l" src="@/assets/img/reset/code.png" alt="" />
<el-input
v-model="loginForm.username"
v-model="resetForm.code"
placeholder="请输入短信验证码"
maxlength="20"
autocomplete="off"
></el-input>
<!-- 短信验证码 -->
<div class="phoneCode">
<span class="code" v-show="show" @click="getCode"
>获取验证码</span
>
<span v-show="!show" class="count">{{ count }} s</span>
</div>
</el-form-item>
<el-form-item prop="password">
<img
class="img_l"
src="../../../assets/img/reset//password.png"
alt=""
/>
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<el-input
v-model="loginForm.password"
v-model="resetForm.password"
:type="isShowPwd ? 'password' : 'text'"
maxlength="20"
placeholder="设置密码:6-12位字符,包含字母或数字"
:autocomplete="isShowPwd ? 'new-password' : 'off'"
></el-input>
<img
@click="changePwdStatus()"
v-if="!isShowPwd"
class="img_r"
src="../../../assets/img/reset//eye01.png"
src="@/assets/img/reset/eye01.png"
alt=""
/>
<img
@click="changePwdStatus()"
v-if="isShowPwd"
class="img_r"
src="../../../assets/img/reset/eye01.png"
src="@/assets/img/reset/eye01.png"
alt=""
/>
</el-form-item>
<el-form-item prop="password">
<img
class="img_l"
src="../../../assets/img/reset/password.png"
alt=""
/>
<el-form-item prop="rq_password">
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<el-input
v-model="loginForm.username"
placeholder="请再次输入登录密码"
v-model="resetForm.rq_password"
placeholder="请再次输入新的登录密码"
maxlength="20"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item style="margin: 40px 0 0 0"></el-form-item>
<el-form-item>
<el-button @click="submitForm()"> 重置密码 </el-button>
<el-button @click="submitForm()"> 重置密码</el-button>
</el-form-item>
<div class="box">
<div class="fr" @click="toLogin()">已有账号?马上登录</div>
......@@ -88,49 +83,74 @@
<script>
/* eslint-disable */
// import { authMixin } from 'mixins/admin/auth'
import { login } from "../../../request/index/login";
// 请求接口
import { passwordCode } from "r/index/register";
import { changePassCode } from "r/index/login";
import { mobileCheck } from "@/common/utils.js";
export default {
name: "index-reset",
data() {
const pwdCheck = async (rule, value, callback) => {
if (value !== this.resetForm.password) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return {
// 手机验证短信
show: true,
count: "",
timer: null,
isShowPwd: true, // 控制密码显示隐藏
loginForm: {
username: "",
resetForm: {
phone: "",
code: "",
password: "",
rq_password: "",
},
// 表单验证规则对象
loginFormRules: {
// 对用户名进行校验
username: [
{ required: true, message: "请输入用户名", trigger: "blur" },
{ min: 4, max: 20, message: "请输入正确的用户名", trigger: "blur" },
resetRules: {
// 对手机号进行校验
phone: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{
validator: function (rule, value, callback) {
if (mobileCheck(value) === false) {
callback(new Error("请输入正确的手机号"));
} else {
callback();
}
},
trigger: "blur",
},
],
// 对验证码进行校验
code: [
{ required: true, message: "请输入验证码", trigger: "blur" },
{ min: 6, max: 20, message: "请输入正确的验证码", trigger: "blur" },
],
// 对密码进行校验
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "请输入正确的密码", trigger: "blur" },
],
// 对密码进行校验
rq_password: [
{ required: true, message: "请输入确认密码", trigger: "blur" },
{
validator: pwdCheck,
trigger: "blur",
},
dialogFormFu: {
title: "",
message: "",
],
},
dialogVisibleFu: false,
};
},
created() {
this.$emit("getStatus", false);
},
methods: {
// 子组件触发,关闭弹框
closeDialog(value, type) {
this.dialogVisibleFu = value;
if (type) {
this.$router.replace({ name: "StepOne" });
}
},
// 去注册
toLogin() {
this.$router.replace({ name: "index-login" });
......@@ -139,60 +159,57 @@ export default {
changePwdStatus() {
this.isShowPwd = !this.isShowPwd;
},
// 表单验证
submitForm() {
this.$refs.loginFormRef.validate(async (valid) => {
// 验证用户名和密码是否符合规定
if (!valid) return;
// 发送请求的操作
const { data: res } = await login(this.loginForm);
console.log(res, "返回用户注册数据");
// 根据返回的状态码做想关的判断
if (res.code !== 200) {
return this.$message.error(res.message);
}
// 判断用户注册是否填写信息完整
const applicationstatus = parseInt(res.applicationstatus);
const can_skip = parseInt(res.can_skip);
window.localStorage.setItem("applicationstatus", res.applicationstatus);
window.localStorage.setItem("can_skip", res.can_skip);
window.localStorage.setItem("is_check_id_card", res.is_check_id_card);
console.log(!can_skip);
if (!can_skip) {
if (applicationstatus == 0) {
window.localStorage.setItem("sfzNum", res.sfzNum);
this.$router.replace({
name: "StepOne",
query: { applicationstatus: "0", data: res },
});
return;
} else if (
applicationstatus == 3 ||
applicationstatus == 4 ||
applicationstatus == 5 ||
applicationstatus == 6
) {
window.localStorage.setItem("index-token", res.token);
this.$store.state.token = res.token;
window.localStorage.setItem("student_id", res.student_id);
window.localStorage.setItem("sfzNum", res.sfzNum);
window.localStorage.setItem("username", res.username);
if (res.is_check_id_card != 1) {
this.$router.replace({ name: "StepTwo" });
// 获取手机验证短信
getCode() {
if (!this.resetForm.phone) {
return this.$message.error("请输入手机号");
}
// 倒计时60s
const TIME_COUNT = 60;
if (!this.timer) {
this.count = TIME_COUNT;
this.show = false;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--;
} else {
this.$router.replace({ name: "StepThree" });
this.show = true;
clearInterval(this.timer);
this.timer = null;
}
return;
}, 1000);
}
// 接口获得验证码
passwordCode({
phone: this.resetForm.phone,
}).then((res) => {
console.log(res);
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$store.state.token = res.token;
this.$message.success(res.data.message);
});
},
// 表单验证
submitForm() {
this.$refs["resetFormRef"].validate((valid) => {
if (!valid) return;
changePassCode({
phone: this.resetForm.phone,
code: this.resetForm.code,
password: this.resetForm.password,
rq_password: this.resetForm.rq_password,
}).then((res) => {
console.log(res);
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$message.success(res.data.message);
// token存储
window.localStorage.setItem("index-token", res.token);
window.localStorage.setItem("student_id", res.student_id);
window.localStorage.setItem("sfzNum", res.sfzNum);
window.localStorage.setItem("username", res.username);
this.$router.replace({ name: "examlist" });
this.$router.replace({ name: "index-login" });
});
});
},
},
......@@ -207,9 +224,11 @@ export default {
margin: 40px auto;
padding: 0 50px;
overflow: auto;
.floatL {
float: left;
width: 670px;
h3 {
font-size: 20px;
color: #4c4c4c;
......@@ -218,40 +237,48 @@ export default {
margin-bottom: 23px;
border-bottom: 4px solid #e0823d;
}
ul {
li {
height: 40px;
line-height: 40px;
border-bottom: 1px solid #ddd;
a {
display: inline-block;
width: 100%;
font-size: 16px;
color: #34538b;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
}
.ContentLReg {
height: 60px;
color: #333333;
font-size: 14px;
span {
cursor: pointer;
color: #563279;
font-weight: bold;
&:hover {
text-decoration: underline;
}
}
}
.img_box {
width: 100%;
height: 156px;
text-align: center;
img {
&:nth-child(1) {
margin-right: 40px;
......@@ -259,12 +286,15 @@ export default {
}
}
}
.floatR {
float: right;
width: 374px;
ul {
margin-top: 36px;
margin-left: 87px;
li {
font-size: 16px;
width: 100%;
......@@ -289,6 +319,8 @@ export default {
}
}
}
// 注册输入
.container {
width: 440px;
// height: 640px;
......@@ -298,12 +330,11 @@ export default {
position: absolute;
top: 50%;
right: 18%;
// left: 10%;
transform: translate(0, -50%);
padding: 60px;
margin-top: 0;
// background: url("../../../assets/images/loginbgp.png") no-repeat 0 center;
overflow: hidden;
.title {
margin: 19px 0 6px 0;
width: 132px;
......@@ -313,24 +344,43 @@ export default {
color: #60194a;
line-height: 20px;
}
.line {
width: 48px;
height: 3px;
background: #60194a;
border-radius: 2px;
}
::v-deep .el-input__inner {
border: 1px solid #ffff;
}
.el-form {
::v-deep .el-form {
margin-top: 60px;
.el-form-item {
position: relative;
margin-bottom: 30px;
&:last-child {
margin: 0;
}
.el-form-item__content {
position: relative;
.phoneCode {
position: absolute;
z-index: 999;
top: 50%;
right: 25px;
transform: translate(0, -50%);
cursor: pointer;
.code {
font-size: 14px;
font-weight: 600;
color: #60194a;
}
}
img.img_l {
position: absolute;
left: 25px;
......@@ -338,6 +388,7 @@ export default {
transform: translate(-50%, -50%);
z-index: 1000;
}
img.img_r {
position: absolute;
right: 15px;
......@@ -345,20 +396,25 @@ export default {
transform: translate(0, -50%);
z-index: 1000;
}
::v-deep .el-input__inner {
.el-input__inner {
height: 50px;
line-height: 50px;
padding: 0 10px 0 50px;
border-radius: 0;
color: #4d4d4d;
border: 0;
border-bottom: 2px solid #d9d9d9;
&:focus {
border-bottom-color: #563279;
}
}
::v-deep .el-form-item__error {
.el-form-item__error {
color: #e0823d;
}
.el-button {
width: 100%;
height: 60px;
......@@ -373,9 +429,12 @@ export default {
margin: 30px 0 0 0;
}
}
}
.box {
height: 18px;
display: block;
.fr {
// float: left;
text-align: center;
......@@ -384,6 +443,7 @@ export default {
color: #999999;
margin-top: -10px;
cursor: pointer;
&:hover {
color: #563279;
text-decoration: underline;
......@@ -392,16 +452,19 @@ export default {
}
}
}
@media screen and (max-width: 1601px) {
.container {
right: 18%;
}
}
@media screen and (max-width: 1501px) {
.container {
right: 16%;
}
}
@media screen and (max-width: 1401px) {
.container {
right: 14%;
......
......@@ -23,8 +23,8 @@ module.exports = {
// host: 'localhost',
// port: 8080, // 端口号
// https: true, // https:{type:Boolean}
open: true, // 配置自动启动浏览器
hotOnly: true, // 热更新
// open: true, // 配置自动启动浏览器
// hotOnly: true, // 热更新
// // proxy: {
// // "/api": {
// // target: "http://127.0.0.1:8080/",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment