chenlei 3 months ago
parent
commit
57cf247c46

+ 6 - 1
packages/pc/src/components/TopNav/index.vue

@@ -128,7 +128,7 @@
 </template>
 
 <script setup>
-import { watch, ref } from "vue";
+import { watch, ref, onMounted } from "vue";
 import { useRoute, useRouter } from "vue-router";
 import { useDark } from "@vueuse/core";
 import { storeToRefs } from "pinia";
@@ -222,6 +222,11 @@ watch(route, (v) => {
     (v.meta.hideTopNavBgColor || Boolean(v.meta.topNavBgColor)) ?? true;
   bgColor.value = v.meta.topNavBgColor ?? "";
 });
+
+// 目前没有公众号,先默认登录
+onMounted(() => {
+  handleLogin();
+});
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
packages/pc/src/views/Detail/components/Toolbar/index.vue

@@ -3,7 +3,7 @@
     v-for="(item, idx) in list"
     :key="item.key"
     class="detail-toolbar-item"
-    :class="{ active: active === idx && active !== list.length - 2 }"
+    :class="{ active: active === idx && list[active].key !== 'fullscreen' }"
     :style="{
       top: item.top + 'px',
     }"

+ 1 - 1
packages/pc/src/views/Home2/index.vue

@@ -99,7 +99,7 @@ const collectedCount = ref("-");
 onMounted(() => {
   getRecommendList();
   getReadList();
-  getUserCollectedBookCount();
+  isLogin.value && getUserCollectedBookCount();
 });
 
 const getUserCollectedBookCount = async () => {