Authored by 王水玲

商品详情mars 跳转小程序

... ... @@ -50,7 +50,11 @@
<a id="noLimitCode" href="javascript:;" class="sold-out limit">立即购买</a>
{{/if}}
{{#if appBuy}}
<a href="{{appBuyUrl}}" class="addto-cart add-to-cart-url">APP购买</a>
{{#if @root.isMarsApp}}
<a href="javascript:;" class="addto-cart mars-jump-min-app">立即购买</a>
{{else}}
<a href="{{appBuyUrl}}" class="addto-cart add-to-cart-url">APP购买</a>
{{/if}}
{{/if}}
</span>
<input type="hidden" id="limitCodeUrl" name="limitCodeUrl" value="{{limitCodeUrl}}">
... ...
... ... @@ -135,6 +135,11 @@ setTimeout(() => {
}
$('#placeholder-pricedata').replaceWith(priceDataHbs(data));
if ($('.is-mars-app').length > 0) {
data.isMarsApp = true;
}
$('#placeholder-infodata').replaceWith(infoDataHbs(data));
setTimeout(function() {
... ... @@ -281,11 +286,14 @@ setTimeout(() => {
if (loginUrl) {
window.location = loginUrl;
} else {
if ($('.is-mars-app').length > 1 && yoho && yoho.isMarsApp) {
yoho.invokeMethod('go.minAppLimit', {
url: 'miniapp.yohobuy.com/pages/index/index?app=yohobuyLimitChannel'
if ($('.is-mars-app').length > 0 && yoho && yoho.isMarsApp) {
let Limitcode = $('#limitProductCode').val();
yoho.invokeMethod('go.minAppLimitDetail', {
url: 'miniapp.yohobuy.com/pages/product/detail/detail?limitProductCode=' + Limitcode, // eslint-disable-line
appId: 'wxed31f9e8705fb8d1'
});
return;
return false;
}
dialog.showDialog({
... ... @@ -321,6 +329,15 @@ setTimeout(() => {
}
});
$('.mars-jump-min-app').on('click', function() {
if (yoho && yoho.isMarsApp) {
yoho.invokeMethod('go.minAppGoodsDetail', {
url: 'miniapp.yohobuy.com/pages/goodsDetail/goodsDetail?productSkn=' + productSkn,
appId: 'wx084ab813d88c594b'
});
}
});
window.rePosFooter && window.rePosFooter();
}
});
... ...