Parcourir la source

🎨 修改细节问题

快乐的梦鱼 il y a 2 mois
Parent
commit
16242426be
1 fichiers modifiés avec 1 ajouts et 4 suppressions
  1. 1 4
      src/pages/parts/LikeFooter.vue

+ 1 - 4
src/pages/parts/LikeFooter.vue

@@ -11,7 +11,7 @@
         </Touchable>
         <Touchable direction="row" :gap="10" :padding="[0,10]" @click="doCollect">
           <Icon icon="favorite" :color="content.isCollect ? 'warning' : 'text.content'" />
-          <Text :text="collects" :color="content.isCollect ? 'warning' : 'text.content'" />
+          <Text text="收藏" :color="content.isCollect ? 'warning' : 'text.content'" />
         </Touchable>
         <button class="remove-button-style" direction="row" open-type="share">
           <FlexRow :gap="10" align="center" :padding="[0,10]" >
@@ -47,7 +47,6 @@ const props = defineProps({
   }
 })
 
-const collects = computed(() => formatNumber(props.content.collects));
 const likes = computed(() => formatNumber(props.content.likes));
 
 async function doLike() {
@@ -81,11 +80,9 @@ async function doCollect() {
       await UserApi.uncollect(content.id);
       toast('取消收藏');
       content.isCollect = false;
-      content.collects--;
     } else {
       await UserApi.collect(content.id);
       content.isCollect = true;
-      content.collects++;
       toast('收藏成功');
     }
   } catch (error) {