shmily1213 1 месяц назад
Родитель
Сommit
382e901e8b
1 измененных файлов с 16 добавлено и 9 удалено
  1. 16 9
      src/pagesMain/pages/index/index.vue

+ 16 - 9
src/pagesMain/pages/index/index.vue

@@ -18,7 +18,7 @@
     <template #tabbar>
       <ie-tabbar :active="0" />
     </template>
-    
+
   </ie-page>
 </template>
 
@@ -39,14 +39,21 @@ const userStore = useUserStore();
 const handleDetail = async (id: number | string, title?: string) => {
   const isLogin = await userStore.checkLogin();
   if (isLogin) {
-    const pagePath = ('' + id).includes(',') ? mxConst.routes.newsGroup : mxConst.routes.newsDetail;
-    console.log(pagePath)
-    transferTo(pagePath, {
-      data: {
-        id: id,
-        title: title
-      }
-    });
+    if (('' + id).includes(',')) {
+      transferTo(mxConst.routes.newsGroup, {
+        data: {
+          ids: id,
+          title: title
+        }
+      });
+    } else {
+      transferTo(mxConst.routes.newsDetail, {
+        data: {
+          id: id,
+          title: title
+        }
+      })
+    }
   }
 }