@TOC
matchCard() {
this.$jsonp('URL',
{ callbackQuery: 'myFunction', callbackName: 'myFunction' }
).then(data => {
let datas = decodeURI(data.message)
if (datas === '请将身份证放在读卡器上') {
alert('请将身份证重新放置读卡器上')
} else {
datas = datas.replace(/\+/g, '')// 正则去掉加号
const arr = datas.split(';')// 姓名--身份证--民族--地址 顺序
this.form.regApplyName = arr[0]
this.form.regApplyCardNum = arr[1]
const code = codeNational(arr[2])
this.form.regApplyNational = code
this.form.regApplyAddr = arr[3]
if (this.form.regApplyType === '1' || this.form.regApplyType === 1) {
this.form.regPassiveQueryName = arr[0]
this.form.regPassiveQueryCard = arr[1]
}
}
}).catch(err => {
console.log(err)
})
},