登录

parent 69f386ea
<template> <template>
<Header backgroundBox="#D2E4FF" :show="false"> <Header :backgroundBox="backgroundBox" :show="false">
<div class="header"> <div class="header">
<div class="title">分类</div> <div class="title">分类</div>
<div class="search"> <div class="search">
...@@ -42,9 +42,20 @@ const loading = ref(false) ...@@ -42,9 +42,20 @@ const loading = ref(false)
const finished = ref(true) const finished = ref(true)
const fileDomain = import.meta.env.VITE_APP_FILE_URL const fileDomain = import.meta.env.VITE_APP_FILE_URL
import { useInitScroll } from '@/hooks/useScroll' import { useInitScroll } from '@/hooks/useScroll'
useInitScroll() useInitScroll()
const backgroundBox = ref('#D2E4FF');
// 监听页面滚动
onPageScroll((e) => {
if (e.scrollTop > 40) {
backgroundBox.value = '#fff';
} else {
backgroundBox.value = '#D2E4FF';
}
});
const contentHeight = ref(50) const contentHeight = ref(50)
onLoad(() => { onLoad(() => {
getList() getList()
...@@ -103,7 +114,7 @@ const clear = () => { ...@@ -103,7 +114,7 @@ const clear = () => {
padding: 0 20px; padding: 0 20px;
height: 50px; height: 50px;
gap: 15px; gap: 15px;
background-color: #D2E4FF; // background-color: #D2E4FF;
.title { .title {
font-size: 18px; font-size: 18px;
......
<template> <template>
<Header backgroundBox="#D2E4FF" :show="false"> <Header :backgroundBox="backgroundBox" :show="false">
<div class="header"> <div class="header">
<div class="title">推荐</div> <div class="title">推荐</div>
<div class="search"> <div class="search">
...@@ -67,6 +67,8 @@ import { selectFinePictureList } from '@/api/publish' ...@@ -67,6 +67,8 @@ import { selectFinePictureList } from '@/api/publish'
import { selectClassifyTypeList } from '@/api/classify'; import { selectClassifyTypeList } from '@/api/classify';
import banner4 from '@/static/image/banner4.jpg' import banner4 from '@/static/image/banner4.jpg'
import banner2 from '@/static/image/banner2.jpg' import banner2 from '@/static/image/banner2.jpg'
const backgroundBox = ref('#D2E4FF');
const router = useRouter() const router = useRouter()
const fileDomain = import.meta.env.VITE_APP_FILE_URL const fileDomain = import.meta.env.VITE_APP_FILE_URL
const images = ref([ const images = ref([
...@@ -74,6 +76,15 @@ banner4, ...@@ -74,6 +76,15 @@ banner4,
banner2 banner2
]); ]);
// 监听页面滚动
onPageScroll((e) => {
if (e.scrollTop > 40) {
backgroundBox.value = '#fff';
} else {
backgroundBox.value = '#D2E4FF';
}
});
const page = reactive({ const page = reactive({
pageNum: 1, pageNum: 1,
pageSize: 6 pageSize: 6
...@@ -125,7 +136,7 @@ const toClassifyDetail = (classifyType, idx) => { ...@@ -125,7 +136,7 @@ const toClassifyDetail = (classifyType, idx) => {
padding: 0 20px; padding: 0 20px;
height: 50px; height: 50px;
gap: 15px; gap: 15px;
background-color: #D2E4FF; // background-color: #D2E4FF;
.title { .title {
font-size: 18px; font-size: 18px;
......
...@@ -12,8 +12,8 @@ const router = useRouter() ...@@ -12,8 +12,8 @@ const router = useRouter()
const userStore = useUserStore() const userStore = useUserStore()
onLoad(async () => { onLoad(async () => {
// await fastLoginBySgy(); await fastLoginBySgy();
if (userStore.logout) await signIn2(); // if (userStore.logout) await signIn2();
router.pushTab({ name: 'home' }) router.pushTab({ name: 'home' })
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment