记住用户名密码
调用微信jssdk代码:
<script type="text/javascript"> //调用微信JS api 支付 function jsApiCall() { WeixinJSBridge.invoke( 'getBrandWCPayRequest', <?php echo $jsApiParameters; ?>, function(res){ WeixinJSBridge.log(res.err_msg); //alert(res.err_code+res.err_desc+res.err_msg); if(res.err_msg == "get_brand_wcpay_request:ok"){ //alert(res.err_code+res.err_desc+res.err_msg); window.location.href="<?=$jumpurl?>index.php?c=f_member&a=center"; }else{ //返回跳转到订单详情页面 //alert('支付失败'); window.location.href="<?=$jumpurl?>index.php?c=f_member&a=center"; } } ); } function callpay() { if (typeof WeixinJSBridge == "undefined"){ if( document.addEventListener ){ document.addEventListener('WeixinJSBridgeReady', jsApiCall, false); }else if (document.attachEvent){ document.attachEvent('WeixinJSBridgeReady', jsApiCall); document.attachEvent('onWeixinJSBridgeReady', jsApiCall); } }else{ alert("ok"); jsApiCall(); } } </script>
目前有 0 条留言 其中:访客:0 条, 博主:0 条