Commit b2551092 authored by guang.wu's avatar guang.wu

fix: 修改购物车跳转

parent fd6d4f05
......@@ -7,6 +7,7 @@ const hostMap = {
kdspHost: `${protocol}//kdsp-api-ds.liangkebang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
mallHost: `${protocol}//mall-ds.liangkebang.net`,
h5MallHost: `${protocol}//xincheng-ds.liangkebang.net`,
xyqbH5Host: `${protocol}//mapi-ds.liangkebang.net`,
test: true,
yxmTenantId: 560761,
......
......@@ -8,6 +8,7 @@ const hostMap = {
kdspHost: `${protocol}//kdsp-api.q-gp.com`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`,
mallHost: `${protocol}//mall.q-gp.com`,
h5MallHost: `${protocol}//saas.q-gp.com`,
xyqbH5Host: `${protocol}//h5-api.q-gp.com`,
test: false,
yxmTenantId: 560761,
......
......@@ -7,6 +7,7 @@ const hostMap = {
kdspHost: `${protocol}//kdsp-api-test1.liangkebang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
mallHost: `${protocol}//mall-test1.liangkebang.net`,
h5MallHost: `${protocol}//xincheng-test1.liangkebang.net`,
xyqbH5Host: `${protocol}//mapi-test1.liangkebang.net`,
test: true,
yxmTenantId: 560761,
......
......@@ -62,7 +62,20 @@ export default {
if (isDef(this.cartIndex) && this.cartIndex !== -1 && btAttachVal.length) {
btAttachVal[this.cartIndex].info = this.cartCount;
}
return isApp ? btAttachVal : isWxMp ? btAttachVal.filter(item => item.persets !== '购物车') : [];
if (isApp) {
if (isHarmonyOS) {
return btAttachVal.map(item => {
if (item.persets === '购物车') {
item.url = `${cfg.h5MallHost}/shopCart`
}
return item;
});
}
return btAttachVal;
} else if (isWxMp) {
return btAttachVal.filter(item => item.persets!== '购物车');
}
return []
// if (this.pageData.props && this.pageData.props.btAttachVal) {
// const { btAttachVal, showShare } = this.pageData.props;
// const btAttachValDeep = JSON.parse(JSON.stringify(btAttachVal));
......@@ -86,7 +99,6 @@ export default {
backTopList: {
immediate: true,
handler(val) {
console.log('backTopList val :>> ', val);
this.cartIndex = (val || []).findIndex(item => item.persets === '购物车');
this.getCartCountDebounce();
}
......@@ -96,9 +108,6 @@ export default {
if (!EASY_ENV_IS_NODE) {
this.jsBridge = new Bridge();
this.initShareInfo();
console.log('this.backTopList :>> ', this.backTopList);
console.log('isHarmonyOS :>> ', isHarmonyOS);
console.log('cfg.mallHost :>> ', cfg.mallHost);
this.getMpSchema();
}
},
......@@ -108,9 +117,6 @@ export default {
this.getCartCountDebounce();
}
});
console.log('this.backTopList :>> ', this.backTopList);
console.log('isHarmonyOS :>> ', isHarmonyOS);
console.log('cfg.mallHost :>> ', cfg.mallHost);
},
methods: {
......@@ -118,7 +124,6 @@ export default {
if (isH5Normal && EASY_ENV_IS_BROWSER && this.wxAppId) {
try {
console.log(this.pageInfo.tenantId);
console.log('-----2222222---------');
console.log('-----3333333---------');
const [schema] = await api.getMpSchema({
miniUrl: WEAPP_PATH,
......
import { isHarmonyOS } from '@/service/utils.service';
import hostPath from '@/config';
interface Schame {
key: string;
name: string;
......@@ -80,7 +77,7 @@ export const defaultState = {
{
name: '购物车',
icon: 'shopping-cart-o',
url: isHarmonyOS ? `${hostPath.mallHost}/shopCart` : 'xyqb://shoppingCartTab',
url: 'xyqb://shoppingCartTab',
color: '#333',
background: '#fff'
}
......
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