diff --git a/ms-web/config/index.js b/ms-web/config/index.js index 924e1fa..33bf3e4 100644 --- a/ms-web/config/index.js +++ b/ms-web/config/index.js @@ -14,7 +14,7 @@ module.exports = { // Various Dev Server settings host: 'localhost', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 80, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, diff --git a/ms-web/src/components/SignIn.vue b/ms-web/src/components/SignIn.vue index 8650097..ecf6b20 100644 --- a/ms-web/src/components/SignIn.vue +++ b/ms-web/src/components/SignIn.vue @@ -42,9 +42,9 @@ return signIn }, methods: { - signIn: function () { + signIn () { let that = this - that.$http.post('http://fthipw.natappfree.cc:10006/upms/user/login', that.$querystring.stringify(signIn)) + that.$http.post(that.$msConfig.reqUpms + '/user/login', that.$querystring.stringify(signIn)) .then(response => { console.log(response.data) }, error => { diff --git a/ms-web/src/main.js b/ms-web/src/main.js index d5c4d62..212190d 100644 --- a/ms-web/src/main.js +++ b/ms-web/src/main.js @@ -19,6 +19,13 @@ Vue.prototype.$http = axios // 用于转换json数据 let querystring = require('querystring') Vue.prototype.$querystring = querystring +// 全局参数配置 +Vue.prototype.$msConfig = { + // ms系统的请求的基础路径 + reqBaseUrl: 'http://fthipw.natappfree.cc', + // 权限管理系统请求的基础路径 + reqUpms: this.reqBaseUrl + ':10006/upms' +} // admin模块的state和action const admin = new Vuex.Store({ // 模块的state