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

修改

parent 0d845aa4
...@@ -21,16 +21,30 @@ ...@@ -21,16 +21,30 @@
> >
</div> </div>
<div class="btn"> <div class="btn">
<el-button @click="next()">下一步</el-button> <el-button :disabled='!checked' @click="next()">下一步</el-button>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */ /* eslint-disable */
export default { export default {
name: "Confirm", 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> </script>
......
...@@ -3,8 +3,10 @@ import { ...@@ -3,8 +3,10 @@ import {
request request
} from './network' } from './network'
const identity = localStorage.getItem('index-identity')
// 登录 // 登录
export function login(data) { export function login(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/auth/login', url: '/web/auth/login',
...@@ -15,6 +17,7 @@ export function login(data) { ...@@ -15,6 +17,7 @@ export function login(data) {
// 退出 // 退出
export function logout(data) { export function logout(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/auth/loginOut', url: '/web/auth/loginOut',
...@@ -24,6 +27,7 @@ export function logout(data) { ...@@ -24,6 +27,7 @@ export function logout(data) {
// 通过旧密码找回密码 // 通过旧密码找回密码
export function changePassOld(data) { export function changePassOld(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/auth/changePassOld', url: '/web/auth/changePassOld',
...@@ -33,6 +37,7 @@ export function changePassOld(data) { ...@@ -33,6 +37,7 @@ export function changePassOld(data) {
// 通过验证码找回密码 // 通过验证码找回密码
export function changePassCode(data) { export function changePassCode(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/auth/changePassCode', url: '/web/auth/changePassCode',
......
...@@ -11,10 +11,17 @@ export function registerCode(data) { ...@@ -11,10 +11,17 @@ export function registerCode(data) {
return request({ return request({
method: 'post', method: 'post',
url: '/web/code/registerCode', 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) { export function setAccountInfo(data) {
......
...@@ -3,8 +3,10 @@ import { ...@@ -3,8 +3,10 @@ import {
request request
} from './network' } from './network'
const identity = localStorage.getItem('index-identity')
// 报名初始化 // 报名初始化
export function signUpInit(data) { export function signUpInit(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/signUp/signUpInit', url: '/web/signUp/signUpInit',
...@@ -14,6 +16,7 @@ export function signUpInit(data) { ...@@ -14,6 +16,7 @@ export function signUpInit(data) {
// 确认报名须知 // 确认报名须知
export function setSignShould(data) { export function setSignShould(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/signUp/setSignShould', url: '/web/signUp/setSignShould',
...@@ -23,6 +26,7 @@ export function setSignShould(data) { ...@@ -23,6 +26,7 @@ export function setSignShould(data) {
// 页面个人获取 // 页面个人获取
export function getAccount(data) { export function getAccount(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/signUp/getAccount', url: '/web/signUp/getAccount',
...@@ -32,6 +36,7 @@ export function getAccount(data) { ...@@ -32,6 +36,7 @@ export function getAccount(data) {
// 获取学习成绩证明材料上传图片 // 获取学习成绩证明材料上传图片
export function getAchievementOss(data) { export function getAchievementOss(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/signUp/getAchievementOss', url: '/web/signUp/getAchievementOss',
...@@ -41,6 +46,7 @@ export function getAchievementOss(data) { ...@@ -41,6 +46,7 @@ export function getAchievementOss(data) {
// 页面个人信息保存 // 页面个人信息保存
export function setAccount(data) { export function setAccount(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/signUp/setAccount', url: '/web/signUp/setAccount',
...@@ -50,6 +56,7 @@ export function setAccount(data) { ...@@ -50,6 +56,7 @@ export function setAccount(data) {
// 获取报名省份城市 // 获取报名省份城市
export function getProAndCity(data) { export function getProAndCity(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/signUp/getProAndCity', url: '/web/signUp/getProAndCity',
...@@ -59,6 +66,7 @@ export function getProAndCity(data) { ...@@ -59,6 +66,7 @@ export function getProAndCity(data) {
// 获取报名学校 // 获取报名学校
export function getSchool(data) { export function getSchool(data) {
data['identity'] = identity;
return request({ return request({
method: 'post', method: 'post',
url: '/web/signUp/getSchool', url: '/web/signUp/getSchool',
......
...@@ -38,10 +38,10 @@ const routes = [{ ...@@ -38,10 +38,10 @@ const routes = [{
} }
] ]
// const originalPush = VueRouter.prototype.push const originalPush = VueRouter.prototype.push
// VueRouter.prototype.push = function push (location) { VueRouter.prototype.push = function push (location) {
// return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
// } }
const router = new VueRouter({ const router = new VueRouter({
mode: 'history', mode: 'history',
......
export default [{ export default [{
path: '/signUp', path: '/signUp/:type',
name: 'index-signUp', name: 'index-signUp',
component: () => import(/* webpackChunkName: "login" */ 'v/index/camp/SignUp.vue'), component: () => import(/* webpackChunkName: "login" */ 'v/index/camp/SignUp.vue'),
meta: { meta: {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="cc flex"> <div class="cc flex">
<div class="camp_left"> <div class="camp_left">
<ul class="camp_left_box"> <ul class="camp_left_box">
<li @click="ToSignUp" :class="activeMenu == 0 ? 'active' : ''"> <li @click="ToSignUp" >
<img src="@/assets/img/signUp/icon-bm.png" />营地报名 <img src="@/assets/img/signUp/icon-bm.png" />营地报名
</li> </li>
<li @click="ToHomework"> <li @click="ToHomework">
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
<Breadcrumb> </Breadcrumb> <Breadcrumb> </Breadcrumb>
</div> </div>
</div> </div>
<Confirm> </Confirm> <Confirm v-if="type == 'examInfo'"> </Confirm>
<!-- <Invitation> </Invitation> --> <Invitation v-else-if="type == 'invitation'"> </Invitation>
<!-- <ReferInfo> </ReferInfo> --> <ReferInfo v-else-if="type == 'referInfo'"> </ReferInfo>
<!-- <Pass> </Pass> --> <Pass v-else-if="type == 'check'"> </Pass>
<!-- <Paying> </Paying> --> <Paying v-else-if="type == 'pay'"> </Paying>
</div> </div>
</template> </template>
...@@ -33,7 +33,13 @@ export default { ...@@ -33,7 +33,13 @@ export default {
Paying, Paying,
}, },
data() { data() {
return {}; return {
type: "examInfo",
};
},
created() {
this.type = this.$route.params.type;
console.log(this.$route);
}, },
}; };
</script> </script>
......
...@@ -108,17 +108,11 @@ export default { ...@@ -108,17 +108,11 @@ export default {
methods: { methods: {
// 忘记账号/密码 // 忘记账号/密码
forgetPwd() { forgetPwd() {
// window.localStorage.setItem("f_forgetpwd", 0);
this.$router.replace({ name: "index-reset" }); this.$router.replace({ name: "index-reset" });
}, },
// 去注册 // 去注册
register() { register() {
// this.dialogFormFu = {
// title: "提示",
// message: 1,
// };
// this.dialogVisibleFu = true;
this.$router.replace({ name: "index-register" }); this.$router.replace({ name: "index-register" });
}, },
// 改变密码显示状态 // 改变密码显示状态
...@@ -127,16 +121,21 @@ export default { ...@@ -127,16 +121,21 @@ export default {
}, },
// 登录 // 登录
submitForm() { submitForm() {
this.$refs["loginFormRef"].validate((valid) => {
if (!valid) return;
login({ login({
phone: this.loginForm.phone, phone: this.loginForm.phone,
password: this.loginForm.password, password: this.loginForm.password,
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
if (res.code != 200) { if (res.status != 200) {
return this.$message.error(res.message); return this.$message.error(res.message);
} }
this.$message.success("登录成功");
this.$router.replace({ name: "cerificateIndex" }); // token存储
window.localStorage.setItem("index-token", res.token);
this.$router.replace({ path: "/signUp/examInfo" });
});
}); });
}, },
}, },
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
class="demo-registerForm" class="demo-registerForm"
> >
<el-form-item prop="phone"> <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 <el-input
v-model="registerForm.phone" v-model="registerForm.phone"
placeholder="请输入手机号" placeholder="请输入手机号"
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code"> <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 <el-input
v-model="registerForm.code" v-model="registerForm.code"
placeholder="请输入短信验证码" placeholder="请输入短信验证码"
...@@ -29,12 +29,14 @@ ...@@ -29,12 +29,14 @@
></el-input> ></el-input>
<!-- 短信验证码 --> <!-- 短信验证码 -->
<div class="phoneCode"> <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> <span v-show="!show" class="count">{{ count }} s</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <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 <el-input
v-model="registerForm.password" v-model="registerForm.password"
:type="isShowPwd ? 'password' : 'text'" :type="isShowPwd ? 'password' : 'text'"
...@@ -58,7 +60,7 @@ ...@@ -58,7 +60,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item prop="rq_password"> <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 <el-input
v-model="registerForm.rq_password" v-model="registerForm.rq_password"
placeholder="请再次输入登录密码" placeholder="请再次输入登录密码"
...@@ -80,16 +82,16 @@ ...@@ -80,16 +82,16 @@
</template> </template>
<script> <script>
/* eslint-disable */ /* eslint-disable */
// 请求接口 // 请求接口
import {registerCode, setAccountInfo} from "r/index/register"; import { registerCode, setAccountInfo } from "r/index/register";
import {mobileCheck} from "@/common/utils.js"; import { mobileCheck } from "@/common/utils.js";
export default { export default {
name: "index-register", name: "index-register",
data() { data() {
const pwdCheck = async (rule, value, callback) => { const pwdCheck = async (rule, value, callback) => {
if (value !== this.stepForm.password) { if (value !== this.registerForm.password) {
callback(new Error("两次输入的密码不一致")); callback(new Error("两次输入的密码不一致"));
} else { } else {
callback(); callback();
...@@ -111,7 +113,7 @@ ...@@ -111,7 +113,7 @@
registerRules: { registerRules: {
// 对手机号进行校验 // 对手机号进行校验
phone: [ phone: [
{required: true, message: "请输入手机号", trigger: "blur"}, { required: true, message: "请输入手机号", trigger: "blur" },
{ {
validator: function (rule, value, callback) { validator: function (rule, value, callback) {
if (mobileCheck(value) === false) { if (mobileCheck(value) === false) {
...@@ -125,17 +127,17 @@ ...@@ -125,17 +127,17 @@
], ],
// 对验证码进行校验 // 对验证码进行校验
code: [ code: [
{required: true, message: "请输入验证码", trigger: "blur"}, { required: true, message: "请输入验证码", trigger: "blur" },
{min: 6, max: 20, message: "请输入正确的验证码", trigger: "blur"}, { min: 6, max: 20, message: "请输入正确的验证码", trigger: "blur" },
], ],
// 对密码进行校验 // 对密码进行校验
password: [ password: [
{required: true, message: "请输入密码", trigger: "blur"}, { required: true, message: "请输入密码", trigger: "blur" },
{min: 6, max: 20, message: "请输入正确的密码", trigger: "blur"}, { min: 6, max: 20, message: "请输入正确的密码", trigger: "blur" },
], ],
// 对密码进行校验 // 对密码进行校验
rq_password: [ rq_password: [
{required: true, message: "请输入确认密码", trigger: "blur"}, { required: true, message: "请输入确认密码", trigger: "blur" },
{ {
validator: pwdCheck, validator: pwdCheck,
trigger: "blur", trigger: "blur",
...@@ -150,7 +152,7 @@ ...@@ -150,7 +152,7 @@
methods: { methods: {
// 去注册 // 去注册
toLogin() { toLogin() {
this.$router.replace({name: "index-login"}); this.$router.replace({ name: "index-login" });
}, },
// 改变密码显示状态 // 改变密码显示状态
changePwdStatus() { changePwdStatus() {
...@@ -158,8 +160,8 @@ ...@@ -158,8 +160,8 @@
}, },
// 获取手机验证短信 // 获取手机验证短信
getCode() { getCode() {
if(!this.registerForm.phone){ if (!this.registerForm.phone) {
return this.$message.error('请输入手机号'); return this.$message.error("请输入手机号");
} }
// 倒计时60s // 倒计时60s
const TIME_COUNT = 60; const TIME_COUNT = 60;
...@@ -181,14 +183,17 @@ ...@@ -181,14 +183,17 @@
phone: this.registerForm.phone, phone: this.registerForm.phone,
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
if (res.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.message); return this.$message.error(res.data.message);
} }
}) this.$message.success(res.data.message);
});
}, },
// 表单验证 // 表单验证
submitForm() { submitForm() {
this.$refs["registerFormRef"].validate((valid) => {
if (!valid) return;
setAccountInfo({ setAccountInfo({
phone: this.registerForm.phone, phone: this.registerForm.phone,
code: this.registerForm.code, code: this.registerForm.code,
...@@ -199,17 +204,20 @@ ...@@ -199,17 +204,20 @@
if (res.code != 200) { if (res.code != 200) {
return this.$message.error(res.message); return this.$message.error(res.message);
} }
this.$message.success(res.message);
// this.$router.replace({ name: "" }); // token存储
window.localStorage.setItem("index-token", res.token);
this.$router.replace({ name: "index-signUp" });
});
}); });
}
}, },
}; },
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
// 内容区域 // 内容区域
.box_content { .box_content {
.content { .content {
max-width: 1150px; max-width: 1150px;
margin: 40px auto; margin: 40px auto;
...@@ -309,10 +317,10 @@ ...@@ -309,10 +317,10 @@
} }
} }
} }
} }
// 注册输入 // 注册输入
.container { .container {
width: 440px; width: 440px;
// height: 640px; // height: 640px;
background: #ffffff; background: #ffffff;
...@@ -419,7 +427,6 @@ ...@@ -419,7 +427,6 @@
padding: 0; padding: 0;
margin: 30px 0 0 0; margin: 30px 0 0 0;
} }
} }
} }
...@@ -443,23 +450,23 @@ ...@@ -443,23 +450,23 @@
} }
} }
} }
} }
@media screen and (max-width: 1601px) { @media screen and (max-width: 1601px) {
.container { .container {
right: 18%; right: 18%;
} }
} }
@media screen and (max-width: 1501px) { @media screen and (max-width: 1501px) {
.container { .container {
right: 16%; right: 16%;
} }
} }
@media screen and (max-width: 1401px) { @media screen and (max-width: 1401px) {
.container { .container {
right: 14%; right: 14%;
} }
} }
</style> </style>
This diff is collapsed.
...@@ -23,8 +23,8 @@ module.exports = { ...@@ -23,8 +23,8 @@ module.exports = {
// host: 'localhost', // host: 'localhost',
// port: 8080, // 端口号 // port: 8080, // 端口号
// https: true, // https:{type:Boolean} // https: true, // https:{type:Boolean}
open: true, // 配置自动启动浏览器 // open: true, // 配置自动启动浏览器
hotOnly: true, // 热更新 // hotOnly: true, // 热更新
// // proxy: { // // proxy: {
// // "/api": { // // "/api": {
// // target: "http://127.0.0.1:8080/", // // 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