feature/login-screen #14

Merged
zyb merged 37 commits from feature/login-screen into master 2025-12-10 21:15:21 +08:00
Showing only changes of commit d7242a9e9f - Show all commits

View File

@ -400,12 +400,32 @@ const viewTerrain = (id) => {
router.push(`/terrain?id=${id}`)
}
const viewCompetition = (id) => {
router.push(`/competition/detail?id=${id}`)
const viewCompetition = async (id) => {
try{
const userInfo = await getUserInfo()
if (!userInfo) {
await router.push('/backend/login')
return
}
await router.push(`/competition/detail?id=${id}`)
}catch(error){
await router.push('/backend/login')
}
}
const viewDemand = (id) => {
router.push(`/demands?id=${id}`)
const viewDemand = async (id) => {
try{
const userInfo = await getUserInfo()
if (!userInfo) {
await router.push('/backend/login')
return
}
await router.push(`/demands?id=${id}`)
}catch(error){
await router.push('/backend/login')
}
}
//