Commit 33ed08b9 authored by 杨梦雪's avatar 杨梦雪

11

parent db97ea72
......@@ -11,6 +11,7 @@
"axios": "^0.21.4",
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
"js-cookie": "^3.0.1",
"node-sass": "^6.0.1",
"qrcodejs2": "^0.0.2",
"sass": "^1.42.1",
......@@ -9213,6 +9214,14 @@
"version": "2.6.4",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/js-cookie": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==",
"engines": {
"node": ">=12"
}
},
"node_modules/js-message": {
"version": "1.0.7",
"integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==",
......@@ -22837,6 +22846,11 @@
"version": "2.6.4",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"js-cookie": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
},
"js-message": {
"version": "1.0.7",
"integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==",
......
......@@ -40,6 +40,7 @@
</template>
<script>
/* eslint-disable */
import Cookie from "js-cookie"
import { logout } from "r/index/login";
export default {
......@@ -57,7 +58,7 @@ export default {
},
methods: {
toLogin() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/login?code=" + code);
},
handleCommand(command) {
......@@ -69,11 +70,11 @@ export default {
}
},
toCenter() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.replace("/signUp/examInfo?code=" + code);
},
toRegister() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/register?code=" + code);
},
async logout() {
......@@ -102,6 +103,7 @@ export default {
window.localStorage.removeItem("campsite_id");
window.localStorage.removeItem("order_no");
window.localStorage.removeItem("campindex_type");
window.localStorage.removeItem("bk_pic");
this.isLogin = false;
},
onMouserEnter(val) {
......
......@@ -35,6 +35,7 @@
<script>
/* eslint-disable */
import Cookie from "js-cookie"
import { getWxConfig } from "r/index/pay";
import { SERVER_WS_URL } from "config/server";
import QRCode from "qrcodejs2";
......@@ -235,7 +236,7 @@ export default {
this.$emit("closeCFSUDialog", this.dialogVisible, true);
// status=6,跳转到报名成功页面
// this.$emit("getstatus", res.data.status.status);
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/signUp/success?code="+code);
} else {
//收到服务器信息,心跳重置
......
......@@ -23,6 +23,7 @@
</template>
<script>
/* eslint-disable */
import Cookie from "js-cookie"
import { logout } from "r/index/login";
export default {
......@@ -53,23 +54,23 @@ export default {
await logout({});
// if (res.code !== 200) return this.$message.error(res.message);
// 清除本地缓存除了大学logo
// window.localStorage.clear();
window.localStorage.removeItem("doubt_code");
window.localStorage.removeItem("doubt_info");
window.localStorage.removeItem("doubt_check");
window.localStorage.clear();
// window.localStorage.removeItem("doubt_code");
// window.localStorage.removeItem("doubt_info");
// window.localStorage.removeItem("doubt_check");
// window.localStorage.removeItem("index-identity");
window.localStorage.removeItem("index-token");
window.localStorage.removeItem("phone");
window.localStorage.removeItem("camp_name");
window.localStorage.removeItem("system_color");
window.localStorage.removeItem("has_amount");
window.localStorage.removeItem("campsite_id");
window.localStorage.removeItem("order_no");
window.localStorage.removeItem("campindex_type");
// window.localStorage.removeItem("index-token");
// window.localStorage.removeItem("phone");
// window.localStorage.removeItem("camp_name");
// window.localStorage.removeItem("system_color");
// window.localStorage.removeItem("has_amount");
// window.localStorage.removeItem("campsite_id");
// window.localStorage.removeItem("order_no");
// window.localStorage.removeItem("campindex_type");
// this.$store.state.token = "";
// 使用编程式导航跳转到登录页面
// this.$router.push({ name: "recruit" });
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.replace("/"+code);
},
// 点击图片跳转到招生简章页面
......@@ -89,7 +90,7 @@ export default {
// window.localStorage.removeItem("order_no");
// window.localStorage.removeItem("campindex_type");
// this.$store.state.token = "";
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.replace("/"+code);
},
},
......
......@@ -30,6 +30,7 @@
<script>
/* eslint-disable */
import Cookie from "js-cookie"
import { setSignShould } from "r/index/signUp";
import { getCam } from "r/index/login";
export default {
......@@ -52,7 +53,7 @@ export default {
if (res.data.code !== 200) return this.$message.error(res.data.message);
this.$emit("getstatus", res.data.status);
this.$message.success(res.data.message);
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/signUp/invitation?code="+code);
});
},
......
......@@ -10,7 +10,7 @@
</div>
<div class="btn" v-show="this.getExamine == 1 || this.getExamine == 2">
<el-button @click="paying()" >下一步 </el-button>
<el-button @click="paying()">下一步 </el-button>
</div>
</div>
</div>
......@@ -22,27 +22,29 @@ export default {
name: "Pass",
props: {
getExamine: [String, Number],
// isNext:''
// isNext:''
},
created() {
// console.log(this.getExamine);
},
watch:{
// is_next(val){
// }
watch: {
// is_next(val){
// }
},
methods: {
paying() {
this.$emit('is_next',1)
this.$emit("is_next", 1);
// console.log(is_next);
},
},
};
</script>
<style lang="scss" scoped>
@import "a/scss/btn";
.btn {
padding-bottom: 0 !important;
}
.pass {
padding: 0 56px 65px 56px;
.p_content {
......
......@@ -340,6 +340,7 @@
<script>
/* eslint-disable */
import Cookie from "js-cookie"
import {
getAccount,
getAchievementOss,
......@@ -785,7 +786,7 @@ export default {
},
handlePictureCardPreview(file) {
// console.log(file);
console.log(file,'11111111');
this.resultPicture = file.url;
this.dialogVisible = true;
},
......@@ -964,7 +965,7 @@ export default {
// console.log(3333);
this.$emit("getstatus", res.data.status);
this.$message.success(res.data.message);
let code = localStorage.getItem("index-identity");
let code =Cookie.get("index-identity");
this.$router.push("/signUp/check?code="+code);
this.referForm = res.data.data;
});
......
......@@ -8,10 +8,12 @@ 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)
Vue.prototype.$errorScroll = function errorScroll(callback) {
this.$nextTick(() => {
// this.loading = false;
......
......@@ -2,8 +2,9 @@
import {
request
} from './network'
import Cookie from "js-cookie"
const identity = localStorage.getItem('index-identity')
const identity = Cookie.get('index-identity')
//登录前获取营地主题
export function getCam(code) {
......
......@@ -2,8 +2,9 @@
import {
request
} from './network'
import Cookie from "js-cookie"
const identity = localStorage.getItem('index-identity')
const identity = Cookie.get('index-identity')
// 报名初始化
export function getWxConfig(data) {
data['identity'] = identity;
......
......@@ -3,8 +3,9 @@
import {
request
} from './network'
import Cookie from "js-cookie"
const identity = localStorage.getItem('index-identity')
const identity = Cookie.get('index-identity')
// 发送注册时候验证码
export function registerCode(data) {
data['identity'] = identity;
......
......@@ -2,8 +2,9 @@
import {
request
} from './network'
import Cookie from "js-cookie"
const identity = localStorage.getItem('index-identity')
const identity =Cookie.get('index-identity')
// 报名初始化
export function signUpInit(data) {
data['identity'] = identity;
......
......@@ -12,6 +12,8 @@ import {
import {
Message
} from 'element-ui';
import Cookie from "js-cookie"
Vue.prototype.$message = Message;
Vue.use(VueRouter)
......@@ -105,7 +107,7 @@ function checkCam(code, cb) {
cb && cb(false);
return false;
}
code && window.localStorage.setItem("index-identity", code);
code && Cookie.set("index-identity", code);
// this.$message.success(res.data.message);
let root = document.querySelector(":root");
root.style.setProperty("--color", res.data.system_color);
......
......@@ -38,6 +38,7 @@
<script>
/* eslint-disable */
import Cookie from "js-cookie"
import Header from "@/components/index/SignUp/Header.vue";
import Footer from "@/components/index/Footer.vue";
......@@ -103,7 +104,7 @@ export default {
this.ToSignUp();
},
ToSignUp(index) {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.campindex_type = index;
if (this.campindex_type == 0) {
this.$router.push("/signUp/" + this.index_status+"?code="+code);
......
......@@ -99,6 +99,10 @@ export default {
signUpInit({}).then((res) => {
// console.log(res, "signUpInit");
if (res.data.code != 200) {
if (res.data.code == 400001) {
this.status = 6;
this.type = "success";
}
return this.$message.error(res.data.message);
}
this.status = res.data.status;
......
......@@ -12,6 +12,8 @@
</template>
<script>
/* eslint-disable */
import Cookie from "js-cookie"
export default {
name: "loginIndex",
data() {
......@@ -29,7 +31,7 @@ export default {
},
methods: {
toHome() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/"+code);
}
},
......
......@@ -61,6 +61,7 @@
<script>
/* eslint-disable */
import Cookie from "js-cookie"
import { login } from "r/index/login";
import { mobileCheck } from "@/common/utils.js";
......@@ -134,13 +135,13 @@ export default {
methods: {
// 忘记账号/密码
forgetPwd() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/reset?code="+code);
},
// 去注册
register() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/register?code="+code);
},
// 改变密码显示状态
......@@ -171,7 +172,7 @@ export default {
res.data.cam.system_color
);
// 跳转到报名
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.replace("/signUp/examInfo?code="+code);
});
});
......
......@@ -83,6 +83,7 @@
<script>
/* eslint-disable */
// 请求接口
import Cookie from "js-cookie"
import { registerCode, setAccountInfo } from "r/index/register";
import { mobileCheck, checkStrong } from "@/common/utils.js";
import { validatePassword } from "@/common/validator";
......@@ -188,7 +189,7 @@ export default {
methods: {
// 去注册
toLogin() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/login?code="+code);
},
// 改变密码显示状态
......@@ -270,7 +271,7 @@ export default {
);
// 跳转到报名
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/signUp/examInfo?code="+code);
});
......
......@@ -83,6 +83,7 @@
<script>
/* eslint-disable */
// 请求接口
import Cookie from "js-cookie"
import { passwordCode } from "r/index/register";
import { changePassCode } from "r/index/login";
import { mobileCheck } from "@/common/utils.js";
......@@ -189,7 +190,7 @@ export default {
methods: {
// 去注册
toLogin() {
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/login?code="+code);
},
// 改变密码显示状态
......@@ -260,7 +261,7 @@ export default {
this.$message.success(res.data.message);
// token存储
window.localStorage.setItem("index-token", res.token);
let code = localStorage.getItem("index-identity");
let code = Cookie.get("index-identity");
this.$router.push("/login?code="+code);
});
});
......
......@@ -46,6 +46,7 @@
</template>
<script>
/* eslint-disable */
import Cookie from "js-cookie";
import Header from "@/components/index/Header.vue";
import Footer from "@/components/index/Footer.vue";
......@@ -61,8 +62,8 @@ export default {
},
methods: {
toLogin() {
let code = localStorage.getItem("index-identity");
this.$router.push("/login?code="+code);
let code = Cookie.get("index-identity");
this.$router.push("/login?code=" + code);
},
},
components: {
......@@ -83,10 +84,10 @@ export default {
background-color: #ffffff;
z-index: 2000;
.bg-top {
// height: 24px;
// background-color: #f8f8f8;
}
// .bg-top {
// // height: 24px;
// // background-color: #f8f8f8;
// }
}
.content {
.title {
......
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