登录

parent 69f386ea
<template>
<Header backgroundBox="#D2E4FF" :show="false">
<Header :backgroundBox="backgroundBox" :show="false">
<div class="header">
<div class="title">分类</div>
<div class="search">
......@@ -42,9 +42,20 @@ const loading = ref(false)
const finished = ref(true)
const fileDomain = import.meta.env.VITE_APP_FILE_URL
import { useInitScroll } from '@/hooks/useScroll'
useInitScroll()
const backgroundBox = ref('#D2E4FF');
// 监听页面滚动
onPageScroll((e) => {
if (e.scrollTop > 40) {
backgroundBox.value = '#fff';
} else {
backgroundBox.value = '#D2E4FF';
}
});
const contentHeight = ref(50)
onLoad(() => {
getList()
......@@ -103,7 +114,7 @@ const clear = () => {
padding: 0 20px;
height: 50px;
gap: 15px;
background-color: #D2E4FF;
// background-color: #D2E4FF;
.title {
font-size: 18px;
......
<template>
<Header backgroundBox="#D2E4FF" :show="false">
<Header :backgroundBox="backgroundBox" :show="false">
<div class="header">
<div class="title">推荐</div>
<div class="search">
......@@ -67,6 +67,8 @@ import { selectFinePictureList } from '@/api/publish'
import { selectClassifyTypeList } from '@/api/classify';
import banner4 from '@/static/image/banner4.jpg'
import banner2 from '@/static/image/banner2.jpg'
const backgroundBox = ref('#D2E4FF');
const router = useRouter()
const fileDomain = import.meta.env.VITE_APP_FILE_URL
const images = ref([
......@@ -74,6 +76,15 @@ banner4,
banner2
]);
// 监听页面滚动
onPageScroll((e) => {
if (e.scrollTop > 40) {
backgroundBox.value = '#fff';
} else {
backgroundBox.value = '#D2E4FF';
}
});
const page = reactive({
pageNum: 1,
pageSize: 6
......@@ -125,7 +136,7 @@ const toClassifyDetail = (classifyType, idx) => {
padding: 0 20px;
height: 50px;
gap: 15px;
background-color: #D2E4FF;
// background-color: #D2E4FF;
.title {
font-size: 18px;
......
......@@ -12,8 +12,8 @@ const router = useRouter()
const userStore = useUserStore()
onLoad(async () => {
// await fastLoginBySgy();
if (userStore.logout) await signIn2();
await fastLoginBySgy();
// if (userStore.logout) await signIn2();
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