From 3a154bdb0a5aaa2c0ac3eac95a6ba747068bd454 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 13 一月 2026 10:00:37 +0800
Subject: [PATCH] 优化
---
screen/src/utils/request.js | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/screen/src/utils/request.js b/screen/src/utils/request.js
index 490faed..f2c30c2 100644
--- a/screen/src/utils/request.js
+++ b/screen/src/utils/request.js
@@ -1,8 +1,8 @@
import axios from "axios"
const instance = axios.create({
- baseURL: '/gateway_interface',
- timeout: 10000,
+ baseURL: '/system_gateway',
+ timeout: 30000,
withCredentials: true,
headers: {
shopId: 1
@@ -18,11 +18,12 @@
export default instance
-export const request = (url, data) => {
+export const request = (url, data, method = 'GET') => {
return instance({
url: url,
- method: 'GET',
- params: { ...data }
+ method: method || 'GET',
+ params: method == 'GET' ? { ...data } : null,
+ data: method == 'POST' ? { ...data } : null
})
}
--
Gitblit v1.9.3