From 2a53d3e6774678eeebf2b0f028c6aec2c70a4774 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 10 十一月 2023 09:55:38 +0800
Subject: [PATCH] 2023.11.10

---
 src/api/index.js |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 92b4ad8..df62e89 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -2,10 +2,10 @@
 import { ElMessage } from 'element-plus';
 
 const ip1 = 'http://47.100.191.150:9005/';
-// const ip1 = 'http://192.168.1.12:8080/';
+// const ip1 = 'http://192.168.1.9:8080/';
 // const ip2 = 'http://47.100.191.150:9006/';
-// const ip2 = 'http://192.168.1.14:8080/';
-const ip2 = 'https://fyami.com.cn/'
+const ip2 = 'http://192.168.1.8:8080/';
+// const ip2 = 'https://fyami.com.cn/';
 
 //椋炵窘鐩戠
 const $fysp = axios.create({
@@ -30,6 +30,9 @@
       // 鍦ㄥ彂閫佽姹備箣鍓嶅仛浜涗粈涔�
       console.log('==>璇锋眰寮�濮�');
       console.log(`${config.baseURL}${config.url}`);
+      if (config.data) {
+        console.log('==>璇锋眰鏁版嵁', config.data);
+      }
       return config;
     },
     function (error) {
@@ -52,7 +55,15 @@
       console.log(response);
       console.log('==>璇锋眰缁撴潫');
       if (response.status == 200) {
-        return response.data
+        if (response.data.success != undefined && response.data.success != null) {
+          if (response.data.success == true) {
+            return response;
+          } else {
+            return Promise.reject(response.data.message);
+          }
+        } else {
+          return response;
+        }
       } else {
         return Promise.reject(response);
       }

--
Gitblit v1.9.3