feat: login
This commit is contained in:
@ -4,7 +4,6 @@ import { Tabs } from '@taroify/core';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
||||
import HomePage from '@/components/home-page';
|
||||
import LocationDialog from '@/components/location-dialog';
|
||||
import { LoginGuide } from '@/components/login-guide';
|
||||
import MaterialGuide from '@/components/material-guide';
|
||||
import { EventName, OpenSource, PageUrl } from '@/constants/app';
|
||||
@ -82,13 +81,6 @@ export default function Job() {
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleCloseAuthorize = useCallback(() => setShowAuthorize(false), []);
|
||||
|
||||
const handleClickAuthorize = useCallback(() => {
|
||||
requestLocation(true);
|
||||
setShowAuthorize(false);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
Taro.eventCenter.on(EventName.SELECT_CITY, handleCityChange);
|
||||
return () => {
|
||||
@ -116,6 +108,7 @@ export default function Job() {
|
||||
} else {
|
||||
log('show authorize location dialog');
|
||||
setShowAuthorize(true);
|
||||
requestLocation(true);
|
||||
}
|
||||
});
|
||||
|
||||
@ -154,7 +147,6 @@ export default function Job() {
|
||||
))}
|
||||
</Tabs>
|
||||
<div>
|
||||
<LocationDialog open={showAuthorize} onClose={handleCloseAuthorize} onClick={handleClickAuthorize} />
|
||||
<LoginGuide disabled={showAuthorize} onAfterBind={handleAfterBindPhone} />
|
||||
{showMaterialGuide && <MaterialGuide onClose={() => setShowMaterialGuide(false)} />}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user