wanggang 1 year ago
parent
commit
4cde3a646d
  1. 2
      code/WebApp/vue/.env.development
  2. 4
      code/WebApp/vue/.env.production
  3. 15
      code/WebApp/vue/src/store/modules/user.js

2
code/WebApp/vue/.env.development

@ -4,7 +4,7 @@ ENV = 'development'
# base api # base api
VUE_APP_BASE_API = 'http://dev.ccwin-in.com:10582' VUE_APP_BASE_API = 'http://dev.ccwin-in.com:10582'
# authserver api # authserver api
VUE_APP_AUTHSERVER_API= 'http://dev.ccwin-in.com:10580' VUE_APP_AUTHSERVER_API= 'http://dev.ccwin-in.com:10582'
# app_storage_api # app_storage_api
VUE_APP_STORAGE_API= 'http://localhost:59958' VUE_APP_STORAGE_API= 'http://localhost:59958'

4
code/WebApp/vue/.env.production

@ -2,9 +2,9 @@
ENV = 'production' ENV = 'production'
# base api # base api
VUE_APP_BASE_API = 'http://microserverappgateway.domain.com' VUE_APP_BASE_API = 'http://dev.ccwin-in.com:10582'
# authserver api # authserver api
VUE_APP_AUTHSERVER_API= 'http://microserverauth.domain.com' VUE_APP_AUTHSERVER_API= 'http://dev.ccwin-in.com:10582'
# app_storage_api # app_storage_api
VUE_APP_STORAGE_API= 'microserverfilestorage.domain.com' VUE_APP_STORAGE_API= 'microserverfilestorage.domain.com'

15
code/WebApp/vue/src/store/modules/user.js

@ -55,10 +55,9 @@ const actions = {
}) })
}, },
userLogin({ commit }, data) { // 用户登录 userLogin({ commit }, data) { // 用户登录
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axiosMethods.instancePosts('/connect/token', data) axiosMethods.instancePosts('/api/connect-token', data)
.then(response => { .then(response => {
commit('SET_TOKEN', response.access_token) commit('SET_TOKEN', response.access_token)
setToken(response.access_token) setToken(response.access_token)
@ -68,6 +67,18 @@ const actions = {
}) })
}) })
}, },
// userLogin({ commit }, data) { // 用户登录
// return new Promise((resolve, reject) => {
// axiosMethods.instancePosts('/connect/token', data)
// .then(response => {
// commit('SET_TOKEN', response.access_token)
// setToken(response.access_token)
// resolve()
// }).catch((error) => {
// reject(error)
// })
// })
// },
// get user info // get user info
getInfo({ commit }) { getInfo({ commit }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

Loading…
Cancel
Save