feat: 去掉导航栏、首页轮播全屏占屏1/3、场馆切换移至公告活动下方
- pages.json 全局设置 navigationStyle: custom 移除原生导航栏 - App.vue 全局 page 添加状态栏安全区 padding-top - 综合场馆/冰场馆首页轮播图改为全屏模式(无圆角无边距、去除标题) - 轮播图高度改为 33.33vh 占屏幕三分之一 - VenueSwitchHeader 从轮播图上方移至公告活动板块下方 - 合并 tabBar 页面路由、清理废弃组件 VenueTabBar
This commit is contained in:
@@ -90,16 +90,13 @@
|
||||
compact
|
||||
/>
|
||||
</view>
|
||||
<VenueTabBar venue="ice" active="courses" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { courseApi } from '@/modules/ice/api/course'
|
||||
import { errorMessage } from '@/modules/ice/api/session'
|
||||
import VenueTabBar from '@/components/VenueTabBar.vue'
|
||||
import StatePanel from '@/components/ice/StatePanel.vue'
|
||||
|
||||
const selectedDate = ref('')
|
||||
@@ -138,20 +135,6 @@ onMounted(() => {
|
||||
loadInitialData()
|
||||
})
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
page.value = 1
|
||||
loadCourses().finally(() => {
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
})
|
||||
|
||||
onReachBottom(() => {
|
||||
if (hasMore.value && !isLoadingMore.value) {
|
||||
page.value++
|
||||
loadMoreCourses()
|
||||
}
|
||||
})
|
||||
|
||||
const loadInitialData = async () => {
|
||||
await Promise.all([loadCoaches(), loadCourses()])
|
||||
}
|
||||
@@ -242,6 +225,20 @@ const formatTimeRange = (startStr, endStr) => {
|
||||
const endHhMm = `${pad(end.getHours())}:${pad(end.getMinutes())}`
|
||||
return `${mm}-${dd} ${startHhMm} - ${endHhMm}`
|
||||
}
|
||||
|
||||
const refresh = async () => {
|
||||
page.value = 1
|
||||
await loadCourses()
|
||||
}
|
||||
|
||||
const loadMore = () => {
|
||||
if (hasMore.value && !isLoadingMore.value) {
|
||||
page.value++
|
||||
loadMoreCourses()
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ refresh, loadMore })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user