Authored by 张孝茹

mars 联调

... ... @@ -25,7 +25,7 @@
<div class="remain">仅剩{{#if stock}}{{stock}}{{/if}}{{#if num}}{{num}}{{/if}}</div>
</div>
<div class="right">
<span class="go-btn{{#if usable}} usable{{/if}}" data-id="{{id}}" data-level="{{level}}">兑换</span>
<span class="go-btn{{#if usable}} usable{{/if}}" data-id="{{id}}" data-level="{{level}}" data-point="{{points}}">兑换</span>
</div>
</div>
</div>
... ...
... ... @@ -146,11 +146,13 @@ class IconMall extends Page {
}
openDetail() {
if (yoho && yoho.isNowApp) {
yoho.invokeMethod('go.coins_detail');
} else if (yoho && yoho.isMarsApp) {
yoho.invokeMethod('go.point_detail');
}
yoho.ready(() => {
if (yoho && yoho.isNowApp) {
yoho.invokeMethod('go.coins_detail');
} else if (yoho && yoho.isMarsApp) {
yoho.invokeMethod('go.point_detail');
}
});
}
goConversion(e) {
... ... @@ -158,14 +160,16 @@ class IconMall extends Page {
let type = $this.closest('.tab-item-c').attr('id');
let goodId = $this.data('id');
let goodsLevel = $this.data('level');
let point = $this.data('point');
if ($this.hasClass('usable')) {
if (yoho && yoho.isMarsApp) {
yoho.invokeMethod('go.mars_point', {goodId: goodId, goods_level: goodsLevel});
} else if (yoho && yoho.isNowApp) {
yoho.invokeMethod('go.yohoCoins', {goodId: goodId});
}
yoho.ready(() => {
if (yoho && yoho.isMarsApp) {
yoho.invokeMethod('go.mars_point', {goodId: goodId, goodsLevel: goodsLevel, point: point});
} else if (yoho && yoho.isNowApp) {
yoho.invokeMethod('go.yohoCoins', {goodId: goodId});
}
});
} else {
if (type === 'yohonow-tab') {
tip.show('请到yohonowapp打开');
... ...
... ... @@ -340,7 +340,7 @@ class FamilyIndex extends Page {
}
}));
} else {
yoho.invokeMethod('go.copy', {text: $this.data('text')});
yoho.invokeMethod('go.copy', {text: $this.data('text'), message: '复制成功'});
}
}
}
... ...