|
@@ -24,11 +24,12 @@ function BrandHrefBinding(el, binding) { |
|
@@ -24,11 +24,12 @@ 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
|
+
|
32
|
let goParams = {
|
33
|
let goParams = {
|
33
|
action: 'go.shop',
|
34
|
action: 'go.shop',
|
34
|
params: {
|
35
|
params: {
|
|
@@ -40,6 +41,30 @@ function BrandHrefBinding(el, binding) { |
|
@@ -40,6 +41,30 @@ function BrandHrefBinding(el, binding) { |
40
|
};
|
41
|
};
|
41
|
|
42
|
|
42
|
href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
|
43
|
href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
|
|
|
44
|
+ el.href = href;
|
|
|
45
|
+ return;
|
|
|
46
|
+ }
|
|
|
47
|
+
|
|
|
48
|
+ if (yoho.isYohoBuy && !shopId) {
|
|
|
49
|
+ yoho.ready(function () {
|
|
|
50
|
+ yoho.getAppVersion({}, (version) => {
|
|
|
51
|
+ if (version >= '6.5.5') {
|
|
|
52
|
+ let { name } = binding.value;
|
|
|
53
|
+ let goParams = {
|
|
|
54
|
+ action: 'go.searchlist',
|
|
|
55
|
+ params: {
|
|
|
56
|
+ keyword: name
|
|
|
57
|
+ }
|
|
|
58
|
+ };
|
|
|
59
|
+
|
|
|
60
|
+ href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
|
|
|
61
|
+ el.href = href;
|
|
|
62
|
+ } else {
|
|
|
63
|
+ el.href = href;
|
|
|
64
|
+ }
|
|
|
65
|
+ });
|
|
|
66
|
+ });
|
|
|
67
|
+ return;
|
43
|
}
|
68
|
}
|
44
|
|
69
|
|
45
|
el.href = href;
|
70
|
el.href = href;
|