Commit 13e413d3 authored by leiqingsong's avatar leiqingsong

Merge branch 'dev_lqs' into 'master'

修改

See merge request !77
parents db1943c0 0572815e
...@@ -163,31 +163,31 @@ const router = new VueRouter({ ...@@ -163,31 +163,31 @@ const router = new VueRouter({
routes routes
}); });
router.beforeEach((to, from, next) => { // router.beforeEach((to, from, next) => {
console.log('to', to); // console.log('to', to);
const whiteList = [ // const whiteList = [
"MyStatus", // "MyStatus",
"Publish", // "Publish",
"FastestProgress", // "FastestProgress",
"MonthAward", // "MonthAward",
"Settings", // "Settings",
"Grade", // "Grade",
"AirDrop", // "AirDrop",
"Invite", // "Invite",
"AboutUs", // "AboutUs",
"customerService", // "customerService",
"Wallet" // "Wallet"
]; // ];
const token = localStorage.getItem("token"); // const token = localStorage.getItem("token");
if (whiteList.indexOf(to.name) > -1) { // if (whiteList.indexOf(to.name) > -1) {
if (token) { // if (token) {
next() // next()
} else { // } else {
console.log('未登录'); // console.log('未登录');
} // }
} else { // } else {
next() // next()
} // }
}) // })
export default router; export default router;
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