From 0959c095ad9715633d6ccdf10eb3b3d52f0bede1 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 09 五月 2023 09:31:46 +0800 Subject: [PATCH] 2023.5.9前所有小改动版本记录 --- src/api/index.js | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 92b4ad8..f6755aa 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -4,8 +4,8 @@ const ip1 = 'http://47.100.191.150:9005/'; // const ip1 = 'http://192.168.1.12: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.6: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