修复Workerman请求地址回退问题
Some checks failed
Release pipeline / publish (push) Has been cancelled
Release pipeline / Always run job (push) Has been cancelled

This commit is contained in:
sheng
2026-06-25 11:33:22 +08:00
parent f7fd0b165c
commit 0e8c7ac44e

View File

@@ -1,7 +1,8 @@
import axios from 'axios'
const WORKERMAN_URL = process.env.VUE_APP_WORKERMAN_URL || 'http://127.0.0.1:34351'
const workerman = axios.create({
baseURL: process.env.VUE_APP_WORKERMAN_URL,
timeout: 10000,
headers: {
'Content-Type': 'application/json'
@@ -13,7 +14,7 @@ function normalizePayload (data = {}) {
}
export function sendWorkerman (data) {
return workerman.post('', normalizePayload(data)).then(response => response.data)
return workerman.post(WORKERMAN_URL, normalizePayload(data)).then(response => response.data)
}
export function trayLogin (param) {