Your Name
2022-09-08 6d9d071430c84284ec1f78d9325c414b90f6eed4
异常
已修改2个文件
16 ■■■■■ 文件已修改
.env.development 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -1,7 +1,7 @@
# 本地环境
ENV = 'development'
#VITE_API_URL = 'http://192.168.0.35:8008'
VITE_API_URL = 'http://192.168.0.35:8008'
#李宇飞接口地址
#VITE_API_URL = 'http://192.168.0.50:8008'
@@ -22,10 +22,10 @@
#VITE_API_URL_OUT = 'http://121.239.169.27:16006/safeplatform-out'
#线上正式环境外包接口地址
VITE_API_URL = 'http://192.168.0.52:8011/safeplatform'
#VITE_API_URL = 'http://192.168.0.52:8011/safeplatform'
#本地预发接口地址
VITE_API_URL_OUT = 'http://192.168.0.52:8011/safeplatform-out'
#VITE_API_URL_OUT = 'http://192.168.0.52:8011/safeplatform-out'
#本地外包预发接口地址
src/utils/request.ts
@@ -41,12 +41,10 @@
            // if(data.indexOf('http://') === -1){
            //     return data
            // }else{
        if(typeof JSON.parse(data) === 'object'){
            return JSONbig.parse(data);
        };
            // }
        // if(typeof JSON.parse(data) === 'object'){
        //     return JSONbig.parse(data);
        // };
        return JSONbig.parse(data);
        } catch (err) {
            console.log(err);
            // 转换失败返回一个空对象