Commit 2e7da882 authored by Xuguangxing's avatar Xuguangxing

fix

parent 92af23ac
import HttpRequest from '@qg/ui-request'; import HttpRequest from '@qg/ui-request';
import { Toast } from '@qg/cherry-ui'; import { Toast } from '@qg/cherry-ui';
import store from '@/store'; import store from '@/store';
import { appVersion } from '@/service/validation.service'; import { appVersion, isWxMp } from '@/service/validation.service';
import { getVccChannel } from './userInfo.service'; import { getVccChannel } from './userInfo.service';
import localStorage from '@/service/localStorage.service'; import localStorage from '@/service/localStorage.service';
function getURLSearchParams(json) { function getURLSearchParams(json) {
...@@ -45,6 +45,7 @@ const http = new HttpRequest( ...@@ -45,6 +45,7 @@ const http = new HttpRequest(
if (cfg.customHeader) { if (cfg.customHeader) {
Object.assign(cfg.headers, cfg.customHeader); Object.assign(cfg.headers, cfg.customHeader);
} }
cfg.headers['x-user-terminal'] = isWxMp ? 'MINI-APP' : 'H5';
cfg.headers['vccChannel'] = getVccChannel(); cfg.headers['vccChannel'] = getVccChannel();
cfg.headers['sonVccChannel'] = getVccChannel('sonVccChannel'); cfg.headers['sonVccChannel'] = getVccChannel('sonVccChannel');
if (method === 'post' && cfg.emulateJSON) { if (method === 'post' && cfg.emulateJSON) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment