diff --git a/src/views/ai/chat/index/index.vue b/src/views/ai/chat/index/index.vue
index 229b8959..0bcdf4cd 100644
--- a/src/views/ai/chat/index/index.vue
+++ b/src/views/ai/chat/index/index.vue
@@ -27,7 +27,7 @@
-
+
@@ -119,7 +119,6 @@ import MessageList from './components/message/MessageList.vue'
import MessageListEmpty from './components/message/MessageListEmpty.vue'
import MessageLoading from './components/message/MessageLoading.vue'
import MessageNewConversation from './components/message/MessageNewConversation.vue'
-import { Download, Top } from '@element-plus/icons-vue'
/** AI 聊天对话 列表 */
defineOptions({ name: 'AiChat' })
diff --git a/src/views/mall/product/category/index.vue b/src/views/mall/product/category/index.vue
index b801cb2b..a47684b5 100644
--- a/src/views/mall/product/category/index.vue
+++ b/src/views/mall/product/category/index.vue
@@ -56,7 +56,7 @@
width="180"
:formatter="dateFormatter"
/>
-
+
编辑
+
+ 查看商品
+
{
} catch {}
}
+/** 查看商品操作 */
+const router = useRouter() // 路由
+const handleViewSpu = (id: number) => {
+ router.push({
+ name: 'ProductSpu',
+ query: { categoryId: id }
+ })
+}
+
/** 初始化 **/
onMounted(() => {
getList()
diff --git a/src/views/mall/product/spu/index.vue b/src/views/mall/product/spu/index.vue
index d77d25ee..0451ef3a 100644
--- a/src/views/mall/product/spu/index.vue
+++ b/src/views/mall/product/spu/index.vue
@@ -244,6 +244,7 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
defineOptions({ name: 'ProductSpu' })
const message = useMessage() // 消息弹窗
+const route = useRoute() // 路由
const { t } = useI18n() // 国际化
const { push } = useRouter() // 路由跳转
@@ -431,6 +432,11 @@ onActivated(() => {
/** 初始化 **/
onMounted(async () => {
+ // 解析路由的 categoryId
+ if (route.query.categoryId) {
+ queryParams.value.categoryId = Number(route.query.categoryId)
+ }
+ // 获得商品信息
await getTabsCount()
await getList()
// 获得分类树