Commit 8c4b19706f5c608f1574fef01008429074ac7b99
1 parent
246f6035
和原声联调
Showing
1 changed file
with
24 additions
and
11 deletions
src/pages/myGiftBox/myGiftBox.vue
| ... | ... | @@ -362,26 +362,39 @@ export default { |
| 362 | 362 | // 判断并调用通用跳转 |
| 363 | 363 | if (typeof this.$parent.gotoDetail === "function") { |
| 364 | 364 | // 临时,设置跳转商品详情参数 |
| 365 | - Object.assign(item, { | |
| 365 | + let item={ | |
| 366 | 366 | type: "44", |
| 367 | 367 | to: this.giftsRuleUrl, |
| 368 | 368 | shop_type: "" |
| 369 | - }); | |
| 369 | + } | |
| 370 | + console.log(item) | |
| 370 | 371 | this.$parent.gotoDetail(item); |
| 371 | 372 | } |
| 372 | 373 | }, |
| 373 | 374 | // 跳转原声支付 |
| 374 | 375 | jumpToPay(item){ |
| 375 | - // 判断并调用通用跳转 | |
| 376 | - if (typeof this.$parent.gotoDetail === "function") { | |
| 377 | - // 临时,设置跳转商品详情参数 | |
| 378 | - Object.assign(item, { | |
| 379 | - type: "44", | |
| 380 | - to: item.id, | |
| 381 | - shop_type: "" | |
| 382 | - }); | |
| 383 | - this.$parent.gotoDetail(item); | |
| 376 | + // App内 | |
| 377 | + if (this.isCNLive.value) { | |
| 378 | + // 调用App,返回按键 | |
| 379 | + if ( | |
| 380 | + window.webkit && | |
| 381 | + window.webkit.messageHandlers && | |
| 382 | + window.webkit.messageHandlers | |
| 383 | + .jumpToPay | |
| 384 | + ) { | |
| 385 | + // App内,iOS销毁WebView | |
| 386 | + window.webkit.messageHandlers.jumpToPay.postMessage( | |
| 387 | + { body: { orderNumber: itme.id } } | |
| 388 | + ); | |
| 389 | + } else if ( | |
| 390 | + window.obj && | |
| 391 | + window.obj.setGiftBottomVisibleBySwitchTab | |
| 392 | + ) { | |
| 393 | + // App内,Android销毁WebView | |
| 394 | + window.obj.jumpToPay(itme.id); | |
| 395 | + } | |
| 384 | 396 | } |
| 397 | + | |
| 385 | 398 | |
| 386 | 399 | } |
| 387 | 400 | } | ... | ... |