From 8588fe30f17d0d28190a279aab8675de0dbf1a5b Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Wed, 16 Jul 2025 18:46:29 +0800
Subject: [PATCH] 个人添加图片
---
src/config/index.js | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/config/index.js b/src/config/index.js
index cb1ded3..3143a30 100644
--- a/src/config/index.js
+++ b/src/config/index.js
@@ -7,7 +7,12 @@
export const REQUEST_TIMEOUT = 30000
// 请求频率
+// 全局基础超时时间
export const TIME_OUT = 2000
+// 行情轮询间隔(毫秒) - 优化性能调整为5秒
+export const QUOTE_POLLING_INTERVAL = 5000
+// 缓存过期时间(毫秒)
+export const CACHE_EXPIRE = 5 * 60 * 1000 // 5分钟
// 表单类型key
export const CONTENT_TYPE = 'Content-Type'
@@ -35,21 +40,23 @@
// const ENV_DEV = 'zhapi.coinbtcs.com' // dev
// const ENV_DEV = 'openapi.yanshiz.com' // dev
-const ENV_DEV = '192.168.10.18:8086' // dev
+const ENV_DEV = import.meta.env.VITE_API_DOMAIN || 'starexapi.agtls.com' // devss
+// const ENV_DEV = '192.168.10.24:8086' // dev
+// const ENV_DEV = 'aa.yanshiz.com' // dev
// const ENV_PRO = 'qheufhj.site' // app域名
// const ENV_PRO = window.location.hostname // 接口域名跟随 H5zhapi.coinbtcs.com
// const ENV_PRO = 'openapi.yanshiz.com' // 接口域名跟随 H5zhapi.coinbtcs.com
-const ENV_PRO = '192.168.10.18:8086' // 接口域名跟随 H5zhapi.coinbtcs.com
+const ENV_PRO = import.meta.env.VITE_API_DOMAIN || 'starexapi.agtls.com' // 接口域名跟随
let base_url = ''
let ws_url = ''
let host_url = ''
if (import.meta.env.MODE === 'development') {
- host_url = 'http://' + ENV_DEV
- base_url = 'http://' + ENV_DEV
- ws_url = 'ws://' + ENV_DEV + '/api/websocket'
+ host_url = 'https://' + ENV_DEV
+ base_url = 'https://' + ENV_DEV
+ ws_url = 'wss://' + ENV_DEV + '/api/websocket'
} else {
host_url = 'https://' + ENV_PRO
base_url = 'https://' + ENV_PRO
@@ -58,7 +65,8 @@
export const BASE_URL = base_url
export const WS_URL = ws_url
export const IMG_PATH = host_url
-export const HOST_URL = host_url
+// export const HOST_URL = host_url
+export const HOST_URL = 'https://starex.agtls.com'; // 静态资源地址
export default {
sliderOptions: {
--
Gitblit v1.9.3