Commit 97e0c5f6 authored by 杨梦雪's avatar 杨梦雪

个人信息-自我介绍

parent f6dab081
<template> <template>
<div id="app"> <div id="app">
<router-view /> <router-view v-if="isRouterAlive"/>
</div> </div>
</template> </template>
<script> <script>
...@@ -8,13 +8,17 @@ ...@@ -8,13 +8,17 @@
export default { export default {
name: "app", name: "app",
data() { data() {
return {}; return { isRouterAlive: true
};
}, },
created() { created() {
}, },
methods: { methods: {
reload () {
this.isRouterAlive = false
this.$nextTick(() => (this.isRouterAlive = true))
}
}, },
}; };
</script> </script>
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
</template> </template>
<script> <script>
/* eslint-disable */ /* eslint-disable */
import Cookie from "js-cookie";
import { logout } from "r/index/login"; import { logout } from "r/index/login";
export default { export default {
...@@ -92,9 +91,9 @@ export default { ...@@ -92,9 +91,9 @@ export default {
}).catch((err) => err); }).catch((err) => err);
if (confirmResult !== "confirm") if (confirmResult !== "confirm")
return this.$message.info("您取消了退出"); return this.$message.info("您取消了退出");
// 清除本地缓存除了大学logo // 清除本地缓存除了大学logo
// window.localStorage.clear(); // window.localStorage.clear();]
this.reload()
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
window.localStorage.removeItem("doubt_code" + code); window.localStorage.removeItem("doubt_code" + code);
window.localStorage.removeItem("doubt_info" + code); window.localStorage.removeItem("doubt_info" + code);
...@@ -118,7 +117,6 @@ export default { ...@@ -118,7 +117,6 @@ export default {
); );
window.localStorage.removeItem("schoolName" + code); window.localStorage.removeItem("schoolName" + code);
window.localStorage.removeItem("camp_statement" + code); window.localStorage.removeItem("camp_statement" + code);
// window.localStorage.removeItem("restet_code_time" + code, )
window.localStorage.removeItem("transfer_account" + code); window.localStorage.removeItem("transfer_account" + code);
window.localStorage.removeItem("payee" + code); window.localStorage.removeItem("payee" + code);
window.localStorage.removeItem("bank_first" + code); window.localStorage.removeItem("bank_first" + code);
...@@ -127,15 +125,19 @@ export default { ...@@ -127,15 +125,19 @@ export default {
"bank_info" + window.localStorage.getItem("phone" + code) + code "bank_info" + window.localStorage.getItem("phone" + code) + code
); );
this.isLogin = false; this.isLogin = false;
this.reload()
console.log(this.$store.state.human)
if (this.$store.state.human == 1) { if (this.$store.state.human == 1) {
this.$router.replace({ console.log(222)
await this.$router.replace({
path: "/login", path: "/login",
query: { query: {
code: code, code: code,
}, },
}); });
} else { } else {
this.$router.replace("/" + code); console.log(code)
await this.$router.replace("/" + code);
} }
this.$message.success("退出成功"); this.$message.success("退出成功");
......
...@@ -637,6 +637,7 @@ ...@@ -637,6 +637,7 @@
prop="code" prop="code"
label="邀请码" label="邀请码"
style="height: 73px" style="height: 73px"
> >
<el-input <el-input
ref="code" ref="code"
...@@ -652,6 +653,31 @@ ...@@ -652,6 +653,31 @@
每个邀请码仅能绑定一个用户 每个邀请码仅能绑定一个用户
</div> </div>
</el-col> </el-col>
<!-- 自我介绍-->
<el-col :span="12" v-show="configJson.introduceMyself == 1">
<el-form-item
prop="introduceMyself"
label="自我介绍"
style="height: 73px"
:rules="
configJson.introduceMyself == 1
? referInfoRules.introduceMyself
: [{ required: false }]
"
>
<el-input
ref="code"
v-model="referForm.introduceMyself"
placeholder="自我介绍"
type="textarea"
maxlength="200"
size="small"
show-word-limit/>
</el-form-item>
<div class="tipsMsg">
用清晰、简洁的语言介绍自己对科学和创新的兴趣、经验和动机,以及为什么希望参加“强国有我”复旦大学信息科学与工程学院青少年科学营
</div>
</el-col>
</el-row> </el-row>
<!-- 紧急联系人--> <!-- 紧急联系人-->
<div <div
...@@ -953,7 +979,7 @@ ...@@ -953,7 +979,7 @@
export default { export default {
name: "referInfo", name: "referInfo",
props: {invitation_code: String}, props: {invitation_code: String},
components:{cueDialog}, components: {cueDialog},
data() { data() {
const validateContent = (rule, value, callback) => { const validateContent = (rule, value, callback) => {
if (!this.referForm.birthday) { if (!this.referForm.birthday) {
...@@ -977,8 +1003,8 @@ ...@@ -977,8 +1003,8 @@
} }
}; };
return { return {
cueDialogVisible:false, cueDialogVisible: false,
msg:null, msg: null,
configJson: {}, configJson: {},
isUploading: false, // 图片上传蒙层 isUploading: false, // 图片上传蒙层
isCode: false, // 邀请码是否禁用 isCode: false, // 邀请码是否禁用
...@@ -1010,6 +1036,7 @@ ...@@ -1010,6 +1036,7 @@
clothes_size: null, clothes_size: null,
emergency: null, emergency: null,
emergency_phone: null, emergency_phone: null,
introduceMyself: null,
school_province: null, school_province: null,
school_city: null, school_city: null,
school: null, school: null,
...@@ -1152,6 +1179,13 @@ ...@@ -1152,6 +1179,13 @@
trigger: "change", trigger: "change",
}, },
], ],
introduceMyself: [
{
required: true,
message: "自我介绍不能为空!",
trigger: "blur",
},
],
school_province: [ school_province: [
{ {
required: true, required: true,
...@@ -1384,6 +1418,13 @@ ...@@ -1384,6 +1418,13 @@
} }
}) })
// console.log(this.isOffline) // console.log(this.isOffline)
console.log(this.$store.state.signUpInfo)
let introduce = this.$store.state.signUpInfo.introduce
console.log(introduce)
if (introduce != null) {
this.referForm.introduceMyself = introduce
}
console.log(this.referForm.introduceMyself)
}, },
watch: { watch: {
referForm(val) { referForm(val) {
...@@ -1495,6 +1536,7 @@ ...@@ -1495,6 +1536,7 @@
clothes_size: null, clothes_size: null,
emergency: null, emergency: null,
emergency_phone: null, emergency_phone: null,
introduceMyself: null,
school_province: null, school_province: null,
school_city: null, school_city: null,
school: null, school: null,
...@@ -1994,6 +2036,10 @@ ...@@ -1994,6 +2036,10 @@
if (this.configJson.clothesSize == 1) { if (this.configJson.clothesSize == 1) {
obj.clothes_size = _this.referForm.clothes_size; obj.clothes_size = _this.referForm.clothes_size;
} }
//自我介绍
if (this.configJson.introduceMyself == 1) {
obj.introduce = _this.referForm.introduceMyself;
}
if (this.configJson.school == 1) { if (this.configJson.school == 1) {
obj.school_province = _this.referForm.school_province; obj.school_province = _this.referForm.school_province;
obj.school_city = _this.referForm.school_city; obj.school_city = _this.referForm.school_city;
......
...@@ -13,6 +13,7 @@ import { ...@@ -13,6 +13,7 @@ import {
} from "r/index/network.js"; } from "r/index/network.js";
import 'default-passive-events' import 'default-passive-events'
Vue.config.devtools = true;
Vue.config.productionTip = false Vue.config.productionTip = false
// 弹出框的时候滚动条隐藏和出现导致页面抖动问题 // 弹出框的时候滚动条隐藏和出现导致页面抖动问题
......
...@@ -115,7 +115,7 @@ export function request(config) { ...@@ -115,7 +115,7 @@ export function request(config) {
// console.log(config) // console.log(config)
if ( if (
(config.url.indexOf(loginUrl) != -1&&config.url.indexOf(loginOut) == -1) || (config.url.indexOf(loginUrl) != -1 && config.url.indexOf(loginOut) == -1) ||
config.url.indexOf(setAccountInfo) != -1 || config.url.indexOf(setAccountInfo) != -1 ||
config.url.indexOf(passMsgOld) != -1 || config.url.indexOf(passMsgOld) != -1 ||
config.url.indexOf(getCam) != -1 || config.url.indexOf(getCam) != -1 ||
...@@ -124,7 +124,7 @@ export function request(config) { ...@@ -124,7 +124,7 @@ export function request(config) {
config.url.indexOf(registerEmailCode) != -1 || config.url.indexOf(registerEmailCode) != -1 ||
config.url.indexOf(passwordEmailCode) != -1 || config.url.indexOf(passwordEmailCode) != -1 ||
config.url.indexOf(changePassCode) != -1 || config.url.indexOf(changePassCode) != -1 ||
config.url.indexOf(passwordCode) != -1|| config.url.indexOf(passwordCode) != -1 ||
config.url.indexOf(setLog) != -1 config.url.indexOf(setLog) != -1
) { ) {
...@@ -138,7 +138,6 @@ export function request(config) { ...@@ -138,7 +138,6 @@ export function request(config) {
config.headers.token = token config.headers.token = token
} else { } else {
window.localStorage.clear()
router.push({ router.push({
path: '/login', path: '/login',
query: { query: {
...@@ -193,15 +192,12 @@ export function request(config) { ...@@ -193,15 +192,12 @@ export function request(config) {
// res.data.code == 400001 || // res.data.code == 400001 ||
res.data.code == 400002 || res.data.code == 400002 ||
res.data.code == 400003) { res.data.code == 400003) {
router.push({ router.push({
path: '/' + store.state.indexIdentity, path: '/' + store.state.indexIdentity,
}) })
Notification({ Notification({
message: res.data.message, message: res.data.message,
duration: 1000, duration: 1000,
}); });
return return
} }
...@@ -209,7 +205,7 @@ export function request(config) { ...@@ -209,7 +205,7 @@ export function request(config) {
console.log(res) console.log(res)
// console.log(store.state.indexIdentity, 'store.state.indexIdentity') // console.log(store.state.indexIdentity, 'store.state.indexIdentity')
let code = store.state.indexIdentity; let code = store.state.indexIdentity;
let isLogout = res.config.url =='/web/auth/loginOut'; let isLogout = res.config.url == '/web/auth/loginOut';
window.localStorage.removeItem("doubt_code" + code); window.localStorage.removeItem("doubt_code" + code);
window.localStorage.removeItem("doubt_info" + code); window.localStorage.removeItem("doubt_info" + code);
window.localStorage.removeItem("doubt_check" + code); window.localStorage.removeItem("doubt_check" + code);
...@@ -243,7 +239,7 @@ export function request(config) { ...@@ -243,7 +239,7 @@ export function request(config) {
router.push({ router.push({
path: '/' + store.state.indexIdentity, path: '/' + store.state.indexIdentity,
}) })
if(!isLogout){ if (!isLogout) {
Notification({ Notification({
message: res.data.message, message: res.data.message,
duration: 3000, duration: 3000,
...@@ -288,16 +284,6 @@ export function request(config) { ...@@ -288,16 +284,6 @@ export function request(config) {
} // 从哪个页面跳转 } // 从哪个页面跳转
}) })
} }
// else if (
// res.data.code == 400801 ||
// res.data.code == 400910 ||
// res.data.code == 4002132 ||
// res.data.code == 40068
// ) {
// store.state.showDialog = true
// store.state.dialogType = 1
// }
loadingInstance && loadingInstance.close() loadingInstance && loadingInstance.close()
setTimeout(() => { setTimeout(() => {
allowRequest(reqList, res.config.url) allowRequest(reqList, res.config.url)
...@@ -305,27 +291,31 @@ export function request(config) { ...@@ -305,27 +291,31 @@ export function request(config) {
return res return res
}, },
(error) => { (error) => {
// console.log(window.localStorage.getItem(), 'id')
console.log(error, 'err') console.log(error, 'err')
console.log(error == 'Error: 请登录!', 'err')
console.log(error.message == '请登录!', 'err')
// console.log(error.response.status, '5555') // console.log(error.response.status, '5555')
Message.closeAll() Message.closeAll()
if (error.response.status === 404) { if (error.message == '请登录!') {
// return this.$message.error("营地报名已结束") // router.push({
// 未登录 // path: "/login?code=" + store.state.indexIdentity,
// })
}
if(error.response.status == 404)
{
Notification({ Notification({
message: "营地报名已关闭", message: "营地报名已关闭",
duration: 3000, duration: 3000,
// onClose() {
// console.log('error');
// router.push("/admin/login");
// },
}); });
return false;
} }
if (axios.isCancel(error)) { if (axios.isCancel(error)) {
console.log(error.message) console.log(error.message)
} else { } else {
// 增加延迟,相同请求不得在短时间内重复发送 // 增加延迟,相同请求不得在短时间内重复发送
setTimeout(() => { setTimeout(() => {
console.log(error.config)
console.log(error)
allowRequest(reqList, error.config.url) allowRequest(reqList, error.config.url)
}, 1000) }, 1000)
} }
...@@ -360,6 +350,7 @@ export function upload(url, data = {}) { ...@@ -360,6 +350,7 @@ export function upload(url, data = {}) {
); );
}); });
} }
// 通用下载方法 // 通用下载方法
export function download(url, params, filename) { export function download(url, params, filename) {
console.log(url, params, filename) console.log(url, params, filename)
...@@ -395,6 +386,7 @@ export function download(url, params, filename) { ...@@ -395,6 +386,7 @@ export function download(url, params, filename) {
console.error(r); console.error(r);
}); });
} }
// 合并多个请求 // 合并多个请求
export function allRequest(arrRequest) { export function allRequest(arrRequest) {
return axios.all(arrRequest) return axios.all(arrRequest)
......
...@@ -198,6 +198,7 @@ router.beforeEach((to, from, next) => { ...@@ -198,6 +198,7 @@ router.beforeEach((to, from, next) => {
} }
}); });
} else if (to.name == "recruit") { } else if (to.name == "recruit") {
// console.log(to,'recruit')
code = to.params.code; code = to.params.code;
checkCam(code, (res) => { checkCam(code, (res) => {
if (res) { if (res) {
...@@ -233,7 +234,7 @@ router.beforeEach((to, from, next) => { ...@@ -233,7 +234,7 @@ router.beforeEach((to, from, next) => {
// 页面跳转之后页面回滚到顶部 // 页面跳转之后页面回滚到顶部
router.afterEach((to, from, next) => { router.afterEach((to, from, next) => {
// console.log(to,'to') console.log(to,'to')
window.scrollTo(0, 0) window.scrollTo(0, 0)
}); });
......
...@@ -21,6 +21,8 @@ let state = { ...@@ -21,6 +21,8 @@ let state = {
enclosure_url:"", enclosure_url:"",
isDisplay_num:null,//是否开启报名人数显示 isDisplay_num:null,//是否开启报名人数显示
info:{}, info:{},
isCloseCamp:0,//是否关闭营地
signUpInfo:{},
isLogin: localStorage.getItem("isLogin") || "0", // 只有1为已登录 isLogin: localStorage.getItem("isLogin") || "0", // 只有1为已登录
}; };
......
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
import Paying from "c/index/SignUp/paying"; import Paying from "c/index/SignUp/paying";
import Success from "c/index/SignUp/success"; import Success from "c/index/SignUp/success";
import {signUpInit, signBack} from "r/index/signUp"; import {signUpInit, signBack} from "r/index/signUp";
import store from '@/store'
export default { export default {
name: "signUp", name: "signUp",
...@@ -410,7 +411,8 @@ ...@@ -410,7 +411,8 @@
} }
//多活動形式 //多活動形式
window.localStorage.setItem("multiform_id" + code, res.data.multiform_id); window.localStorage.setItem("multiform_id" + code, res.data.multiform_id);
//填写个人信息-自我介绍
store.state.signUpInfo = res.data
}); });
}, },
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<Header></Header> <Header></Header>
<div class="notify flex" v-if="$store.state.isDisplay_num == 1"> <div class="notify flex" v-if="$store.state.isDisplay_num == 1">
<div class="flex"> <div class="flex">
<img class="notify_img" src="../../../assets/img/notify.png" alt="" /> <img class="notify_img" src="../../../assets/img/notify.png" alt=""/>
</div> </div>
<div>注意:本次活动报名有人数限制,当前共有{{ info.order_num }}人申请,剩余名额为{{info.student_num}}</div> <div>注意:本次活动报名有人数限制,当前共有{{ info.order_num }}人申请,剩余名额为{{info.student_num}}</div>
</div> </div>
...@@ -52,14 +52,15 @@ ...@@ -52,14 +52,15 @@
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */ /* eslint-disable */
import Header from "@/components/index/Header.vue"; import Header from "@/components/index/Header.vue";
import Footer from "@/components/index/Footer.vue"; import Footer from "@/components/index/Footer.vue";
import { getCamInfo } from "r/index/login"; import {getCamInfo} from "r/index/login";
import { setLogs } from "@/common/utils"; import {setLogs} from "@/common/utils";
import {Notification} from "element-ui";
export default { export default {
name: "recruit", name: "recruit",
data() { data() {
return { return {
...@@ -68,15 +69,17 @@ export default { ...@@ -68,15 +69,17 @@ export default {
}, },
created() { created() {
this.info = this.$store.state.info; this.info = this.$store.state.info;
console.log(this.$store.state.indexIdentity)
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
// console.log(code) //判断是否关闭了营地(关闭了不需要调用setlog)
let isCloseCamp = this.$store.state.info.on_off
if (isCloseCamp == 1) {
getCamInfo(code).then((res) => { getCamInfo(code).then((res) => {
// console.log(res, '33333')
// console.log(res.data.name, 'res.name')
document.title = res.data.name; document.title = res.data.name;
return false; return false;
}); });
this.commonApi(29) this.commonApi(29)
}
}, },
methods: { methods: {
toLogin() { toLogin() {
...@@ -93,15 +96,18 @@ export default { ...@@ -93,15 +96,18 @@ export default {
Header, Header,
Footer, Footer,
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "a/scss/common"; @import "a/scss/common";
.flex {
.flex {
display: flex; display: flex;
} }
.recruit {
.recruit {
font-family: PingFang SC; font-family: PingFang SC;
.el-header { .el-header {
position: fixed; position: fixed;
width: 100%; width: 100%;
...@@ -121,10 +127,12 @@ export default { ...@@ -121,10 +127,12 @@ export default {
align-items: center; align-items: center;
padding-left: 5%; padding-left: 5%;
} }
.notify_img { .notify_img {
width: 20px; width: 20px;
margin-right: 5px; margin-right: 5px;
} }
.content { .content {
.title { .title {
padding: 170px 0 20px 0; padding: 170px 0 20px 0;
...@@ -142,6 +150,7 @@ export default { ...@@ -142,6 +150,7 @@ export default {
.paper { .paper {
text-align: center; text-align: center;
margin: 8px 0 24px 0; margin: 8px 0 24px 0;
img { img {
width: 654px; width: 654px;
height: 368px; height: 368px;
...@@ -182,5 +191,5 @@ export default { ...@@ -182,5 +191,5 @@ export default {
} }
} }
} }
} }
</style> </style>
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