抽离全局变量
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user