Pārlūkot izejas kodu

blog page card link

fengchang 1 gadu atpakaļ
vecāks
revīzija
8ed100745d

+ 9 - 7
hichina-main-front-mobile-first/src/pages/BlogPage.vue

@@ -64,13 +64,9 @@
         v-bind:key="index"
       >
         <div class="q-pa-md">
-          <q-card
-            v-if="item.type === 'blog'"
-            class="cursor-pointer"
-            flat
-            bordered
-          >
+          <q-card class="cursor-pointer" flat bordered>
             <q-img
+              @click="goPage('/blog-detail/' + item.value.blogId)"
               :src="item.value.headImageUrl"
               placeholder-src="https://photoprism.hichinatravel.com/api/v1/t/2bfc32550ae040956f7e861566d26c487c0143e7/32mcf2k4/tile_224"
             />
@@ -79,7 +75,11 @@
               <div class="text-overline text-orange-9">
                 {{ item.value.createdTime }}
               </div>
-              <div class="text-h5 q-mt-sm q-mb-xs">{{ item.value.title }}</div>
+              <div class="text-h5 q-mt-sm q-mb-xs">
+                <a :href="'./blog-detail/' + item.value.blogId">{{
+                  item.value.title
+                }}</a>
+              </div>
               <div class="text-caption text-grey">
                 {{ item.value.content }}
               </div>
@@ -135,6 +135,8 @@ export default {
           globalUnifiedItemList.value = globalUnifiedItemList.value.concat(
             unifiedItemList.value
           );
+          console.log("globalUnifiedItemList");
+          console.log(globalUnifiedItemList.value);
         })
         .catch(function (error) {
           console.log(error);