|
@@ -138,21 +138,25 @@ const checkFun = (to, from, next) => {
|
|
|
//如果funlist不存在,在更新版本号清空后,先重新请求再判断
|
|
|
var token = to.query.token;
|
|
|
if (token) {
|
|
|
- //这里token一定要存在,从微信模板消息带过来的
|
|
|
- API_User.getAllFunList(token).then(response => {
|
|
|
+ if (store.state.fun_list) {
|
|
|
+ checkAuth(to, from, next);
|
|
|
+ } else {
|
|
|
+ //这里token一定要存在,从微信模板消息带过来的
|
|
|
+ API_User.getAllFunList(token).then(response => {
|
|
|
|
|
|
- if (response && response.allIcon) {
|
|
|
- var allIcon = response.allIcon;
|
|
|
- store.commit('SET_FUN_LIST', allIcon);
|
|
|
+ if (response && response.allIcon) {
|
|
|
+ var allIcon = response.allIcon;
|
|
|
+ store.commit('SET_FUN_LIST', allIcon);
|
|
|
|
|
|
- checkAuth(to, from, next);
|
|
|
- } else {
|
|
|
- mui.toast('token已过期');
|
|
|
- }
|
|
|
+ checkAuth(to, from, next);
|
|
|
+ } else {
|
|
|
+ mui.toast('链接已过期');
|
|
|
+ }
|
|
|
|
|
|
- }).catch(error => {
|
|
|
- mui.toast(error);
|
|
|
- })
|
|
|
+ }).catch(error => {
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
checkAuth(to, from, next);
|
|
|
}
|