Commit b6d0c2bf authored by 杨梦雪's avatar 杨梦雪

111

parent 616315fd
......@@ -27,6 +27,18 @@ export default {
root.style.setProperty("--bk_pic", res.data.background_picture); //当前营地的背景图
//当前营地logo
window.localStorage.setItem("system_logo", res.data.system_logo);
window.localStorage.setItem(
"doubt_code",
res.data.fill_individual_Invitationcode
); //是否填写邀请码
window.localStorage.setItem(
"doubt_info",
res.data.fill_individual_information
); //是否填写个人资料
window.localStorage.setItem(
"doubt_check",
res.data.audit_individual_information
); //是否审核个人资料
});
},
},
......
......@@ -85,3 +85,45 @@ export function timeSpan(d1, d2) {
return Math.round(dateDiff / 1000);
}
// 日期格式化
export function parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['', '', '', '', '', '', ''][value] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
console.log(time_str)
return time_str
}
......@@ -19,13 +19,10 @@ export default {
name: "Header",
data() {
return {
system_logo: "",
system_logo: window.localStorage.getItem("system_logo"),
};
},
created() {
this.system_logo = localStorage.getItem("system_logo");
// console.log( this.system_logo)
},
created() {},
methods: {
toLogin() {
this.$router.replace({ name: "index-login" });
......@@ -69,7 +66,7 @@ export default {
}
:last-child {
font-weight: 500;
color:var(--color);
color: var(--color);
line-height: 21px;
padding: 10px 36px;
border-radius: 4px;
......
......@@ -10,7 +10,7 @@
<div class="pay_code">
<div v-if="isShowqr">
<div class="pay_time">支付剩余时间<span>15分30秒</span></div>
<div>{{has_amount}}</div>
<div>{{ has_amount }}</div>
<div class="img_qr">
<div class="qrcode" ref="qrCodeUrl"></div>
</div>
......@@ -25,7 +25,7 @@
</div>
<span slot="footer" class="dialog-footer">
<div class="btn">
<el-button @click="dialogVisible = false">刷新二维码</el-button>
<el-button @click="updateCode()">刷新二维码</el-button>
<el-button class="cancel" @click="cancelBtn()">取 消</el-button>
</div>
</span>
......@@ -54,7 +54,7 @@ export default {
timeoutObj: null, //心跳心跳倒计时
serverTimeoutObj: null, //心跳倒计时
timeoutnum: null, //断开 重连倒计时
has_amount:""
has_amount: "",
};
},
created() {
......@@ -63,7 +63,7 @@ export default {
},
methods: {
async confirm() {
console.log(SERVER_WS_URL)
console.log(SERVER_WS_URL);
let { data: res } = await getWxConfig({
// exam_uuid: this.examuuid,
pay_type: 1,
......@@ -83,6 +83,9 @@ export default {
//初始化 websocket 链接
this.initWebSocket();
},
updateCode() {
this.confirm();
},
createQrCode(qrCode) {
var qrcode = new QRCode(this.$refs.qrCodeUrl, {
text: qrCode, // 需要转换为二维码的内容
......@@ -124,9 +127,8 @@ export default {
if (!this.token || this.token == "") {
this.token = window.localStorage.getItem("index-token");
}
let token=this.token
const wssURL =
SERVER_WS_URL + "/order?token=" + token + "&channel=pc";
let token = this.token;
const wssURL = SERVER_WS_URL + "/order?token=" + token + "&channel=pc";
this.websocket = new WebSocket(wssURL);
// console.log(this.websocket)
// 连接发生错误的回调方法
......@@ -272,7 +274,7 @@ export default {
line-height: 14px;
span {
font-size: 13px !important;
color:var(--color);
color: var(--color);
}
}
:nth-child(2) {
......
......@@ -3,10 +3,10 @@
<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">
<el-dropdown @command="handleCommand">
<el-dropdown @command="handleCommand" trigger="click">
<div class="el-dropdown-link flex">
<div>
<img src="@/assets/img/default.svg" class="img_user" />
......@@ -34,6 +34,7 @@ export default {
data() {
return {
phone: window.localStorage.getItem("phone"),
system_logo: window.localStorage.getItem("system_logo"),
};
},
methods: {
......@@ -104,15 +105,17 @@ export default {
}
}
::v-deep .el-dropdown-menu__item {
min-width: 124px !important;
min-width: 204px !important;
}
::v-deep .el-dropdown-item {
display: inline-block;
}
::v-deep .el-dropdown-menu__item:hover {
color: #ffffff;
background-color:var(--color);
background-color: var(--color);
}
::v-deep .el-message-box {
......
......@@ -35,9 +35,12 @@ export default {
data() {
return {
checked: false,
};
},
created() {},
created() {
},
methods: {
next() {
// console.log(this.checked);
......@@ -45,8 +48,11 @@ export default {
console.log(res, "setSignShould");
if (res.data.code !== 200) return this.$message.error(res.data.message);
this.$message.success(res.data.message);
// if (doubt_code == 1) {
this.$router.push("/signUp/invitation");
// } else {
// this.$router.push("/signUp/referInfo");
// }
});
},
},
......
......@@ -73,6 +73,7 @@ export default {
invatation3: "",
invatation4: "",
inputFlag: true,
};
},
watch: {
......@@ -210,9 +211,10 @@ export default {
return this.$message.error(res.data.message);
}
// this.status=res.data.status
this.$emit('getstatus',res.data.status.status)
this.$emit("getstatus", res.data.status.status);
this.$message.success(res.data.message);
this.$router.push("/signUp/referInfo");
});
},
},
......
......@@ -65,6 +65,7 @@
/* eslint-disable */
import ConfirmSignUp from "c/index/SignUp/ConfirmSignUp";
import { getAccount } from "r/index/signUp";
import {parseTime} from "common/utils";
export default {
name: "Paying",
components: {
......@@ -101,6 +102,7 @@ export default {
return this.$message.error(res.data.message);
}
this.personalInfo = res.data.info;
this.personalInfo.create_time = parseTime(res.data.info.create_time);
});
},
},
......
......@@ -132,12 +132,19 @@
</el-col>
<el-col :span="12">
<el-form-item label="入学年份(高中)" prop="start_school_date">
<el-input
<el-select
v-model="referForm.start_school_date"
placeholder="填写入学年份(高中)"
size="small"
clearable
/>
>
<el-option
v-for="(item, index) in yearArrs"
:key="index"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -495,10 +502,11 @@ export default {
resultPicture: "",
dialogVisible: false,
disabled: false,
};
},
created() {
this.phone = window.localStorage.getItem("phone");//本地取用户手机号
this.phone = window.localStorage.getItem("phone"); //本地取用户手机号
let signUpFile = window.localStorage.getItem(
"sign_up_file_" + window.localStorage.getItem("phone")
);
......@@ -780,8 +788,8 @@ export default {
}
this.$emit("getstatus", res.data.status);
this.$message.success("提交审核成功");
// 跳转到报名
this.$router.push("/signUp/check");
});
// });
},
......@@ -830,11 +838,11 @@ export default {
background-color: #ffffff;
&:hover {
border-color:var(--color);
border-color: var(--color);
}
&:focus {
border-color:var(--color);
border-color: var(--color);
}
}
}
......@@ -852,7 +860,7 @@ export default {
line-height: 20px;
border-radius: 50%;
&:hover {
border-color:var(--color);
border-color: var(--color);
}
}
......@@ -919,7 +927,7 @@ export default {
position: relative;
.el-icon-circle-plus {
font-size: 52px;
color:var(--color);
color: var(--color);
position: absolute;
top: 50%;
left: 50%;
......@@ -928,7 +936,7 @@ export default {
}
i {
font-size: 52px;
color:var(--color);
color: var(--color);
}
.text {
font-size: 14px;
......@@ -943,7 +951,7 @@ export default {
.el-button {
width: 200px;
height: 50px;
background:var(--color);
background: var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -124,7 +124,6 @@ export function request(config) {
const token = localStorage.getItem('index-token')
if (token) {
// console.log(token)
config.headers.token = token
} else {
window.localStorage.clear()
......
......@@ -39,6 +39,8 @@ const routes = [{
import('v/index/camp/Index.vue'),
children: [...indexCamp]
}
]
const originalPush = VueRouter.prototype.push
......
/* eslint-disable */
export default{
}
\ No newline at end of file
/* eslint-disable */
import Vue from 'vue'
import MyDialog from '../components/MyDialog.vue'
MyDialog.install = function(Vue) {
MyDialog.install = function (Vue) {
Vue.component(MyDialog.name, MyDialog);
};
......
/* eslint-disable */
export default {
};
/* eslint-disable */
import Vue from 'vue'
import Vuex from 'vuex'
import actions from "./actions";
......@@ -10,7 +11,7 @@ let state = {
// 上一页地址
previousPage: "",
// 数据
data:[],
data: [],
token: '',
showDialog: false,
dialogType: 0,
......
/* eslint-disable */
export default {
// 更新上一页信息
setPrePage(state, path) {
......
/* eslint-disable */
// 补0
export function add0(m) {
return m < 10 ? "0" + m : m;
......
<template>
<div class="certificate">
<div class="content">
<div class="certificate_titile">营地证书</div>
</div>
<div>
<img src="" alt="">
<p>同学你好,老师暂未发布作业</p>
<p>请于2020年XX年XX月 前往王章查看作业</p>
</div>
</div>
</template>
<script>
/* eslint-disable */
export default {
name: "certificate",
data() {
return {
};
},
created() {
},
watch: {
},
methods: {
},
};
</script>
<style lang="scss" >
.flex {
display: flex;
}
.certificate {
background: #ffffff;
width: 856px;
.certificate_titile {
font-size: 24px;
font-weight: 500;
color: #1b1419;
line-height: 24px;
margin-bottom: 40px;
}
.content {
padding: 50px;
}
}
</style>
<template>
<div class="homework">
<div class="content">
<div class="homework_titile">营地作业</div>
</div>
<div>
<img src="" alt="">
<p>同学你好,老师暂未发布作业</p>
<p>请于2020年XX年XX月 前往王章查看作业</p>
</div>
</div>
</template>
<script>
/* eslint-disable */
export default {
name: "homework",
data() {
return {
};
},
created() {
},
watch: {
},
methods: {
},
};
</script>
<style lang="scss" >
.flex {
display: flex;
}
.homework {
background: #ffffff;
width: 856px;
.homework_titile {
font-size: 24px;
font-weight: 500;
color: #1b1419;
line-height: 24px;
margin-bottom: 40px;
}
.content {
padding: 50px;
}
}
</style>
......@@ -5,13 +5,13 @@
<div class="cc flex">
<div class="camp_left">
<ul class="camp_left_box">
<li @click="ToSignUp" >
<li @click="ToSignUp" :class="type == 1 ? 'active' : ''">
<img src="@/assets/img/signUp/icon-bm.png" />营地报名
</li>
<li @click="ToHomework">
<li @click="ToHomework" :class="type == 2 ? 'active' : ''">
<img src="@/assets/img/signUp/icon-zs.png" />营地作业
</li>
<li @click="ToCertificate">
<li @click="ToCertificate" :class="type == 3 ? 'active' : ''">
<img src="@/assets/img/signUp/icon-zy.png" />营地证书
</li>
</ul>
......@@ -38,17 +38,22 @@ export default {
Footer,
},
data() {
return {};
return {
type: "",
};
},
methods: {
ToSignUp() {
this.$router.replace({ name: "index-signUp" });
this.type = 1;
},
ToHomework() {
this.$router.replace({ name: "index-homework" });
this.type = 2;
},
ToCertificate() {
this.$router.replace({ name: "index-certificate" });
this.type = 3;
},
},
};
......@@ -63,6 +68,7 @@ export default {
width: 60%;
justify-content: space-around;
// align-items: center;
margin: 30px 0 50px 0;
}
}
.tab {
......@@ -94,6 +100,7 @@ export default {
background-color: #ffffff;
border-radius: 8px;
padding: 20px 0;
margin: 0;
&.is-fixed {
position: fixed;
top: 92px;
......@@ -123,8 +130,8 @@ export default {
&.active,
&:hover {
cursor: pointer;
background-color: #f5f5f5;
border-right: 4px solid #3c0664;
background-color: #F8F8F8;
// border-right: 4px solid #3c0664;
}
}
}
......
......@@ -48,6 +48,9 @@ export default {
type: "examInfo",
status: "", //进度
// statuss:''
doubt_code: window.localStorage.getItem("doubt_code"),
doubt_info: window.localStorage.getItem("doubt_info"),
doubt_check: window.localStorage.getItem("doubt_check"),
};
},
created() {
......@@ -73,7 +76,8 @@ export default {
// 点击邀请码下一步传来的status
statuss(val) {
console.log(val, "val");
// this.statuss = val;
this.statuss = val;
// this.signUpInit();
},
signUpInit() {
......@@ -85,16 +89,36 @@ export default {
}
this.status = res.data.status;
// doubt_code,doubt_info,doubt_check。0为不填写,1为填写
if (this.status == 0) {
this.type = "examInfo";
} else if (this.status == 1) {
// 是否填写邀请码
if (this.doubt_code == 0) {
this.type = "referInfo";
this.status = 2;
} else {
this.type = "invitation";
// this.status = 2;
}
} else if (this.status == 2) {
// 是否填写个人资料
if (this.doubt_info == 0) {
this.type = "check";
this.status = 3;
} else {
this.type = "referInfo";
// this.status = 2;
}
} else if (this.status == 3) {
console.log(222);
// 是否审核个人资料
if (this.doubt_check == 0) {
this.type = "pay";
this.status = 4;
} else {
this.type = "check";
// this.status = 3;
}
} else if (this.status == 4) {
if (res.data.examine_status == 0) {
this.type = "check";
......@@ -110,7 +134,7 @@ export default {
}
} else if (this.status == 5) {
this.type = "pay";
}else if (this.status == 6) {
} else if (this.status == 6) {
this.type = "success";
}
// console.log(this.status)
......
......@@ -11,11 +11,18 @@
export default {
name: "loginIndex",
data() {
return {};
return {
};
},
created() {
this.$emit("getStatus", false);
},
methods: {
},
};
</script>
......
......@@ -128,12 +128,13 @@ export default {
},
],
},
};
},
created() {
this.$emit("getStatus", false);
},
methods: {
// 忘记账号/密码
......@@ -164,7 +165,7 @@ export default {
this.$message.success("登录成功");
// token存储
window.localStorage.setItem("index-token", res.data.token);
window.localStorage.setItem("phone", this.loginForm.phone,);
window.localStorage.setItem("phone", this.loginForm.phone);
// 报名信息
window.localStorage.setItem("camp_name", res.data.cam.name);
//获取主题色
......@@ -174,6 +175,7 @@ export default {
);
// 跳转到报名
this.$router.push({ path: "/signUp/examInfo" });
});
});
},
......@@ -292,13 +294,13 @@ export default {
height: 20px;
font-size: 22px;
font-weight: 500;
color:var(--color);
color: var(--color);
line-height: 20px;
}
.line {
width: 48px;
width: 125px;
height: 3px;
background:var(--color);
background: var(--color);
border-radius: 2px;
}
.el-form {
......
......@@ -235,10 +235,20 @@ export default {
return this.$message.error(res.data.message);
}
this.$message.success(res.data.message);
// token存储
window.localStorage.setItem("index-token", res.token);
// 去登录
this.$router.push({ path: "/login" });
window.localStorage.setItem("index-token", res.data.token);
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" });
});
});
},
......@@ -371,14 +381,14 @@ export default {
height: 20px;
font-size: 22px;
font-weight: 500;
color:var(--color);
color: var(--color);
line-height: 20px;
}
.line {
width: 48px;
width: 103px;
height: 3px;
background:var(--color);
background: var(--color);
border-radius: 2px;
}
......@@ -407,7 +417,7 @@ export default {
.code {
font-size: 14px;
font-weight: 600;
color:var(--color);
color: var(--color);
}
}
......@@ -448,7 +458,7 @@ export default {
.el-button {
width: 100%;
height: 60px;
background:var(--color);
background: var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......
......@@ -373,7 +373,7 @@ export default {
}
.line {
width: 48px;
width: 83px;
height: 3px;
background:var(--color);
border-radius: 2px;
......
......@@ -16,7 +16,7 @@ module.exports = {
.set('r', resolve('src/request'))
.set('config', resolve('src/config'))
.set('common', resolve('src/common'))
// .set('mixins', resolve('src/mixins'))
.set('store', resolve('src/store'))
},
// devServer: {
......
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