Commit acdc46ce authored by liaozan's avatar liaozan 🏀

chore: update maven settings

parent 1606f8e3
...@@ -47,7 +47,6 @@ public class MavenUtils { ...@@ -47,7 +47,6 @@ public class MavenUtils {
private static String[] getArgs(ArchetypeGenerateParam param, String outputDirectory) { private static String[] getArgs(ArchetypeGenerateParam param, String outputDirectory) {
return new String[]{ return new String[]{
"-B", "-B",
"-X",
"archetype:generate", "archetype:generate",
"-DarchetypeGroupId=com.schbrain.kp", "-DarchetypeGroupId=com.schbrain.kp",
"-DarchetypeArtifactId=schbrain-archetype", "-DarchetypeArtifactId=schbrain-archetype",
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "cross-env NODE_ENV=local vue-cli-service serve", "serve": "cross-env NODE_ENV=dev vue-cli-service serve",
"build": "cross-env NODE_ENV=dev vue-cli-service build ", "build": "cross-env NODE_ENV=prod vue-cli-service build ",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
...@@ -26,4 +26,4 @@ ...@@ -26,4 +26,4 @@
"not dead", "not dead",
"not ie 11" "not ie 11"
] ]
} }
\ No newline at end of file
import axios from 'axios'; import axios from 'axios';
import {hideLoading, showLoading} from './loading' import {hideLoading, showLoading} from './loading'
if (process.env.NODE_ENV != 'local') { const envDict = {
axios.defaults.baseURL = 'http://192.168.36.27:8080/' 'dev': 'http://localhost:8080',
} else { 'prod': 'http://192.168.36.27:8080'
axios.defaults.baseURL = 'http://localhost:8080/'
} }
axios.defaults.baseURL = envDict[process.env.NODE_ENV]
axios.defaults.timeout = 10000 axios.defaults.timeout = 10000
const service = axios.create() 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