|
|
@@ -42,18 +42,19 @@ router.beforeEach(async (to, from, next) => {
|
|
|
|
|
|
if(whiteList.indexOf(to.path)<0 && !userToken){
|
|
|
console.log('----------------------')
|
|
|
- await tools.weiXinLogin().then(isLogin=>{
|
|
|
- console.log('-----------isLogin-----------')
|
|
|
- if(isLogin===-1){
|
|
|
- next('/pages/login/register');
|
|
|
- }else if(isLogin){
|
|
|
- next();
|
|
|
- }else {
|
|
|
- next('/pages/login/index');
|
|
|
- }
|
|
|
- }).catch(e=>{
|
|
|
- next('/pages/login/index');
|
|
|
- })
|
|
|
+ // await tools.weiXinLogin().then(isLogin=>{
|
|
|
+ // console.log('-----------isLogin-----------')
|
|
|
+ // if(isLogin===-1){
|
|
|
+ // next('/pages/login/register');
|
|
|
+ // }else if(isLogin){
|
|
|
+ // next();
|
|
|
+ // }else {
|
|
|
+ // next('/pages/login/index');
|
|
|
+ // }
|
|
|
+ // }).catch(e=>{
|
|
|
+ // next('/pages/login/index');
|
|
|
+ // })
|
|
|
+ next('/pages/login/index');
|
|
|
|
|
|
// next();
|
|
|
}else {
|