From 6d9d071430c84284ec1f78d9325c414b90f6eed4 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Thu, 08 Sep 2022 17:13:20 +0800
Subject: [PATCH] 异常
---
.env.development | 6 +++---
src/utils/request.ts | 10 ++++------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/.env.development b/.env.development
index ee719e1..d739dab 100644
--- a/.env.development
+++ b/.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'
#本地外包预发接口地址
diff --git a/src/utils/request.ts b/src/utils/request.ts
index d492817..712c188 100644
--- a/src/utils/request.ts
+++ b/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);
// 转换失败返回一个空对象
--
Gitblit v1.9.2