|
@@ -1,7 +1,7 @@
|
|
|
import React, { useEffect } from 'react'
|
|
import React, { useEffect } from 'react'
|
|
|
import { View, Text, ScrollView } from '@tarojs/components'
|
|
import { View, Text, ScrollView } from '@tarojs/components'
|
|
|
import Taro from '@tarojs/taro'
|
|
import Taro from '@tarojs/taro'
|
|
|
-import { TabBarLayout } from '@d8d/rencai-shared-ui/components'
|
|
|
|
|
|
|
+import { RencaiTabBarLayout } from '@d8d/rencai-shared-ui/components/RencaiTabBarLayout'
|
|
|
import { useAuth } from '@d8d/rencai-auth-ui/hooks'
|
|
import { useAuth } from '@d8d/rencai-auth-ui/hooks'
|
|
|
import { talentDashboardClient } from '../../api'
|
|
import { talentDashboardClient } from '../../api'
|
|
|
import type { InferResponseType } from 'hono'
|
|
import type { InferResponseType } from 'hono'
|
|
@@ -58,7 +58,16 @@ const Dashboard: React.FC = () => {
|
|
|
try {
|
|
try {
|
|
|
setLoading(true)
|
|
setLoading(true)
|
|
|
const response = await talentDashboardClient.personal.info.$get()
|
|
const response = await talentDashboardClient.personal.info.$get()
|
|
|
- setPersonalInfo(response)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (response.ok) {
|
|
|
|
|
+ const data = await response.json()
|
|
|
|
|
+ setPersonalInfo(data)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ Taro.showToast({
|
|
|
|
|
+ title: '加载个人信息失败',
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('加载个人信息失败:', error)
|
|
console.error('加载个人信息失败:', error)
|
|
|
Taro.showToast({
|
|
Taro.showToast({
|
|
@@ -116,7 +125,7 @@ const Dashboard: React.FC = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <TabBarLayout activeKey="index">
|
|
|
|
|
|
|
+ <RencaiTabBarLayout activeKey="index">
|
|
|
<ScrollView
|
|
<ScrollView
|
|
|
className="h-[calc(100%-60px)] overflow-y-auto bg-gray-100"
|
|
className="h-[calc(100%-60px)] overflow-y-auto bg-gray-100"
|
|
|
scrollY
|
|
scrollY
|
|
@@ -266,7 +275,7 @@ const Dashboard: React.FC = () => {
|
|
|
</View>
|
|
</View>
|
|
|
</View>
|
|
</View>
|
|
|
</ScrollView>
|
|
</ScrollView>
|
|
|
- </TabBarLayout>
|
|
|
|
|
|
|
+ </RencaiTabBarLayout>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|