|
@@ -31,15 +31,13 @@ export const myRequest = (options) => {
|
|
|
url: BASE_URL + options.url,
|
|
|
method: options.method || "GET",
|
|
|
data: options.data,
|
|
|
- header: options.noToken ?
|
|
|
- {
|
|
|
- TenantId: tenantId,
|
|
|
- } :
|
|
|
- {
|
|
|
- AuthorizationToken: "WX " + (token ? token : uni.getStorageSync(
|
|
|
- "token_temp")),
|
|
|
- TenantId: tenantId,
|
|
|
- },
|
|
|
+ header: options.noToken ? {
|
|
|
+ TenantId: tenantId,
|
|
|
+ } : {
|
|
|
+ AuthorizationToken: "WX " + (token ? token : uni.getStorageSync(
|
|
|
+ "token_temp")),
|
|
|
+ TenantId: tenantId,
|
|
|
+ },
|
|
|
success: async (res) => {
|
|
|
if (!options.compleLoading) {
|
|
|
// 请求的接口有带compleLoading 就不隐藏加载中
|
|
@@ -93,15 +91,14 @@ export const myRequest = (options) => {
|
|
|
});
|
|
|
reject();
|
|
|
} else if (res.data.code == 601) {
|
|
|
+ uni.switchTab({
|
|
|
+ url: "/pages/learn/index",
|
|
|
+ });
|
|
|
uni.showModal({
|
|
|
content: res.data.msg,
|
|
|
showCancel: false,
|
|
|
success: (k) => {
|
|
|
- if (k.confirm) {
|
|
|
- uni.switchTab({
|
|
|
- url: "/pages/index/index",
|
|
|
- });
|
|
|
- }
|
|
|
+ if (k.confirm) {}
|
|
|
},
|
|
|
});
|
|
|
reject();
|