Commit 62723cca authored by 郭志伟's avatar 郭志伟

fix(backtop): 获取分享地址判断调整

parent a3fd3b6a
......@@ -8,9 +8,10 @@ export default {
getShopCartCount() {
return http.get(`${config.kdspHost}/api/kdsp/shop-cart/count`);
},
getMpSchema(params, appId) {
getMpSchema(params, appId, tenantId) {
return http.post(`${config.kdspHost}/api/kdsp/ka/info/getShareMiniUrl`, params, { emulateJSON: true, headers: {
'mini-app-id': appId
'mini-app-id': appId,
'qg-tenant-id': tenantId
} });
},
getWxConfig(url = window.location.href.split('#')[0]) {
......
......@@ -48,13 +48,15 @@ export default {
mpSchema: '',
link: '',
shareInfo: {},
wxAppId: cfg.appIdMap[+localStorage.get('tenantId')],
showShareOverlay: ((isWechat && !isWxMp) || isH5Normal) && !(localStorage.get('vccChannel') || localStorage.get('tenantId')),
isWechat
};
},
computed: {
...mapGetters(['pageData', 'pageInfo']),
wxAppId() {
return cfg.appIdMap[this.pageInfo.tenantId] || '';
},
backTopList() {
const btAttachVal = this.pageData.props?.btAttachVal || [];
if (isDef(this.cartIndex) && this.cartIndex !== -1 && btAttachVal.length) {
......@@ -108,10 +110,11 @@ export default {
async getMpSchema() {
if (isH5Normal && EASY_ENV_IS_BROWSER && this.wxAppId) {
try {
console.log(this.pageInfo.tenantId);
const [schema] = await api.getMpSchema({
miniUrl: WEAPP_PATH,
params: `url=${encodeURIComponent(JSON.stringify(this.link))}`
}, this.wxAppId);
}, this.wxAppId, this.pageInfo.tenantId);
this.mpSchema = schema;
} catch (error) {
......
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