Authored by 李奇

品牌跳转规则修改

@@ -24,11 +24,15 @@ function BrandHrefBinding(el, binding) { @@ -24,11 +24,15 @@ function BrandHrefBinding(el, binding) {
24 return; 24 return;
25 } 25 }
26 if (binding.modifiers.shop) { 26 if (binding.modifiers.shop) {
27 - let href = `/product/shop/${binding.value.domain}`; 27 + let href = `/product/shop/${binding.value.domain || binding.value.name}`;
28 let shopId = binding.value.shopId; 28 let shopId = binding.value.shopId;
29 29
30 if (yoho.isYohoBuy && shopId) { 30 if (yoho.isYohoBuy && shopId) {
31 let { shopName, shopTemplateType, isRedShop } = binding.value; 31 let { shopName, shopTemplateType, isRedShop } = binding.value;
  32 +
  33 + if (isRedShop === 1) {
  34 + shopTemplateType = '1';
  35 + }
32 let goParams = { 36 let goParams = {
33 action: 'go.shop', 37 action: 'go.shop',
34 params: { 38 params: {
@@ -40,9 +44,27 @@ function BrandHrefBinding(el, binding) { @@ -40,9 +44,27 @@ function BrandHrefBinding(el, binding) {
40 }; 44 };
41 45
42 href += `?openby:yohobuy=${JSON.stringify(goParams)}`; 46 href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
  47 + el.href = href;
43 } 48 }
44 49
45 - el.href = href; 50 + if (yoho.isYohoBuy && !shopId) {
  51 + yoho.getAppVersion({}, (version) => {
  52 + if (version >= '6.5.5') {
  53 + let { name } = binding.value;
  54 + let goParams = {
  55 + action: 'go.searchlist',
  56 + params: {
  57 + keyword: name
  58 + }
  59 + };
  60 +
  61 + href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
  62 + el.href = href;
  63 + } else {
  64 + el.href = href;
  65 + }
  66 + });
  67 + }
46 } else { 68 } else {
47 el.href = `/product/shop/${binding.value}`; 69 el.href = `/product/shop/${binding.value}`;
48 } 70 }