From 91513e171078ed6b0887f87b9fced33895d6d3fb Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 08 七月 2025 08:35:50 +0800 Subject: [PATCH] 2025.7.8 --- src/api/index.js | 39 +++++++++++++++++++++++---------------- 1 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 69a55fe..a501280 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,22 +1,24 @@ import axios from 'axios' import { ElMessage } from 'element-plus' -const debug = true +const debug = false -let ip1 = 'http://47.100.191.150:9005/' +var IP = '47.100.191.150' +var PORT = '9005' +if (debug) { + // IP = '192.168.0.103' + IP = 'localhost' + PORT = '9001' +} + +let ws = `${IP}:${PORT}` +let ip1 = `http://${IP}:${PORT}/` + let ip1_file = 'http://47.100.191.150:9005/' // let ip1 = 'https://fyami.com.cn:447/'; // let ip1_file = 'https://fyami.com.cn:447/'; let ip2 = 'https://fyami.com.cn/' let ip2_file = 'https://fyami.com.cn/' - -if (debug) { - ip1 = 'http://192.168.0.138:8082/' - // ip1 = 'http://localhost:8080/' - // ip1_file = 'http://47.100.191.150:9005/'; - // ip2 = 'http://192.168.0.138:8080/'; - // ip2_file = 'https://fyami.com.cn/'; -} //椋炵窘鐩戠 const $fysp = axios.create({ @@ -39,11 +41,11 @@ i.interceptors.request.use( function (config) { // 鍦ㄥ彂閫佽姹備箣鍓嶅仛浜涗粈涔� - console.log('==>璇锋眰寮�濮�') - console.log(`${config.baseURL}${config.url}`) - if (config.data) { - console.log('==>璇锋眰鏁版嵁', config.data) - } + // console.log('==>璇锋眰寮�濮�') + // console.log(`${config.baseURL}${config.url}`) + // if (config.data) { + // console.log('==>璇锋眰鏁版嵁', config.data) + // } return config }, function (error) { @@ -63,6 +65,11 @@ function (response) { // 2xx 鑼冨洿鍐呯殑鐘舵�佺爜閮戒細瑙﹀彂璇ュ嚱鏁般�� // 瀵瑰搷搴旀暟鎹仛鐐逛粈涔� + console.log('==>璇锋眰寮�濮�') + console.log(`${response.config.baseURL}${response.config.url}`) + if (response.config.data) { + console.log('==>璇锋眰鏁版嵁', response.config.data) + } console.log(response) console.log('==>璇锋眰缁撴潫') if (response.status == 200) { @@ -97,4 +104,4 @@ ) }) -export { $fysp, $fytz } +export { $fysp, $fytz, ws } -- Gitblit v1.9.3