Commit 1606f8e3 authored by zhangdd's avatar zhangdd

chore:modify dev server url

Signed-off-by: default avatarzhangdd <86431843@qq.com>
parent 271ff125
......@@ -3,15 +3,16 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"serve": "cross-env NODE_ENV=local vue-cli-service serve",
"build": "cross-env NODE_ENV=dev vue-cli-service build ",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.26.1",
"core-js": "^3.21.1",
"vue": "^3.2.31",
"cross-env": "^7.0.3",
"element-plus": "^2.1.4",
"vue": "^3.2.31",
"vue-router": "^4.0.14"
},
"devDependencies": {
......
import axios from 'axios';
import {hideLoading, showLoading} from './loading'
axios.defaults.baseURL = 'http://localhost:8080'
if (process.env.NODE_ENV != 'local') {
axios.defaults.baseURL = 'http://192.168.36.27:8080/'
} else {
axios.defaults.baseURL = 'http://localhost:8080/'
}
axios.defaults.timeout = 10000
const service = axios.create()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment