Commit 2ed149c4 authored by wuwangwolihui's avatar wuwangwolihui

Merge remote-tracking branch 'origin/yingdi2.0' into yingdi2.0

parents 3fb8146d b4eded4d
......@@ -74,18 +74,15 @@
},
// 去个人中心
toCenter() {
let code = this.$store.state.indexIdentity;
this.$router.replace("/signUp/examInfo?code=" + code);
this.$router.replace("/signUpList");
},
// 去注册
toRegister() {
let code = this.$store.state.indexIdentity;
this.$router.push("/register?code=" + code);
this.$router.push("/baseRegister" );
},
// 去登录页
toLogin() {
let code = this.$store.state.indexIdentity;
this.$router.push("/login?code=" + code);
this.$router.push("/baseLogin");
},
// 退出登录
async logout() {
......
......@@ -8,7 +8,7 @@ import store from '@/store'
export function login(data) {
return request({
method: 'post',
url: '/web/auth/login',
url: '/modules-campsite/web/auth/login',
params: data
})
}
......
export default [{
path: '/signUpList',
name: 'signUpList',
component: () => import(/* webpackChunkName: "login" */ 'v/base/myInfo/signUp.vue'),
meta: {
title: '我的报名'
}
},
]
......@@ -209,8 +209,8 @@ router.beforeEach((to, from, next) => {
toBaseReset = "/baseReset",
toHome = "/home",
toActive = "/active";
let toMyInfo;
toMyInfo = "/myInfo";
let toInfo;
toInfo = "/myInfo";
let code = false;
document.title = to.meta.title;
if (to.path == toLogin || to.path == toRegister || to.path == toReset) {
......@@ -227,7 +227,7 @@ router.beforeEach((to, from, next) => {
// }
// });
return next();
} else if (to.path == toBaseLogin ||to.path == toBaseRegister ||to.path == toBaseReset || to.path == toMyInfo || to.path == toHome || to.path == toActive || to.path.indexOf(toActive) != -1) {
} else if (to.path == toBaseLogin ||to.path == toBaseRegister ||to.path == toBaseReset || to.path == toInfo || to.path == toHome || to.path == toActive || to.path.indexOf(toActive) != -1) {
return next();
} else if (to.name == "recruit") {
code = to.params.code;
......
<template>
<div class="home-container">
<div>
<el-carousel height="300px">
<div class="bannerImg">
<el-carousel :height="bannerHeight+'px'">
<el-carousel-item :key="index" v-for="(item,index) in bannerlist">
<img :src="item.url" class="small" style="width: 100%;"/>
</el-carousel-item>
</el-carousel>
</div>
<div class="com-container home_content">
<div class="com-container home_content">
<!-- 热门活动 -->
<div >
<div>
<div class="home_title">
热门活动
</div>
......@@ -86,16 +86,18 @@
<script>
import img from "../../../assets/img/recruit.png";
import banner from "../../../assets/img/Banner/banner@2x.png";
import banner1 from "../../../assets/img/Banner/banner1.jpg";
import banner2 from "../../../assets/img/Banner/banner2.jpg";
export default {
name: "Home",
data() {
return {
bannerHeight: "",
bannerlist: [{
url: banner
url: banner1
}, {
url: banner
url: banner2
}],
activeList: [
{
......@@ -197,6 +199,17 @@
}]
};
},
mounted() {
// 首次加载时,初始化高度
this.screenWidth = window.innerWidth
this.bannerHeight = 600 / 1550 * this.screenWidth
// 窗口大小发生改变
window.onresize = () => {
this.screenWidth = window.innerWidth
this.bannerHeight = 600 / 1550 * this.screenWidth
}
},
}
</script>
......@@ -231,6 +244,13 @@
}
}
.bannerImg {
img {
width: 100%;
height: inherit;
}
}
.active-list {
margin-top: 30px;
display: flex;
......@@ -390,9 +410,11 @@
color: #333333;
font-family: "PingFang SC";
}
.home_content{
.home_content {
padding: 50px;
}
.line {
align-items: center;
......
......@@ -27,7 +27,7 @@
</script>
<style lang="scss" scoped>
@media (min-width: 1024px) {
@media screen and (max-width: 1500px) {
.login-index .big-right .info-box {
width: 32%!important;
top: 60%!important;
......
......@@ -288,14 +288,11 @@
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
// this.$message.success("登录成功");
// 跳转到报名
// token存储
window.localStorage.setItem("base-token", res.data.token);
// this.$message.success("登录成功");请访问正确的营地链接地址
window.localStorage.setItem("index-token-all", res.data.token);
window.localStorage.setItem("phone", this.loginForm.phone);
window.localStorage.setItem("email", res.data.email);
// 报名信息
this.$router.replace("/signUpList");
this.$router.replace("/myInfo");
});
});
},
......@@ -305,8 +302,6 @@
<style lang="scss" scoped>
@media screen and (max-width: 1500px){
.container {
height: 300px !important;
padding: 30px 37px 70px 37px!important;
......@@ -325,8 +320,30 @@
}
::v-deep .el-form {
margin-top: 20px !important;
margin-top: 25px !important;
.el-form-item {
/*margin-bottom: 25px !important;*/
.el-form-item__content {
img.img_l {
width: 24px !important;
}
.el-input {
font-size: 12px !important;
}
.el-input__inner {
height: 40px !important;
}
.el-button {
font-size: 15px !important;
/*margin-top:10px !important;*/
height: 50px !important;
line-height: 50px !important;
}}
}
}
}
......
......@@ -7,15 +7,15 @@
<el-form
:model="registerForm"
:rules="registerRules"
ref="registerFormRef"
class="demo-registerForm"
ref="registerFormRef"
>
<el-form-item prop="phone">
<img class="img_l" src="@/assets/img/reset/username.png" alt="" />
<img alt="" class="img_l" src="@/assets/img/reset/username.png"/>
<el-input
v-model="registerForm.phone"
placeholder="请输入手机号"
maxlength="11"
placeholder="请输入手机号"
v-model="registerForm.phone"
></el-input>
</el-form-item>
......@@ -29,11 +29,11 @@
></el-input>
</el-form-item> -->
<el-form-item prop="code">
<img class="img_l" src="@/assets/img/reset/code.png" alt="" />
<img alt="" class="img_l" src="@/assets/img/reset/code.png"/>
<el-input
v-model="registerForm.code"
placeholder="请输入短信验证码"
maxlength="20"
placeholder="请输入短信验证码"
v-model="registerForm.code"
></el-input>
<!-- 短信验证码 -->
......@@ -54,19 +54,19 @@
></el-input> -->
<!-- 短信验证码 -->
<div class="phoneCode">
<span class="code" v-show="showCode" @click="getCode"
<span @click="getCode" class="code" v-show="showCode"
>获取验证码</span
>
<span v-show="!showCode" class="count">{{ count }} s</span>
<span class="count" v-show="!showCode">{{ count }} s</span>
</div>
</el-form-item>
<el-form-item prop="password">
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<img alt="" class="img_l" src="@/assets/img/reset/password.png"/>
<el-input
v-model="registerForm.password"
:autocomplete="isShowPwd ? 'new-password' : 'off'"
maxlength="20"
placeholder="设置密码:6-12位字符,包含字母或数字"
:autocomplete="isShowPwd ? 'new-password' : 'off'"
v-model="registerForm.password"
></el-input>
<!-- <img
@click="changePwdStatus()"
......@@ -84,11 +84,11 @@
/> -->
</el-form-item>
<el-form-item prop="rq_password">
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<img alt="" class="img_l" src="@/assets/img/reset/password.png"/>
<el-input
v-model="registerForm.rq_password"
placeholder="请再次输入登录密码"
maxlength="20"
placeholder="请再次输入登录密码"
v-model="registerForm.rq_password"
></el-input>
</el-form-item>
......@@ -97,7 +97,7 @@
<el-button @click="submitForm()"> 注册</el-button>
</el-form-item>
<div class="box">
<div class="fr" @click="toLogin()">已有账号?马上登录</div>
<div @click="toLogin()" class="fr">已有账号?马上登录</div>
</div>
</el-form>
</div>
......@@ -107,14 +107,9 @@
<script>
/* eslint-disable */
import {
registerCode,
setAccountInfo,
registerEmailCode,
} from "r/base/register";
import { mobileCheck, checkStrong } from "@/common/utils.js";
import validator from "common/validator";
import { intervalTime } from "store/time";
import {registerCode, setAccountInfo,} from "r/base/register";
import {mobileCheck} from "@/common/utils.js";
import {intervalTime} from "store/time";
export default {
name: "base-register",
......@@ -146,7 +141,7 @@
registerRules: {
// 对手机号进行校验
phone: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{required: true, message: "请输入手机号", trigger: "blur"},
{
validator: function (rule, value, callback) {
if (mobileCheck(value) === false) {
......@@ -168,8 +163,8 @@
// ],
// 对验证码进行校验
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: [
......@@ -206,7 +201,7 @@
],
// 对密码进行校验
rq_password: [
{ required: true, message: "请输入确认密码", trigger: "blur" },
{required: true, message: "请输入确认密码", trigger: "blur"},
{
validator: pwdCheck,
trigger: "blur",
......@@ -216,7 +211,7 @@
};
},
created() {
const endTime = window.localStorage.getItem("register_code_time" );
const endTime = window.localStorage.getItem("register_code_time");
if (endTime && Number(endTime) > new Date().getTime()) {
this.resetForm.phone = phone;
this.intervalHandle(new Date(), Number(endTime));
......@@ -271,7 +266,7 @@
this.codeTime = res.data.data.now * 1000;
// console.log(this.codeTime)
window.localStorage.setItem(
"register_code_time" ,
"register_code_time",
res.data.data.now * 1000
);
this.intervalHandle(new Date(), res.data.data.now * 1000);
......@@ -295,18 +290,18 @@
}
// this.$message.success(res.data.message);
// token存储
window.localStorage.setItem("index-token" , res.data.token);
window.localStorage.setItem("phone" , this.registerForm.phone);
window.localStorage.setItem("index-token", res.data.token);
window.localStorage.setItem("phone", this.registerForm.phone);
// window.localStorage.setItem("email" + code, this.registerForm.email);
// 报名信息
window.localStorage.setItem("camp_name" , res.data.cam.name);
window.localStorage.setItem("camp_name", res.data.cam.name);
//获取主题色
window.localStorage.setItem(
"system_color" ,
"system_color",
res.data.cam.system_color
);
// 跳转到报名
this.$router.replace("/signUpList" );
this.$router.replace("/signUpList");
});
});
},
......@@ -314,7 +309,46 @@
};
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
@media screen and (max-width: 1500px) {
.container {
padding: 30px 50px 20px 50px !important;
.title {
font-size: 20px !important;
}
::v-deep .el-form {
margin-top: 20px !important;
.el-form-item {
margin-bottom: 20px !important;
.el-form-item__content {
img.img_l {
width: 24px !important;
}
.el-input {
font-size: 12px !important;
}
.el-input__inner {
height: 40px !important;
}
.el-button {
font-size: 15px !important;
margin: 0 !important;
height: 42px !important;
line-height: 50px !important;
}
}
}
}
}
}
// 注册输入
.container {
background: #ffffff;
......@@ -433,6 +467,7 @@
color: #999999;
margin-top: -10px;
cursor: pointer;
&:hover {
color: var(--color);
text-decoration: underline;
......
......@@ -302,6 +302,44 @@
</script>
<style scoped lang="scss">
@media screen and (max-width: 1500px) {
.container {
padding: 30px 50px 20px 50px !important;
.title {
font-size: 20px !important;
}
::v-deep .el-form {
margin-top: 20px !important;
.el-form-item {
margin-bottom: 20px !important;
.el-form-item__content {
img.img_l {
width: 24px !important;
}
.el-input {
font-size: 12px !important;
}
.el-input__inner {
height: 40px !important;
}
.el-button {
font-size: 15px !important;
margin: 0 !important;
height: 42px !important;
line-height: 50px !important;
}
}
}
}
}
}
// 注册输入
.container {
background: #ffffff;
......
......@@ -2,7 +2,6 @@
<div class="signUp">
<el-tabs @tab-click="handleClick" v-model="activeName">
<el-tab-pane label="正在报名" name="1">
111
</el-tab-pane>
<el-tab-pane label="即将开营" name="2">
......@@ -26,7 +25,6 @@
<el-tab-pane label="已结营" name="4">已结营</el-tab-pane>
<el-tab-pane label="已退营" name="5">已退营</el-tab-pane>
</el-tabs>
</div>
</template>
......
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