更新
This commit is contained in:
@@ -4,11 +4,11 @@ import utils from '@/utils/encode'
|
||||
// const env = process.env.NODE_ENV
|
||||
const env = 'production'/* */
|
||||
// const env = 'test'
|
||||
const testUrl = 'http://192.168.0.254:38080'
|
||||
const testUrl = 'http://192.168.110.77:38080'
|
||||
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
||||
|
||||
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
// const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
||||
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
||||
const service = axios.create({
|
||||
baseURL: env == 'production' ? productUrl : testUrl,
|
||||
// baseURL: testUrl,
|
||||
@@ -24,7 +24,7 @@ service.interceptors.request.use(
|
||||
})
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
const unionId = uni.getStorageSync('unionid')
|
||||
console.log(unionId)
|
||||
// console.log(unionId)
|
||||
const openId = uni.getStorageSync('openid')
|
||||
// const accountSources = 'WE_CHAT_PROGRAM'
|
||||
const accountSources = 'LOGIN_MP_WECHAT'
|
||||
@@ -35,6 +35,15 @@ service.interceptors.request.use(
|
||||
config.headers['accountSources'] = accountSources
|
||||
config.headers['imei'] = unionId
|
||||
config.headers['dataSources'] = 'MP'
|
||||
|
||||
console.log(config)
|
||||
|
||||
if(['/oil-site/oilSiteAppInfo/findKASiteInfoByPage','/oil-site/oilSiteAppInfo/getSiteDetailsByKA','/oil-site/oilSiteAppInfo/getSitePriceKAByBelong'].includes(config.url)) {
|
||||
let parentCompanyId = config.baseURL === 'https://www.xingoil.com/adminapi' ? '1812649739013771264' : '1810568376122056704'
|
||||
if(config.data.params) {
|
||||
config.data.params['parentCompanyId'] = parentCompanyId
|
||||
}else config.data['parentCompanyId'] = parentCompanyId
|
||||
}
|
||||
|
||||
if (env === 'production') {
|
||||
const JSESSIONID = utils.uuid()
|
||||
|
||||
Reference in New Issue
Block a user