Commit 616315fd authored by 杨梦雪's avatar 杨梦雪

11

parent 4485f594
......@@ -3,7 +3,35 @@
<router-view />
</div>
</template>
<script>
/* eslint-disable */
import { getCam } from "r/index/login";
export default {
name: "recruit",
data() {
return {};
},
created() {
window.localStorage.setItem(
"index-identity",
"c59086fdb37848e7a10765812d1da349"
);
this.getCam();
},
methods: {
getCam() {
getCam({}).then((res) => {
console.log(res, "getCam");
let root = document.querySelector(":root");
root.style.setProperty("--color", res.data.system_color);
root.style.setProperty("--bk_pic", res.data.background_picture); //当前营地的背景图
//当前营地logo
window.localStorage.setItem("system_logo", res.data.system_logo);
});
},
},
};
</script>
<style scoped lang="scss">
// @import "~a/css/base.css";
#app {
......
::v-deep .el-breadcrumb {
height: 20px;
margin: 14px 0 20px;
.el-breadcrumb__item {
.el-breadcrumb__inner,
.el-breadcrumb__separator {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 20px;
}
&:last-child .el-breadcrumb__inner {
color: #563279 !important;
}
}
}
\ No newline at end of file
// --color 相当于全局定义的一个css变量
// var(--color) 用于引用
// 在页面样式的引用中,你将会看到
:root {
--color: #60194a;
--bk_pic: #60194a;
--logo: #60194a;
}
\ No newline at end of file
......@@ -98,10 +98,10 @@ export default {
display: flex;
}
.speed-bg-color {
background-color: #60194a !important;
background-color:var(--color) !important;
}
.speed-text-color {
color: #60194a !important;
color: var(--color) !important;
}
.steps {
.step {
......
......@@ -3,7 +3,7 @@
<div class="H_content flex">
<div class="cc flex">
<div class="image">
<img src="../../assets/img/南开logo@2x.png" alt="" />
<img :src="system_logo" alt="" />
</div>
<div class="right">
<span @click="toLogin">登录</span>
......@@ -18,7 +18,13 @@
export default {
name: "Header",
data() {
return {};
return {
system_logo: "",
};
},
created() {
this.system_logo = localStorage.getItem("system_logo");
// console.log( this.system_logo)
},
methods: {
toLogin() {
......@@ -63,11 +69,11 @@ export default {
}
:last-child {
font-weight: 500;
color: #60194a;
color:var(--color);
line-height: 21px;
padding: 10px 36px;
border-radius: 4px;
border: 2px solid #60194a;
border: 2px solid var(--color);
margin-left: 50px;
}
}
......
......@@ -272,13 +272,13 @@ export default {
line-height: 14px;
span {
font-size: 13px !important;
color: #60194a;
color:var(--color);
}
}
:nth-child(2) {
font-size: 14px;
font-weight: 500;
color: #60194a;
color: var(--color);
line-height: 24px;
}
:nth-child(4) {
......
......@@ -112,7 +112,7 @@ export default {
::v-deep .el-dropdown-menu__item:hover {
color: #ffffff;
background-color: #563279;
background-color:var(--color);
}
::v-deep .el-message-box {
......@@ -124,8 +124,8 @@ export default {
}
.el-button--primary {
color: #fff;
background-color: #563279;
border-color: #563279;
background-color: var(--color);
border-color: var(--color);
}
}
}
......
......@@ -84,7 +84,7 @@ export default {
.el-button {
width: 200px;
height: 50px;
background: #60194a;
background: var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -267,7 +267,7 @@ export default {
.el-button {
width: 200px;
height: 50px;
background: #60194a;
background: var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -177,13 +177,13 @@ export default {
line-height: 14px;
span {
font-size: 13px !important;
color: #60194a;
color:var(--color);
}
}
:nth-child(2) {
font-size: 14px;
font-weight: 500;
color: #60194a;
color:var(--color);
line-height: 24px;
}
:nth-child(4) {
......@@ -193,7 +193,7 @@ export default {
line-height: 16px;
span {
font-size: 17px !important;
color: #60194a;
color:var(--color);
}
}
:nth-child(5) {
......
......@@ -151,12 +151,12 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机号" prop="phone">
<el-form-item label="手机号">
<el-input
v-model="referForm.phone"
placeholder="填写手机号"
v-model="phone"
placeholder="18355151517"
size="small"
clearable
:disabled="true"
/>
</el-form-item>
</el-col>
......@@ -355,7 +355,7 @@ export default {
nation: "",
start_school_date: "",
political_status: "",
phone: "",
// phone: "",
email: "",
school_province: "",
school_city: "",
......@@ -364,6 +364,7 @@ export default {
school_phone: "",
achievement_path: "",
},
phone: "",
schoolName: [],
referInfoRules: {
name: [
......@@ -400,10 +401,6 @@ export default {
political_status: [
{ required: true, message: "政治面貌不能为空!", trigger: "blur" },
],
phone: [
{ required: true, message: "手机号不能为空!", trigger: "blur" },
{ validator: validator.validatePhone, trigger: "blur" },
],
email: [
{ required: true, message: "邮箱不能为空!", trigger: "blur" },
{ validator: validator.validateEmail, trigger: "blur" },
......@@ -426,10 +423,11 @@ export default {
{ required: true, message: "请选择所在学校!", trigger: "change" },
],
school_contacts: [
{ required: true, message: "选择所在学校", trigger: "blur" },
{ required: true, message: "填写学校联系人", trigger: "blur" },
],
school_phone: [
{ required: true, message: "请选择所在学校!", trigger: "blur" },
{ required: true, message: "手机号不能为空!", trigger: "blur" },
{ validator: validator.validatePhone, trigger: "blur" },
],
},
selectProvince: [],
......@@ -500,6 +498,7 @@ export default {
};
},
created() {
this.phone = window.localStorage.getItem("phone");//本地取用户手机号
let signUpFile = window.localStorage.getItem(
"sign_up_file_" + window.localStorage.getItem("phone")
);
......@@ -831,11 +830,11 @@ export default {
background-color: #ffffff;
&:hover {
border-color: #60194a;
border-color:var(--color);
}
&:focus {
border-color: #60194a;
border-color:var(--color);
}
}
}
......@@ -853,19 +852,19 @@ export default {
line-height: 20px;
border-radius: 50%;
&:hover {
border-color: #60194a;
border-color:var(--color);
}
}
&.is-checked {
.el-radio__inner {
background: #ffffff !important;
border-color: #60194a;
border-color: var(--color);
&::after {
width: 7.5px;
height: 7.5px;
background: #60194a !important;
background: var(--color) !important;
}
}
}
......@@ -920,7 +919,7 @@ export default {
position: relative;
.el-icon-circle-plus {
font-size: 52px;
color: #60194a;
color:var(--color);
position: absolute;
top: 50%;
left: 50%;
......@@ -929,7 +928,7 @@ export default {
}
i {
font-size: 52px;
color: #60194a;
color:var(--color);
}
.text {
font-size: 14px;
......@@ -944,7 +943,7 @@ export default {
.el-button {
width: 200px;
height: 50px;
background: #60194a;
background:var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -4,6 +4,8 @@ import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/scss/index.scss'
Vue.config.productionTip = false
Vue.use(ElementUI)
......
......@@ -4,6 +4,16 @@ import {
} from './network'
const identity = localStorage.getItem('index-identity')
//登录前获取营地主题
export function getCam(data) {
data['identity'] = identity;
return request({
method: 'get',
url: '/web/auth/getCam',
params: data
})
}
// 登录
export function login(data) {
data['identity'] = identity;
......
......@@ -106,16 +106,16 @@ export function request(config) {
const loginUrl = '/web/auth/login';
const setAccountInfo = '/web/register/setAccountInfo';
const passMsgOld = '/web/auth/changePassOld';
const passMsgCode = '/web/auth/changePassCode';
const getCam = '/web/auth/getCam';
const registerCode = '/web/code/registerCode';
const passwordCode = '/web/code/passwordCode';
const loginOut = '/web/auth/loginOut';
// console.log(config)
console.log(config)
if (
config.url.indexOf(loginUrl) != -1 ||
config.url.indexOf(setAccountInfo) != -1 ||
config.url.indexOf(passMsgOld) != -1 ||
config.url.indexOf(passMsgCode) != -1 ||
config.url.indexOf(getCam) != -1 ||
config.url.indexOf(registerCode) != -1 ||
config.url.indexOf(passwordCode) != -1
) {
......
......@@ -47,7 +47,7 @@ export default {
return {
type: "examInfo",
status: "", //进度
statuss:''
// statuss:''
};
},
created() {
......@@ -74,7 +74,7 @@ export default {
statuss(val) {
console.log(val, "val");
// this.statuss = val;
this.signUpInit();
// this.signUpInit();
},
signUpInit() {
// console.log(111);
......
......@@ -15,6 +15,7 @@ export default {
},
created() {
this.$emit("getStatus", false);
},
};
</script>
......
......@@ -117,13 +117,10 @@ export default {
{
trigger: "blur",
validator: (rule, value, callback) => {
var passwordreg =/^[a-zA-Z0-9]{6,12}$/
var passwordreg = /^[a-zA-Z0-9]{6,12}$/;
// /(?=.*\d)(?=.*[a-zA-Z]).{6,12}/;
if (!passwordreg.test(value)) {
callback(
new Error("请输入6-12位,包含数字/字母,")
);
callback(new Error("请输入6-12位,包含数字/字母,"));
} else {
callback();
}
......@@ -135,10 +132,8 @@ export default {
},
created() {
this.$emit("getStatus", false);
window.localStorage.setItem(
"index-identity",
"c59086fdb37848e7a10765812d1da349"
);
},
methods: {
// 忘记账号/密码
......@@ -169,9 +164,14 @@ export default {
this.$message.success("登录成功");
// token存储
window.localStorage.setItem("index-token", res.data.token);
window.localStorage.setItem("phone", res.data.phone);
window.localStorage.setItem("phone", this.loginForm.phone,);
// 报名信息
window.localStorage.setItem("camp_name", res.data.cam.name);
//获取主题色
window.localStorage.setItem(
"system_color",
res.data.cam.system_color
);
// 跳转到报名
this.$router.push({ path: "/signUp/examInfo" });
});
......@@ -292,13 +292,13 @@ export default {
height: 20px;
font-size: 22px;
font-weight: 500;
color: #60194a;
color:var(--color);
line-height: 20px;
}
.line {
width: 48px;
height: 3px;
background: #60194a;
background:var(--color);
border-radius: 2px;
}
.el-form {
......@@ -342,7 +342,7 @@ export default {
.el-button {
width: 100%;
height: 60px;
background: #60194a;
background: var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -371,14 +371,14 @@ export default {
height: 20px;
font-size: 22px;
font-weight: 500;
color: #60194a;
color:var(--color);
line-height: 20px;
}
.line {
width: 48px;
height: 3px;
background: #60194a;
background:var(--color);
border-radius: 2px;
}
......@@ -407,7 +407,7 @@ export default {
.code {
font-size: 14px;
font-weight: 600;
color: #60194a;
color:var(--color);
}
}
......@@ -448,7 +448,7 @@ export default {
.el-button {
width: 100%;
height: 60px;
background: #60194a;
background:var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -368,14 +368,14 @@ export default {
height: 20px;
font-size: 22px;
font-weight: 500;
color: #60194a;
color:var(--color);
line-height: 20px;
}
.line {
width: 48px;
height: 3px;
background: #60194a;
background:var(--color);
border-radius: 2px;
}
......@@ -404,7 +404,7 @@ export default {
.code {
font-size: 14px;
font-weight: 600;
color: #60194a;
color:var(--color);
}
}
......@@ -445,7 +445,7 @@ export default {
.el-button {
width: 100%;
height: 60px;
background: #60194a;
background:var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -53,6 +53,9 @@ export default {
name: "recruit",
data() {
return {};
},
created(){
},
methods: {
toLogin() {
......@@ -117,7 +120,7 @@ export default {
.el-button {
width: 200px;
height: 50px;
background: #60194a;
background:var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
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