测试按钮,联调安卓支付

This commit is contained in:
dragon
2024-07-12 16:27:30 +08:00
parent b5862cb683
commit 3cfae08f2d
2 changed files with 11 additions and 5 deletions

View File

@@ -160,4 +160,4 @@
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="../../common/js/route-constant.js"></script>
<script src="./js/index.js"></script>
<script src="./js/index.js?v=1.0"></script>

View File

@@ -45,18 +45,24 @@ $(function () {
}
};
// 頂部返回事件
$('.back').click(() => {
$('.back img').click(() => {
var productId = 'diamond_charge_01'
if (browser.android) {
window.androidJsObj.closeWebView()
window.androidJsObj.openPayment(productId)
} else {
window.webkit.messageHandlers.closeWebView.postMessage(null)
window.webkit.messageHandlers.openPayment.postMessage(productId)
}
})
getCurrency();
activityCodeInfo();
}, 100)
})
function openPaymentCallback(obj) {
console.log('回调对象', obj);
console.log('回调orderId', obj.orderId);
console.log('回调code', obj.code);
console.log('回调productId', obj.productId);
}
// 配置接口
function getCurrency() {
showLoading()