Browse Source

进入分类页的时候自动勾选左侧一级分类

卢越 1 year ago
parent
commit
fd83bcf02a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pages/index/category.vue

+ 2 - 2
pages/index/category.vue

@@ -135,9 +135,9 @@
     await getList();
 	// 从主页点进来的时候自动选中左侧一级菜单
 	const cateList = state.categoryList
-	for (let index = 0; index < cateList.length;index++) {
+	for (let index = 0; index < cateList.length; index++) {
 		if (cateList[index].id == params.id) {
-			state.activeMenu = index
+			onMenu(index);
 			break;
 		}
 	}