From caef1ff213da160e818342eceb3d77fac0db280d Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期五, 30 五月 2025 16:41:29 +0800 Subject: [PATCH] qx --- 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