| | |
| | | // 最新使用webSocket通信 |
| | | readCardWebSocket(resultObj) { |
| | | let _this = this; |
| | | |
| | | const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char) |
| | | if (resultObj.code === 200 && resultObj.data.name != null) { |
| | | //回显相关数据 |
| | | _this.form.cusName = resultObj.data.name; |
| | | _this.form.cusSex = resultObj.data.sex == "0" ? "女" : "男"; |
| | | if (isChineseChar(resultObj.data.sex)) { |
| | | _this.form.cusSex = resultObj.data.sex == "女" ? 1 : 0 |
| | | } else { |
| | | _this.form.cusSex = resultObj.data.sex; |
| | | } |
| | | _this.form.cusNational = resultObj.data.mz; |
| | | _this.form.cusBrithday = resultObj.data.csrq; |
| | | if (_this.form.cusBrithday) { |
| | |
| | | //回显相关数据 |
| | | _this.form.cusName = resultObj.resultContent.partyName; |
| | | _this.form.cusSex = |
| | | resultObj.resultContent.gender == "0" ? "女" : "男"; |
| | | resultObj.resultContent.gender ; |
| | | _this.form.cusNational = resultObj.resultContent.nation; |
| | | _this.form.cusBrithday = resultObj.resultContent.bornDay; |
| | | if (_this.form.cusBrithday) { |