积分申请

This commit is contained in:
liuye
2023-07-05 11:52:27 +08:00
parent 422422f768
commit 21c00e2175

View File

@@ -105,9 +105,6 @@ export default {
}, },
onShow() { onShow() {
document.title = '积分代申请' document.title = '积分代申请'
this.$nextTick(() => {
this.injectJWeixin(['scanQRCode'])
})
}, },
methods: { methods: {
...mapActions(['injectJWeixin']), ...mapActions(['injectJWeixin']),
@@ -195,24 +192,26 @@ export default {
this.getType() this.getType()
}, },
scan() { scan() {
wx.scanQRCode({ this.injectJWeixin(['scanQRCode']).then(() => {
desc: '扫描居民信息', wx.scanQRCode({
needResult: 1, // 默认为0扫描结果由企业微信处理1则直接返回扫描结果 desc: '扫描居民信息',
scanType: ["qrCode",], // 可以指定扫二维码还是条形码(一维码),默认二者都有 needResult: 1, // 默认为0扫描结果由企业微信处理1则直接返回扫描结果
success: (res) => { scanType: ["qrCode",], // 可以指定扫二维码还是条形码(一维码),默认二者都有
var info = JSON.parse(res.resultStr) success: (res) => {
info.realName = info.name var info = JSON.parse(res.resultStr)
var userList = [{...info}] info.realName = info.name
this.handleSelectUser(userList) var userList = [{...info}]
}, this.handleSelectUser(userList)
error: (res) => { },
console.log(res) error: (res) => {
alert(res) console.log(res)
if (res.errMsg.indexOf('function_not_exist') > 0) { alert(res)
alert('版本过低请升级') if (res.errMsg.indexOf('function_not_exist') > 0) {
alert('版本过低请升级')
}
} }
} });
}); })
} }
} }
} }