Commit be89fdb8 authored by wuwangwolihui's avatar wuwangwolihui

营地2.0

parent f4f77e76
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-menu :default-active="$store.state.activeIndex" <el-menu :default-active="$store.state.activeIndex"
@select="handleSelect" @select="handleSelect"
mode="horizontal"> mode="horizontal">
<el-menu-item index="/home">首页</el-menu-item> <el-menu-item index="/">首页</el-menu-item>
<el-menu-item index="/active">活动中心</el-menu-item> <el-menu-item index="/active">活动中心</el-menu-item>
</el-menu> </el-menu>
<el-button v-if="type==2" @click="toSignUp" class="sign-up">立即报名</el-button> <el-button v-if="type==2" @click="toSignUp" class="sign-up">立即报名</el-button>
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
} }
if (this.type == 4) { if (this.type == 4) {
if (previousPath && if (previousPath &&
(previousPath == '/home' || (previousPath == '/' ||
previousPath == '/active' || previousPath == '/active' ||
previousPath.indexOf('/active/') != -1)) { previousPath.indexOf('/active/') != -1)) {
await this.$router.replace({ await this.$router.replace({
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
// export const SERVER_WS_URL = "wss://apiy.thuers.com"; // websocket // export const SERVER_WS_URL = "wss://apiy.thuers.com"; // websocket
// 测试 // 测试
export const SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; // 正式环境 // export const SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; //开发环境 // export const DEVELOPMENT_SERVER_URL = "https://tgwapi.campcenter.cn/modules-campsite"; //开发环境
export const SERVER_WS_URL = "wss://tgwapi.campcenter.cn"; // websocket // export const SERVER_WS_URL = "wss://tgwapi.campcenter.cn"; // websocket
// 正式 // 正式
// export const SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; // 正式环境 export const SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; //开发环境 export const DEVELOPMENT_SERVER_URL = "https://gwapi.campcenter.cn/modules-campsite"; //开发环境
// export const SERVER_WS_URL = "wss://gwapi.campcenter.cn"; // websocket export const SERVER_WS_URL = "wss://gwapi.campcenter.cn"; // websocket
// 测试 // 测试
// export const SERVER_URL = "http:// 8088/modules-campsite"; // 正式环境 // export const SERVER_URL = "http:// 8088/modules-campsite"; // 正式环境
......
export default [ export default [
{ {
path: '/home', path: '/',
name: 'base-home', name: 'base-home',
component: () => import(/* webpackChunkName: "login" */ 'v/base/home/Home.vue'), component: () => import(/* webpackChunkName: "login" */ 'v/base/home/Home.vue'),
meta: { meta: {
......
...@@ -25,7 +25,6 @@ const routes = [ ...@@ -25,7 +25,6 @@ const routes = [
meta: { meta: {
title: '' title: ''
}, },
redirect: '/home',
component: () => import('v/base/Index.vue'), component: () => import('v/base/Index.vue'),
children: [...indexHome, ...indexActive] children: [...indexHome, ...indexActive]
}, },
...@@ -197,11 +196,10 @@ function checkCam(code, cb) { ...@@ -197,11 +196,10 @@ function checkCam(code, cb) {
} }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
console.log(from) if (!(from.path == '/' && from.name == null) &&
if (from.path != '/' && (from.path != '/baseLogin' &&
from.path != '/baseLogin' &&
from.path != '/baseRegister' && from.path != '/baseRegister' &&
from.path != '/baseReset') { from.path != '/baseReset')) {
store.commit('setPreviousPath', from.path); store.commit('setPreviousPath', from.path);
} }
if (to.query && to.query.disCode) { if (to.query && to.query.disCode) {
...@@ -214,7 +212,7 @@ router.beforeEach((to, from, next) => { ...@@ -214,7 +212,7 @@ router.beforeEach((to, from, next) => {
toBaseLogin = "/baseLogin", toBaseLogin = "/baseLogin",
toBaseRegister = "/baseRegister", toBaseRegister = "/baseRegister",
toBaseReset = "/baseReset", toBaseReset = "/baseReset",
toHome = "/home", toHome = "/",
toActive = "/active", toActive = "/active",
toInfo = "/myInfo"; toInfo = "/myInfo";
let code = false; let code = false;
......
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