Commit d76a8d99 authored by Your Name's avatar Your Name

新页面访问

parent a72891f4
...@@ -3737,6 +3737,11 @@ ...@@ -3737,6 +3737,11 @@
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
"dev": true "dev": true
}, },
"copy-text-to-clipboard": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz",
"integrity": "sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q=="
},
"copy-webpack-plugin": { "copy-webpack-plugin": {
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz", "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz",
...@@ -7854,6 +7859,11 @@ ...@@ -7854,6 +7859,11 @@
"integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
"dev": true "dev": true
}, },
"mutation-observer": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/mutation-observer/-/mutation-observer-1.0.3.tgz",
"integrity": "sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA=="
},
"mute-stream": { "mute-stream": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
...@@ -11953,6 +11963,23 @@ ...@@ -11953,6 +11963,23 @@
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
"dev": true "dev": true
}, },
"vconsole": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/vconsole/-/vconsole-3.7.0.tgz",
"integrity": "sha512-wPZuQgwzgc4OFMgsXT/ZF3yzgG+CGfGvHK/38P41U4cDzgHe78kNtOhJ+V0HCS7NApo2liAg2npEqZV4q4qiCw==",
"requires": {
"copy-text-to-clipboard": "^3.0.1",
"core-js": "^3.11.0",
"mutation-observer": "^1.0.3"
},
"dependencies": {
"core-js": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.13.0.tgz",
"integrity": "sha512-iWDbiyha1M5vFwPFmQnvRv+tJzGbFAm6XimJUT0NgHYW3xZEs1SkCAcasWSVFxpI2Xb/V1DDJckq3v90+bQnog=="
}
}
},
"vendors": { "vendors": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz",
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
"js-base64": "^3.6.0", "js-base64": "^3.6.0",
"qs": "^6.10.1", "qs": "^6.10.1",
"vant": "^2.12.6", "vant": "^2.12.6",
"vconsole": "^3.7.0",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-router": "^3.5.1" "vue-router": "^3.5.1"
}, },
......
...@@ -13,6 +13,7 @@ import { Form,FormItem,Input,Button,Message } from 'element-ui'; ...@@ -13,6 +13,7 @@ import { Form,FormItem,Input,Button,Message } from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
// 自定义tabbar // 自定义tabbar
import Mytabbar from '@/components/tabbar/index.vue' import Mytabbar from '@/components/tabbar/index.vue'
import vConsole from 'vconsole'
Vue.component('my-tabbar',Mytabbar) Vue.component('my-tabbar',Mytabbar)
Vue.use(Vant); Vue.use(Vant);
...@@ -22,6 +23,7 @@ Vue.component(Input.name, Input); ...@@ -22,6 +23,7 @@ Vue.component(Input.name, Input);
Vue.component(Button.name, Button); Vue.component(Button.name, Button);
Vue.component(Message.name, Message); Vue.component(Message.name, Message);
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts
Vue.prototype.$vConsole = new vConsole()
Vue.prototype.$qs = qs Vue.prototype.$qs = qs
Vue.prototype.$https = http Vue.prototype.$https = http
Vue.prototype.$shttp = sRequest Vue.prototype.$shttp = sRequest
......
...@@ -110,9 +110,14 @@ router.beforeEach((to, from, next) => { ...@@ -110,9 +110,14 @@ router.beforeEach((to, from, next) => {
} }
}else{ }else{
if (!user && !whiteList.includes(to.path)) { // 通过vuex state获取当前的token是否存在 if (!user && !whiteList.includes(to.path)) { // 通过vuex state获取当前的token是否存在
console.log(to)
if (to.path === '/guide') {
next(to.path)
} else {
next({ next({
path: '/login', path: '/login',
}) })
}
}else { }else {
next(); next();
} }
......
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