Authored by 张孝茹

mars 联调

@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 <div class="remain">仅剩{{#if stock}}{{stock}}{{/if}}{{#if num}}{{num}}{{/if}}</div> 25 <div class="remain">仅剩{{#if stock}}{{stock}}{{/if}}{{#if num}}{{num}}{{/if}}</div>
26 </div> 26 </div>
27 <div class="right"> 27 <div class="right">
28 - <span class="go-btn{{#if usable}} usable{{/if}}" data-id="{{id}}" data-level="{{level}}">兑换</span> 28 + <span class="go-btn{{#if usable}} usable{{/if}}" data-id="{{id}}" data-level="{{level}}" data-point="{{points}}">兑换</span>
29 </div> 29 </div>
30 </div> 30 </div>
31 </div> 31 </div>
@@ -146,11 +146,13 @@ class IconMall extends Page { @@ -146,11 +146,13 @@ class IconMall extends Page {
146 } 146 }
147 147
148 openDetail() { 148 openDetail() {
  149 + yoho.ready(() => {
149 if (yoho && yoho.isNowApp) { 150 if (yoho && yoho.isNowApp) {
150 yoho.invokeMethod('go.coins_detail'); 151 yoho.invokeMethod('go.coins_detail');
151 } else if (yoho && yoho.isMarsApp) { 152 } else if (yoho && yoho.isMarsApp) {
152 yoho.invokeMethod('go.point_detail'); 153 yoho.invokeMethod('go.point_detail');
153 } 154 }
  155 + });
154 } 156 }
155 157
156 goConversion(e) { 158 goConversion(e) {
@@ -158,14 +160,16 @@ class IconMall extends Page { @@ -158,14 +160,16 @@ class IconMall extends Page {
158 let type = $this.closest('.tab-item-c').attr('id'); 160 let type = $this.closest('.tab-item-c').attr('id');
159 let goodId = $this.data('id'); 161 let goodId = $this.data('id');
160 let goodsLevel = $this.data('level'); 162 let goodsLevel = $this.data('level');
161 - 163 + let point = $this.data('point');
162 164
163 if ($this.hasClass('usable')) { 165 if ($this.hasClass('usable')) {
  166 + yoho.ready(() => {
164 if (yoho && yoho.isMarsApp) { 167 if (yoho && yoho.isMarsApp) {
165 - yoho.invokeMethod('go.mars_point', {goodId: goodId, goods_level: goodsLevel}); 168 + yoho.invokeMethod('go.mars_point', {goodId: goodId, goodsLevel: goodsLevel, point: point});
166 } else if (yoho && yoho.isNowApp) { 169 } else if (yoho && yoho.isNowApp) {
167 yoho.invokeMethod('go.yohoCoins', {goodId: goodId}); 170 yoho.invokeMethod('go.yohoCoins', {goodId: goodId});
168 } 171 }
  172 + });
169 } else { 173 } else {
170 if (type === 'yohonow-tab') { 174 if (type === 'yohonow-tab') {
171 tip.show('请到yohonowapp打开'); 175 tip.show('请到yohonowapp打开');
@@ -340,7 +340,7 @@ class FamilyIndex extends Page { @@ -340,7 +340,7 @@ class FamilyIndex extends Page {
340 } 340 }
341 })); 341 }));
342 } else { 342 } else {
343 - yoho.invokeMethod('go.copy', {text: $this.data('text')}); 343 + yoho.invokeMethod('go.copy', {text: $this.data('text'), message: '复制成功'});
344 } 344 }
345 } 345 }
346 } 346 }