|
|
@ -8,6 +8,7 @@ import cur from '@/static/img/cur.png' |
|
|
|
import userInfo from '@/static/img/userInfo.png' |
|
|
|
import userInfo from '@/static/img/userInfo.png' |
|
|
|
import spotMeeting from '@/static/img/spotMeeting.png' |
|
|
|
import spotMeeting from '@/static/img/spotMeeting.png' |
|
|
|
import course from '@/static/img/course.png' |
|
|
|
import course from '@/static/img/course.png' |
|
|
|
|
|
|
|
import {userApi} from "@/api"; |
|
|
|
|
|
|
|
|
|
|
|
interface List { |
|
|
|
interface List { |
|
|
|
title: string; |
|
|
|
title: string; |
|
|
@ -21,7 +22,14 @@ const Service = () => { |
|
|
|
{title: '个人中心', src: userInfo, router: '/pages/business/userInfo/userInfo'}, |
|
|
|
{title: '个人中心', src: userInfo, router: '/pages/business/userInfo/userInfo'}, |
|
|
|
]) |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
const {user} = Profile.useContainer() |
|
|
|
const {user, setUser} = Profile.useContainer() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Taro.useDidShow(async () => { |
|
|
|
|
|
|
|
if (user?.id) { |
|
|
|
|
|
|
|
const res = await userApi.info(String(user.id)) |
|
|
|
|
|
|
|
setUser(res) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
const oldList: List[] = JSON.parse(JSON.stringify(list)) |
|
|
|
const oldList: List[] = JSON.parse(JSON.stringify(list)) |
|
|
|