perf: 删除定时请求令牌

main
LiaoYijun 2 months ago
parent 646744abbf
commit 80215b3e33

@ -38,7 +38,6 @@ export const fetchPermissionListByUserId = async (userId) => {
}
const initialState = {
tokenInterval: null,
loginStatus: 0,
defaltRoute: '',
currentUser: {
@ -119,10 +118,9 @@ const useAuthStore = create(devtools((set, get) => ({
},
logout: () => {
const { tokenInterval, currentUser } = get()
const { currentUser } = get()
const { clearStorage } = usingStorage()
clearStorage()
clearInterval(tokenInterval)
set(() => ({
...initialState,
currentUser: {

@ -13,7 +13,7 @@ function PickYear() {
<Col span={4}>
<Flex gap="middle" vertical>
<Typography.Title className="text-center" level={3}>
请选择采购年份
请选择产品年份
</Typography.Title>
<DatePicker
className="w-full"
@ -25,6 +25,13 @@ function PickYear() {
maxDate={dayjs().add(2, "year")}
allowClear={false}
picker="year"
styles={{
popup: {
root: {
color: 'red'
}
}
}}
open={true}
onOk={(date) => {
const useYear = date.year();

Loading…
Cancel
Save