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

fix: 修改购物车跳转

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