张延森 3 年前
父节点
当前提交
854fa2c257
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      src/pages/index/index.jsx

+ 3
- 2
src/pages/index/index.jsx 查看文件

28
   }
28
   }
29
 
29
 
30
   useEffect(() => {
30
   useEffect(() => {
31
-    console.log('============>', user, person, !person || !person.idNo)
32
     if (person && person.personId) {
31
     if (person && person.personId) {
33
       getBarcode(person.personId).then((res) => {
32
       getBarcode(person.personId).then((res) => {
34
         if (typeof res === 'string') {
33
         if (typeof res === 'string') {
43
     if (user && user.userId) {
42
     if (user && user.userId) {
44
       if (!person || !person.idNo) {
43
       if (!person || !person.idNo) {
45
         setIdCardVisible(true)
44
         setIdCardVisible(true)
45
+      } else {
46
+        setIdCardVisible(false)
46
       }
47
       }
47
     }
48
     }
48
   }, [person, user])
49
   }, [person, user])
77
       <Dialog title='提示' message='未添加个人信息' show={idCardVisible} onConfirm={handleShowEditor} />
78
       <Dialog title='提示' message='未添加个人信息' show={idCardVisible} onConfirm={handleShowEditor} />
78
       <Dialog show={idCardBarVisible} onConfirm={() => setIdCardBarVisible(false)}>
79
       <Dialog show={idCardBarVisible} onConfirm={() => setIdCardBarVisible(false)}>
79
         <View className='pop-idcard-bar'>
80
         <View className='pop-idcard-bar'>
80
-          <BarCode ratio={0.7} height={80} code={barData.patIdcardno} codeVisible />
81
+          <BarCode ratio={0.7} height={80} code={person?.idNo} codeVisible />
81
         </View>
82
         </View>
82
       </Dialog>
83
       </Dialog>
83
     </View>
84
     </View>