修改服务器地址选择错误问题

main
amuliang 2023-08-05 16:24:13 +08:00
parent 603bdb8478
commit 471a2ae0c2
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@
el: "#app", el: "#app",
data() { data() {
const ajax = axios.create({ const ajax = axios.create({
baseURL: document.location.href.indexOf('localhost') >= 0 ? 'http://localhost:5750' : 'http://musicdlr.amuliang.top:5750', baseURL: document.location.hostname == '' ? 'http://localhost:5750' : `http://${document.location.hostname}:5750`,
timeout: 20000, timeout: 20000,
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',