Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
@@ -10,7 +10,8 @@ let instance = axios.create({
|
||||
})
|
||||
instance.interceptors.request.use(config => {
|
||||
store.commit('initWaterMarker')
|
||||
if (/AppCountryAlbum/.test(location.pathname)) {
|
||||
console.log(config)
|
||||
if (/AppCountryAlbum/.test(location.pathname)||config.module=='AppCountryAlbum') {
|
||||
config.baseURL = '/aca'
|
||||
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
||||
} else if (/\/node\//.test(config.url)) {
|
||||
|
||||
@@ -32,9 +32,11 @@ export default {
|
||||
target() {
|
||||
return decodeURIComponent(this.$route.query.back) || ""
|
||||
},
|
||||
currentApp() {
|
||||
return this.apps.find(e => this.target.indexOf(e.libPath) > -1) || {}
|
||||
},
|
||||
appPath() {
|
||||
let app = this.apps.find(e => this.target.indexOf(e.libPath) > -1)
|
||||
return app?.label || ""
|
||||
return this.currentApp?.label || ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -48,7 +50,8 @@ export default {
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(v => {
|
||||
if (v) {
|
||||
this.getToken(this.form).then(() => {
|
||||
let {name: module} = this.currentApp
|
||||
this.getToken({...this.form, module}).then(() => {
|
||||
this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({})
|
||||
}).catch(() => 0)
|
||||
}
|
||||
|
||||
@@ -179,9 +179,11 @@ const store = new Vuex.Store({
|
||||
return encrypted.toString();
|
||||
}
|
||||
}
|
||||
let {module} = params
|
||||
return new Promise((resolve, reject) => {
|
||||
http.post("/auth/oauth/token", null, {
|
||||
withoutToken: true,
|
||||
module,
|
||||
params: {
|
||||
...params, grant_type: 'password',
|
||||
password: encryptByDES(params.password)
|
||||
|
||||
Reference in New Issue
Block a user