修复Workerman请求地址回退问题
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user