|
|
@@ -5,7 +5,6 @@ import { useQuery } from '@tanstack/react-query'
|
|
|
import { YongrenTabBarLayout } from '@d8d/yongren-shared-ui/components/YongrenTabBarLayout'
|
|
|
import { Navbar } from '@d8d/mini-shared-ui-components/components/navbar'
|
|
|
import { useAuth } from '@d8d/mini-enterprise-auth-ui/hooks'
|
|
|
-import type { User } from '@d8d/mini-enterprise-auth-ui/hooks'
|
|
|
import { enterpriseCompanyClient } from '../../api/companyClient'
|
|
|
|
|
|
// 延期功能列表(因史诗012系统设置API延期)
|
|
|
@@ -18,7 +17,7 @@ const Settings: React.FC = () => {
|
|
|
const { data: companyOverview, isLoading } = useQuery({
|
|
|
queryKey: ['company-overview'],
|
|
|
queryFn: async () => {
|
|
|
- const res = await enterpriseCompanyClient.overview.$get({} as any)
|
|
|
+ const res = await enterpriseCompanyClient.overview.$get({} as never)
|
|
|
if (!res.ok) {
|
|
|
throw new Error('获取企业信息失败')
|
|
|
}
|
|
|
@@ -64,9 +63,9 @@ const Settings: React.FC = () => {
|
|
|
content: '确定要退出登录吗?',
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
- // 清除本地存储的认证信息
|
|
|
- Taro.removeStorageSync('enterpriseToken')
|
|
|
- Taro.removeStorageSync('enterpriseUser')
|
|
|
+ // 清除本地存储的认证信息(使用与 useAuth 一致的 key)
|
|
|
+ Taro.removeStorageSync('enterprise_token')
|
|
|
+ Taro.removeStorageSync('enterpriseUserInfo')
|
|
|
|
|
|
// 跳转到登录页
|
|
|
Taro.reLaunch({
|
|
|
@@ -102,7 +101,7 @@ const Settings: React.FC = () => {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
- const companyData: any = companyOverview || {}
|
|
|
+ const companyData: Record<string, unknown> = companyOverview || {}
|
|
|
|
|
|
return (
|
|
|
<YongrenTabBarLayout activeKey="settings">
|