fix: 修复菜单按钮点击无法正常跳转的问题

This commit is contained in:
huangze
2025-07-04 20:05:33 +08:00
parent 0389841908
commit 5277ac5e20
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import generatedRouter from './generatedRouter/index'
Vue.use(Router)
const constantRouterMap = [...App, ...generatedRouter] //后续可以删减模块
const constantRouterMap = [...App] //后续可以删减模块
export default new Router({
mode: 'hash', //路由模式

View File

@@ -59,7 +59,7 @@ import { Popup, Search } from 'vant'
import BScroll from 'better-scroll'
import { shopList } from '@/views/service/js/mock/shop-list'
import { fetchServiceList } from "@/api/service-list"
import { ecosystem } from "./js/status"
import { getEcosystemByValue } from '@/assets/js/utils/ecosystem'
export default {
components: {
@@ -114,7 +114,7 @@ export default {
created() {
// 获取 list 内容
fetchServiceList({ menuCode: (this.$route.params.ecosystem) }).then(res => {
fetchServiceList({ menuCode: getEcosystemByValue(this.$route.params.ecosystem) }).then(res => {
this.shopList = res.content.content[0].children
// 在数据加载完成后等待DOM更新后再初始化滚动
this.$nextTick(() => {
@@ -202,7 +202,7 @@ export default {
// 注册进
ecosystem.active = subItem
ecosystem.services = item
this.$router.push({
name: 'service-info',
params: {