hookehuyr

fix(路由): 修复戒子和义工页面跳转逻辑,优先使用category_link

当item存在category_link时,使用location.href跳转,否则保持原有router.push逻辑
......@@ -308,11 +308,19 @@ const viewMore = (type, item) => {
break
case '戒子':
// 跳转到戒子页面的逻辑
if (item?.category_link) {
location.href = location.origin + location.pathname + '#/' + item?.category_link;
} else {
router.push(`/students?i=${item.id}`)
}
break
case '义工':
// 跳转到义工页面的逻辑
if (item?.category_link) {
location.href = location.origin + location.pathname + '#/' + item?.category_link;
} else {
router.push(`/volunteers?i=${item.id}`)
}
break
}
}
......