张延森 vor 3 Jahren
Ursprung
Commit
854fa2c257
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 3
    2
      src/pages/index/index.jsx

+ 3
- 2
src/pages/index/index.jsx Datei anzeigen

@@ -28,7 +28,6 @@ export default (props) => {
28 28
   }
29 29
 
30 30
   useEffect(() => {
31
-    console.log('============>', user, person, !person || !person.idNo)
32 31
     if (person && person.personId) {
33 32
       getBarcode(person.personId).then((res) => {
34 33
         if (typeof res === 'string') {
@@ -43,6 +42,8 @@ export default (props) => {
43 42
     if (user && user.userId) {
44 43
       if (!person || !person.idNo) {
45 44
         setIdCardVisible(true)
45
+      } else {
46
+        setIdCardVisible(false)
46 47
       }
47 48
     }
48 49
   }, [person, user])
@@ -77,7 +78,7 @@ export default (props) => {
77 78
       <Dialog title='提示' message='未添加个人信息' show={idCardVisible} onConfirm={handleShowEditor} />
78 79
       <Dialog show={idCardBarVisible} onConfirm={() => setIdCardBarVisible(false)}>
79 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 82
         </View>
82 83
       </Dialog>
83 84
     </View>