var order_code = result.data
var terminal = $(\'#terminal\').val()
if(terminal == 1){
// 小程序
wx.miniProgram.getEnv(function (res) {
if(res.miniprogram){
wx.miniProgram.navigateTo({
url:\'/pages/payresult/cashier/cashier\'+\'?order_code=\'+ order_code + \'&price=\' + price
})
}
})
}else if(terminal == 2){
// ios 注意 ios传参是字符串  不是字符串记得转换一下
order_code = order_code.toString()
price = price.toString()
_data = {
\'order_code\': order_code,
\'price\': price
}
try{

//goPayMember自己起的 和ios端对应好
window.webkit.messageHandlers.goPayMember.postMessage(_data);
}catch (e){
tconsole(e.message)
}
}else if(terminal == 3){
order_code = order_code.toString()
price = price.toString()
// android
try{

//BigoffsPromotion.goPayMember自己起的和安卓端对应好
BigoffsPromotion.goPayMember(order_code,price)
}catch (e){
tconsole(e.message)
}

}

  

版权声明:本文为yaoling原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/yaoling/p/13615387.html