<!--引入微信sdk-->
<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
let url = location.href.split('#')[0];newApi.getSignature({ url }).then(res => {if (res.code == 0) {this.sdk.config({beta: true, debug: false, appId: res.data.appId, timestamp: res.data.timestamp, nonceStr: res.data.nonceStr, signature: res.data.signature,jsApiList: ["scanQRCode"] });this.sdk.ready(function (re) {console.log('re', re)});this.sdk.error(function (err) {console.log('err', err)});this.sdk.scanQRCode({desc: 'scanQRCode desc',needResult: 1, scanType: ["qrCode", "barCode"], success: (res) => {this.couponCode = resthis.couponInfoBycouponCode()},error: function (res) {if (res.errMsg.indexOf('function_not_exist') > 0) {alert('版本过低请升级')}}});}