@mu-cabin/opms-permission 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -206,9 +206,12 @@ axiosClient.interceptors.request.use((config) => {
|
|
206
206
|
axiosClient.interceptors.response.use(
|
207
207
|
(response) => {
|
208
208
|
const res = response.data;
|
209
|
-
const { code, msg } = res;
|
210
|
-
if (
|
211
|
-
|
209
|
+
const { success, code, msg } = res;
|
210
|
+
if (!success) {
|
211
|
+
return Promise.reject({
|
212
|
+
code,
|
213
|
+
msg
|
214
|
+
});
|
212
215
|
}
|
213
216
|
return res;
|
214
217
|
},
|
package/dist/index.mjs
CHANGED
@@ -168,9 +168,12 @@ axiosClient.interceptors.request.use((config) => {
|
|
168
168
|
axiosClient.interceptors.response.use(
|
169
169
|
(response) => {
|
170
170
|
const res = response.data;
|
171
|
-
const { code, msg } = res;
|
172
|
-
if (
|
173
|
-
|
171
|
+
const { success, code, msg } = res;
|
172
|
+
if (!success) {
|
173
|
+
return Promise.reject({
|
174
|
+
code,
|
175
|
+
msg
|
176
|
+
});
|
174
177
|
}
|
175
178
|
return res;
|
176
179
|
},
|