|
|
@@ -62,21 +62,24 @@ export default {
|
|
|
// wx.config的配置
|
|
|
wxConfig(appId, timestamp, nonceStr, signature) {
|
|
|
const that = this
|
|
|
-
|
|
|
- const params = {
|
|
|
- debug: false, // 开启调试模式,
|
|
|
- appId: appId, // 必填,企业号的唯一标识
|
|
|
- timestamp: timestamp, // 必填,生成签名的时间戳
|
|
|
- nonceStr: nonceStr, // 必填,生成签名的随机串
|
|
|
- signature: signature, // 必填,签名
|
|
|
- jsApiList: ['scanQRCode', 'checkJsApi'] // 必填,需要使用的JS接口列表
|
|
|
+ try {
|
|
|
+ const params = {
|
|
|
+ debug: false, // 开启调试模式,
|
|
|
+ appId: appId, // 必填,企业号的唯一标识
|
|
|
+ timestamp: timestamp, // 必填,生成签名的时间戳
|
|
|
+ nonceStr: nonceStr, // 必填,生成签名的随机串
|
|
|
+ signature: signature, // 必填,签名
|
|
|
+ jsApiList: ['scanQRCode', 'checkJsApi'] // 必填,需要使用的JS接口列表
|
|
|
+ }
|
|
|
+ wx.config(params)
|
|
|
+ wx.error(function(res) {
|
|
|
+ console.log('测试测试111')
|
|
|
+ that.close()
|
|
|
+ alert('出错了👉' + res.errMsg) // wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
}
|
|
|
- wx.config(params)
|
|
|
- wx.error(function(res) {
|
|
|
- console.log('测试测试111')
|
|
|
- that.close()
|
|
|
- alert('出错了👉' + res.errMsg) // wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
|
|
|
- })
|
|
|
},
|
|
|
close() {
|
|
|
this.show = false
|