|
@@ -23,6 +23,9 @@ export default withLayout((props) => {
|
23
|
23
|
const { location,setLocation } = useModel('location')
|
24
|
24
|
const [currentTab, setCurrentTab] = useState(0);
|
25
|
25
|
const handleClick = (val) => {
|
|
26
|
+ if (!person.phone) {
|
|
27
|
+ Taro.reLaunch({ url: '/pages/login/index' });
|
|
28
|
+ }
|
26
|
29
|
setCurrentTab(val);
|
27
|
30
|
};
|
28
|
31
|
useEffect(() => {
|
|
@@ -36,10 +39,8 @@ export default withLayout((props) => {
|
36
|
39
|
} else {
|
37
|
40
|
setAmap({params:'location='+location,path: '/v3/geocode/regeo'})
|
38
|
41
|
}
|
39
|
|
- if (currentTab!==0&& person.phone) {
|
40
|
|
- Taro.reLaunch({ url: '/pages/login/index' });
|
41
|
|
- }
|
42
|
|
- if (tab) {
|
|
42
|
+
|
|
43
|
+ if (tab) {
|
43
|
44
|
setCurrentTab(tab - 0)
|
44
|
45
|
}
|
45
|
46
|
}, [tab])
|