|
|
@ -7,8 +7,8 @@ const env = 'production'/* */ |
|
|
|
const testUrl = 'http://192.168.0.23:38080' |
|
|
|
const testUrl = 'http://192.168.0.23:38080' |
|
|
|
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
|
|
|
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
|
|
|
|
|
|
|
|
|
|
|
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
|
|
|
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
|
|
|
const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
|
|
|
// const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
|
|
|
const service = axios.create({ |
|
|
|
const service = axios.create({ |
|
|
|
baseURL: env == 'production' ? productUrl : testUrl, |
|
|
|
baseURL: env == 'production' ? productUrl : testUrl, |
|
|
|
// baseURL: testUrl,
|
|
|
|
// baseURL: testUrl,
|
|
|
@ -26,10 +26,7 @@ service.interceptors.request.use( |
|
|
|
const unionId = uni.getStorageSync('unionid') |
|
|
|
const unionId = uni.getStorageSync('unionid') |
|
|
|
console.log(unionId) |
|
|
|
console.log(unionId) |
|
|
|
const openId = uni.getStorageSync('openid') |
|
|
|
const openId = uni.getStorageSync('openid') |
|
|
|
// const accountSources = 'WE_CHAT_PROGRAM'
|
|
|
|
|
|
|
|
const accountSources = 'LOGIN_MP_WECHAT' |
|
|
|
const accountSources = 'LOGIN_MP_WECHAT' |
|
|
|
// console.log('取出来缓存', token, openid)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.headers['openId'] = openId |
|
|
|
config.headers['openId'] = openId |
|
|
|
config.headers['Authorization'] = token |
|
|
|
config.headers['Authorization'] = token |
|
|
|
config.headers['accountSources'] = accountSources |
|
|
|
config.headers['accountSources'] = accountSources |
|
|
|