|
|
@@ -4,6 +4,7 @@ import store from '@/store'
|
|
|
import { VueAxios } from './axios'
|
|
|
import router from '@/router/index'
|
|
|
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
|
|
|
+import { is } from 'tinymce'
|
|
|
|
|
|
/**
|
|
|
* 【指定 axios的 baseURL】
|
|
|
@@ -130,7 +131,9 @@ service.interceptors.request.use(config => {
|
|
|
const hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
|
|
|
if(hotelInfo && hotelInfo.id) {
|
|
|
if(!config.params) config.params = {}
|
|
|
- config.params['hotelId'] = hotelInfo.id
|
|
|
+ // 如果自己带了参数就不加了
|
|
|
+ let isQueryContain = config.url.indexOf('?')>-1 ? (config.url.split('?')[1].indexOf("hotelId=") > -1 ) : false
|
|
|
+ if(!config.params.hotelId && !isQueryContain) config.params['hotelId'] = hotelInfo.id
|
|
|
}
|
|
|
}
|
|
|
// update-end--author:sunjianlei---date:20200723---for 如果当前在low-app环境,并且携带了appId,就向Header里传递appId
|