From 1a0d57124485fafb0b42a3ec3ecc121e50bb050f Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期二, 03 六月 2025 17:00:08 +0800 Subject: [PATCH] 1 --- src/views/system/tijian/index.vue | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index 0e82f85..532944b 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -1958,11 +1958,15 @@ // 鏈�鏂颁娇鐢╳ebSocket閫氫俊 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) { @@ -2017,7 +2021,7 @@ //鍥炴樉鐩稿叧鏁版嵁 _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) { -- Gitblit v1.8.0