乡村相册登录选择调用

This commit is contained in:
aixianling
2022-05-31 10:31:01 +08:00
parent d395bd4085
commit c590644022
2 changed files with 5 additions and 5 deletions

View File

@@ -11,11 +11,11 @@ let instance = axios.create({
instance.interceptors.request.use(config => {
store.commit('initWaterMarker')
console.log(config)
if (/AppCountryAlbum/.test(location.pathname)||config.module=='AppCountryAlbum') {
if (/\/node\//.test(config.url)) {
config.baseURL = '/ns'
} else 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)) {
config.baseURL = '/ns'
} else if (/\/grid\//.test(location.pathname)) {
config.baseURL = '/wangge'
} else if (/\/project\/police\//.test(location.pathname)) {
@@ -50,7 +50,7 @@ instance.interceptors.response.use(res => {
return res.data
} else if (res.data.code == 401) {
store.commit("logout");
uni.showToast({title: "请登录用户!"})
uni.showToast({title: "请登录用户!", icon: "none"})
} else {
console.error(res.data.msg || "请求失败!")
return Promise.reject(res.data.msg)

View File

@@ -194,7 +194,7 @@ const store = new Vuex.Store({
}).then(res => {
if (res?.access_token) {
state.commit("login", [res?.token_type, res?.access_token].join(" ").trim())
state.dispatch("getAccount")
module != 'AppCountryAlbum' && state.dispatch("getAccount")
resolve()
}
}).catch(err => {