...
|
...
|
@@ -5,6 +5,7 @@ |
|
|
* @Last Modified time: 2016-08-02 17:42:26
|
|
|
*/
|
|
|
import yoho from 'yoho';
|
|
|
import cookie from 'yoho-cookie';
|
|
|
import util from 'common/util';
|
|
|
|
|
|
function ImgSrcBinding(el, binding) {
|
...
|
...
|
@@ -46,24 +47,21 @@ function BrandHrefBinding(el, binding) { |
|
|
|
|
|
if (yoho.isYohoBuy && !shopId) {
|
|
|
yoho.ready(function () {
|
|
|
yoho.getAppVersion({}, function(version) {
|
|
|
alert(binding.value.name)
|
|
|
if (version >= '6.5.5') {
|
|
|
let { name } = binding.value;
|
|
|
|
|
|
let goParams = {
|
|
|
action: 'go.searchlist',
|
|
|
params: {
|
|
|
keyword: name
|
|
|
}
|
|
|
};
|
|
|
|
|
|
href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
|
|
|
el.href = href;
|
|
|
} else {
|
|
|
el.href = href;
|
|
|
}
|
|
|
});
|
|
|
if (cookie.get('app_version') >= '6.5.5') {
|
|
|
let { name } = binding.value;
|
|
|
|
|
|
let goParams = {
|
|
|
action: 'go.searchlist',
|
|
|
params: {
|
|
|
keyword: name
|
|
|
}
|
|
|
};
|
|
|
|
|
|
href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
|
|
|
el.href = href;
|
|
|
} else {
|
|
|
el.href = href;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|