forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-08 773202dedf12895e365d03dcdedde949514fc956
gz-customerSystem/src/api/apiHandler.js
@@ -2,7 +2,7 @@
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-02-16 11:28:12
 * @LastEditTime: 2024-08-27 11:18:41
 * @LastEditTime: 2024-09-07 16:45:38
 * @LastEditors: dminyi 1301963064@qq.com
 * @Version: 1.0.0
 * @Description: axios处理方法
@@ -57,8 +57,8 @@
   
   const url =
      value.service === 'sys'
         ? `${appUrl.fileUrl}/${appUrl[value.service] || ''}/api/v1/${value.url}`
         : `${appUrl.baseUrl}/${appUrl[value.service] || ''}/api/v1/${value.url}`;
         ? `${appUrl.fileUrl}/${appUrl[value.service] || ''}/api/web/${value.url}`
         : `${appUrl.baseUrl}/${appUrl[value.service] || ''}/api/web/${value.url}`;
   if (value.type === 'get') {
      return ax
@@ -70,7 +70,18 @@
            networkException(err);
            return { type: false };
         });
   } else {
   } else if (value.type === 'delete') {
      return ax
         .delete(url, { params: data, headers: { 'Authorization': token } })
         .then((response) => {
            return resHandle(response.data);
         })
         .catch((err) => {
            networkException(err);
            return { type: false };
         });
   }
   else {
      return ax
         .post(url, data, { headers: { 'Authorization': token } })
         .then((response) => {