张延森 3 years ago
parent
commit
2d16689fb0
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      src/components/Authorize/AuthProfile.jsx

+ 6
- 3
src/components/Authorize/AuthProfile.jsx View File

@@ -5,12 +5,15 @@ import { useModel } from '@/store';
5 5
 export default function (props) {
6 6
   const { person, dogs: pets } = useModel('userData')
7 7
 
8
-  const show = !person || !person.phone || !pets || !pets.length
9
-  const message = !person.phone ? '请先维护个人信息' : '请先维护狗狗信息'
8
+  const noPerson = !person || !person.phone
9
+  const noPet = !pets || !pets.length
10
+
11
+  const show = noPerson || noPet
12
+  const message = noPerson ? '请先维护个人信息' : '请先维护狗狗信息'
10 13
 
11 14
   const handleTap = () => {
12 15
     if (!show) return;
13
-    const url = !person || !person.phone ? '/pages/setUser/index' : '/pages/setDogInfo/index'
16
+    const url = noPerson ? '/pages/setUser/index' : '/pages/setDogInfo/index'
14 17
     Taro.navigateTo({ url })
15 18
   }
16 19