Commit 75ddd5f2 authored by 徐光星's avatar 徐光星

Merge branch 'master' of http://git.quantgroup.cn/ui/quantum-block-h5 into feat/history

parents 774aed16 d2008a09
...@@ -28,12 +28,15 @@ export default { ...@@ -28,12 +28,15 @@ export default {
hideLoading: true hideLoading: true
}); });
}, },
getFinanceSetting() { getFinanceSetting(appChannel) {
const customHeader: any = {}; const customHeader: any = {};
if (EASY_ENV_IS_BROWSER) { if (EASY_ENV_IS_BROWSER) {
const ua = window.navigator.userAgent; const ua = window.navigator.userAgent;
const appVersion = ua.match(/xyqb\/([\d|.]+)/) ? (ua.match(/xyqb\/([\d|.]+)/) as string[])[1] : '8.2.00'; const appVersion = ua.match(/xyqb\/([\d|.]+)/) ? (ua.match(/xyqb\/([\d|.]+)/) as string[])[1] : '8.2.00';
customHeader.version = appVersion; customHeader.version = appVersion;
if (appChannel) {
customHeader.appChannel = appChannel;
}
} }
// return http.post(`http://yapi.quantgroups.com/mock/351/api/kdsp/api/kdsp/vcc_switch`, { // return http.post(`http://yapi.quantgroups.com/mock/351/api/kdsp/api/kdsp/vcc_switch`, {
......
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
} else if (isWechat && !isWxMp) { } else if (isWechat && !isWxMp) {
const { shareOpenMethod, link: url } = this; const { shareOpenMethod, link: url } = this;
const jumpUrl = shareOpenMethod === 1 ? WEAPP_PATH : APP_PATH; const jumpUrl = shareOpenMethod === 1 ? WEAPP_PATH : APP_PATH;
window.location.href = `${cfg.mallHost}/common/launch?jumpUrl=${jumpUrl}&terminal=${shareOpenMethod}&extraInfo=${encodeURIComponent(JSON.stringify({ url }))}`; window.location.href = `${cfg.mallHost}/common/launch?jumpUrl=${jumpUrl}&terminal=${shareOpenMethod || 2}&extraInfo=${encodeURIComponent(JSON.stringify({ url }))}`;
} }
}, },
handleBackTopClick(e = {}) { handleBackTopClick(e = {}) {
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
console.log(e); console.log(e);
} }
const { coverImage, pageName, pageDescribe } = this.pageInfo; const { coverImage, pageName, pageDescribe } = this.pageInfo;
let link = `${window.location.origin}${window.location.pathname}?vccToken={token}&tenantId=${localStorage.get('tenantId') || ''}`; let link = `${window.location.origin}${window.location.pathname}?vccToken={token}&tenantId=${localStorage.get('tenantId') || ''}&appChannel={appChannel}`;
if (this.getUrlParamsVal('navId') !== false && this.getUrlParamsVal('index') !== false) { if (this.getUrlParamsVal('navId') !== false && this.getUrlParamsVal('index') !== false) {
// 向分享URL中填充导航ID与位置索引 // 向分享URL中填充导航ID与位置索引
link += `&navId=${this.getUrlParamsVal("navId")}&index=${this.getUrlParamsVal('index')}` link += `&navId=${this.getUrlParamsVal("navId")}&index=${this.getUrlParamsVal('index')}`
......
...@@ -160,8 +160,8 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle ...@@ -160,8 +160,8 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
return; return;
} }
} }
const appChannel = localStorage.get('appChannel') || '';
const [res, ] = await editorApi.getFinanceSetting(); const [res, ] = await editorApi.getFinanceSetting(appChannel);
const [serverTime, ] = await editorApi.getServerTime(); const [serverTime, ] = await editorApi.getServerTime();
// console.log(res, 'finance result'); // console.log(res, 'finance result');
// console.log(serverTime, 'time'); // console.log(serverTime, 'time');
......
...@@ -3,7 +3,7 @@ import { loginSa } from './sa.service'; ...@@ -3,7 +3,7 @@ import { loginSa } from './sa.service';
import Cookies from './cookieStorage.service'; import Cookies from './cookieStorage.service';
import localStorage from './localStorage.service'; import localStorage from './localStorage.service';
// formXcxPage:标识是从小程序跳转过来的; // formXcxPage:标识是从小程序跳转过来的;
const localStorageParams = ['creditToken', 'vccToken', 'vccChannel', 'sonVccChannel', 'formXcxPage', 'tenantId', 'distinctID']; const localStorageParams = ['creditToken', 'vccToken', 'vccChannel', 'sonVccChannel', 'formXcxPage', 'tenantId', 'distinctID', 'appChannel'];
const cookiesParams = ['h']; const cookiesParams = ['h'];
export default { export default {
......
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