.
This commit is contained in:
@@ -22,15 +22,7 @@ const CategoryApi = {
|
||||
url: '/product/category/tree',
|
||||
method: 'GET',
|
||||
});
|
||||
},
|
||||
// 测试
|
||||
test: (data) => {
|
||||
return request({
|
||||
url: '/cloth/list',
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
export default CategoryApi;
|
||||
|
||||
@@ -75,7 +75,7 @@ http.interceptors.request.use(
|
||||
// 自定义处理【auth 授权】:必须登录的接口,则跳出 AuthModal 登录弹窗
|
||||
if (config.custom.auth && !$store('user').isLogin) {
|
||||
// showAuthModal();
|
||||
sheep.$router.go('/pages/login/index', {}, { redirect: true });
|
||||
uni.redirectTo({ url: "/pages/login/index" });
|
||||
return Promise.reject();
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ const refreshToken = async (config) => {
|
||||
const handleAuthorized = () => {
|
||||
const userStore = $store('user');
|
||||
userStore.logout(true);
|
||||
sheep.$router.go('/pages/login/index', {}, { redirect: true });
|
||||
uni.redirectTo({ url: "/pages/login/index" });
|
||||
// 登录超时
|
||||
return Promise.reject({
|
||||
code: 401,
|
||||
|
||||
@@ -60,7 +60,7 @@ const _go = (
|
||||
// 页面登录拦截
|
||||
if (nextRoute.meta?.auth && !$store('user').isLogin) {
|
||||
// showAuthModal();
|
||||
sheep.$router.go('/pages/login/index', {}, { redirect: true });
|
||||
uni.redirectTo({ url: "/pages/login/index" });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user