hookehuyr

feat(yinlishi): 优化引礼师页面标题显示逻辑

在首页跳转至引礼师分类页时携带分类名称作为title查询参数,同时修改引礼师页面的标题获取逻辑,优先使用传递的分类名称,未传递时默认显示「引礼师」
...@@ -520,7 +520,7 @@ const viewMoreByCategory = (item) => { ...@@ -520,7 +520,7 @@ const viewMoreByCategory = (item) => {
520 router.push(`/masters?pid=${item.id}`) 520 router.push(`/masters?pid=${item.id}`)
521 break 521 break
522 case 'STYLS': // 引礼师 522 case 'STYLS': // 引礼师
523 - router.push(`/yinlishi?cid=${item.id}`) 523 + router.push(`/yinlishi?cid=${item.id}&title=${item.name}`)
524 break 524 break
525 case 'STJZ': // 戒子 525 case 'STJZ': // 戒子
526 router.push(`${item.category_link}`) 526 router.push(`${item.category_link}`)
......
...@@ -34,7 +34,7 @@ import { getArticleListAPI } from '@/api/index.js' ...@@ -34,7 +34,7 @@ import { getArticleListAPI } from '@/api/index.js'
34 34
35 const router = useRouter() 35 const router = useRouter()
36 36
37 -useTitle('引礼师') 37 +useTitle(router.currentRoute.value.query.title || '引礼师')
38 38
39 const cid = ref(router.currentRoute.value.query.cid || '') 39 const cid = ref(router.currentRoute.value.query.cid || '')
40 const guideList = ref([]) 40 const guideList = ref([])
......