|
@@ -63,16 +63,16 @@ request.interceptors.request.use(request => {
|
|
|
request.headers.token = getCookieValue('afhousetoken')
|
|
|
request.headers.tingbangSource = tingbangSource
|
|
|
if (platform.isWeixin) {
|
|
|
- request.headers.wechatToken = getCookieValue('afhousewechatToken')
|
|
|
+ // 因为微信开发者工具重复授权,本地开发时写死
|
|
|
+ if (/^(0|192|10|localhost)/.test(domain)) {
|
|
|
+ // request.url += '&owner_open_id=0c540a8d284b38f84d2f8ad262ab5d2c'
|
|
|
+ request.headers.wechatToken = '0c540a8d284b38f84d2f8ad262ab5d2c'
|
|
|
+ } else {
|
|
|
+ request.headers.wechatToken = getCookieValue('afhousewechatToken')
|
|
|
+ }
|
|
|
}
|
|
|
request.url = requestUrl + (requestUrl.indexOf('?') > -1 ? '&' : '?') + 'nextUrl=' + encodeURIComponent(location.href)
|
|
|
|
|
|
- // 因为微信开发者工具重复授权,本地开发时写死
|
|
|
- if (/^(0|192|10|localhost)|(test$)/.test(domain)) {
|
|
|
- // request.url += '&owner_open_id=0c540a8d284b38f84d2f8ad262ab5d2c'
|
|
|
- request.headers.wechatToken = '0c540a8d284b38f84d2f8ad262ab5d2c'
|
|
|
- }
|
|
|
-
|
|
|
// 判断当前请求是否设置了不显示Loading
|
|
|
if (request.showLoading) {
|
|
|
showLoading()
|