修改服务器地址选择错误问题
parent
603bdb8478
commit
471a2ae0c2
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue