1.引入 <script src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
2.後端預支付完成返回相關數據之後前端操作
if(typeof wx != 'undefined'){
wx.config({
debug: true, // 開啓調試模式
appId: datas.data.appId, // 公衆號的唯一標識
timestamp: datas.data.timeStamp, // 生成簽名的時間戳
nonceStr: datas.data.nonceStr, // 生成簽名的隨機串
signature: datas.data.sign,// 簽名,見附錄1
jsApiList: [
'chooseWXPay'
] // 需要使用的JS接口列表
});
wx.checkJsApi({
jsApiList: ['chooseWXPay'], // 需