lct
Your Name
2022-09-08 0a845649839ed1d5c23f5810142e396ea08f510b
lct
已修改4个文件
20 ■■■■■ 文件已修改
.env.development 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/uploaderFile/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.ts 9 ●●●● 补丁 | 查看 | 原始文档 | 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/components/uploaderFile/index.vue
@@ -65,7 +65,7 @@
            goalManagementApi()
                    .searchFile(uploadFile.name)
                    .then((res) => {
                        window.open(res.data, "_blank");
                        window.open(res.config.url, "_blank");
                    })
            dialogImageUrl.value = uploadFile.url!;
            // dialogVisible.value = true;
@@ -180,4 +180,4 @@
    .upload-demo{
        width: 100%;
    }
</style>
</style>
src/router/index.ts
@@ -66,7 +66,6 @@
// 路由加载前
router.beforeEach(async (to, from, next) => {
    debugger
    if (to.path === '/intelligentLine') {
        next();
    } else {
src/utils/request.ts
@@ -34,11 +34,16 @@
service.defaults.transformResponse = [
    function (data) {
        try {
    try {
            // 正常同通过return JSON.parse(data)对数据进行转换
            // 但是转化完成的数据可能超出安全数据长度
            // 因此我们定制使用第三包来转化
            return JSONbig.parse(data);
            // if(data.indexOf('http://') === -1){
            //     return data
            // }else{
                return JSONbig.parse(data);
            // }
        } catch (err) {
            console.log(err);
            // 转换失败返回一个空对象