@@ -37,13 +37,27 @@ export default {
// window.location.href = result
},
error: function(response) {
- this.close()
- this.$nextTick(() => {
+ that.close()
+ that.$nextTick(() => {
that.$toast(response)
})
+ },
+ fail: function(err) {
+ // 新增调用失败的处理方法
+ that.$toast('扫码失败: ' + (err && err.errMsg ? err.errMsg : '未知错误'))
+ })
}
+ // checkJsApi 调用失败的处理
+ that.$toast('微信接口调用失败: ' + (err && err.errMsg ? err.errMsg : '未知错误'))