人员中台 - 人员中台管理校验失败bug修复

xuyifeng-0724-人员中台对接-dev
water_xu 2024-08-12 10:47:22 +08:00
parent 9a292e4fc0
commit 1c892cdc64
1 changed files with 9 additions and 3 deletions

View File

@ -480,18 +480,24 @@ export default {
}) })
}, },
goCheck() { goCheck() {
if (this.pd.USER_ID_CARD && this.pd.USERNAME) { if (this.pd.USER_ID_CARD && this.pd.PHONE) {
const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/ const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/
const phoneResult = phoneJudge.test(this.pd.USERNAME) const phoneResult = phoneJudge.test(this.pd.PHONE)
const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
const cardResult = cardJudge.test(this.pd.USER_ID_CARD) const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
// alert(this.pd.PHONE)
// alert(phoneResult)
// alert(this.pd.USER_ID_CARD)
// alert(cardResult)
if (phoneResult && cardResult) { if (phoneResult && cardResult) {
console.log('格式校验通过') console.log('格式校验通过')
requestFN( requestFN(
'user/goCheck', 'user/goCheck',
{ {
CARD_NO: this.pd.USER_ID_CARD, CARD_NO: this.pd.USER_ID_CARD,
USERNAME: this.pd.USERNAME USERNAME: this.pd.PHONE,
USER_ID: this.pd.USER_ID
} }
).then((data) => { ).then((data) => {
if (data.result === 'success') { if (data.result === 'success') {