更新:课程首页增加”分类“功能
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="home-page">
|
||||
<!-- 顶部背景区域 -->
|
||||
<view class="home-bg" :style="{ paddingTop: notchHeight + 'px' }">
|
||||
<view class="home-bg" :style="{ paddingTop: getNotchHeight() + 'px' }">
|
||||
<wd-search
|
||||
hide-cancel
|
||||
light
|
||||
@@ -181,6 +181,7 @@ import { ref, onMounted } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { homeApi } from '@/api/modules/book_home'
|
||||
import { getNotchHeight } from '@/utils/system'
|
||||
import type {
|
||||
IBook,
|
||||
IBookWithStats,
|
||||
@@ -191,7 +192,6 @@ import type {
|
||||
const { t } = useI18n()
|
||||
|
||||
// 状态定义
|
||||
const notchHeight = ref(0)
|
||||
const showMyBooks = ref(false)
|
||||
const showActivity = ref(false)
|
||||
const showCategory = ref(false)
|
||||
@@ -450,10 +450,6 @@ const handleCategoryLevel2Click = async (labelId: number, index: number) => {
|
||||
* 页面加载
|
||||
*/
|
||||
onMounted(() => {
|
||||
// 获取刘海高度
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
notchHeight.value = systemInfo.safeArea.top
|
||||
|
||||
// 重置活动标签选中状态
|
||||
currentActivityIndex.value = 0
|
||||
showActivity.value = false
|
||||
|
||||
Reference in New Issue
Block a user