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

个人信息-自我介绍

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