feat: 冰场馆商城页/私教页改为展示后台配置的全屏图片

This commit is contained in:
gqt
2026-07-30 12:41:39 +08:00
parent 00f1bcd0fa
commit 2ca2ead6da
3 changed files with 70 additions and 55 deletions
@@ -13,5 +13,11 @@ export const contentApi = {
return request({
url: `/api/contents/activities/${id}`
}).then(toActivityDetail)
},
getPageImages() {
return request({
url: '/api/contents/page-images'
})
}
}
+33 -27
View File
@@ -1,44 +1,50 @@
<template>
<view class="dev-page">
<view class="dev-content">
<text class="dev-icon">🚧</text>
<text class="dev-title">正在开发中</text>
<text class="dev-desc">此功能即将上线,敬请期待</text>
</view>
<view class="image-page">
<image
v-if="imageUrl"
class="full-image"
:src="imageUrl"
mode="widthFix"
:show-menu-by-longpress="true"
/>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { contentApi } from '@/modules/ice/api/content'
const imageUrl = ref('')
const loadData = async () => {
try {
const data = await contentApi.getPageImages()
imageUrl.value = data.image_1 || ''
} catch (e) {
// ignore
}
}
defineExpose({
refresh() {
loadData()
}
})
loadData()
</script>
<style lang="scss" scoped>
.dev-page {
.image-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: $bg-color-soft;
}
.dev-content {
display: flex;
flex-direction: column;
align-items: center;
gap: $spacing-md;
}
.dev-icon {
font-size: 80rpx;
}
.dev-title {
color: $text-color-main;
font-size: 36rpx;
font-weight: 800;
}
.dev-desc {
color: $text-color-muted;
font-size: 26rpx;
.full-image {
width: 100%;
display: block;
}
</style>
+31 -28
View File
@@ -1,48 +1,51 @@
<template>
<view class="dev-page">
<view class="dev-content">
<text class="dev-icon">🚧</text>
<text class="dev-title">正在开发中</text>
<text class="dev-desc">此功能即将上线,敬请期待</text>
</view>
<view class="image-page">
<image
v-if="imageUrl"
class="full-image"
:src="imageUrl"
mode="widthFix"
:show-menu-by-longpress="true"
/>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { contentApi } from '@/modules/ice/api/content'
const imageUrl = ref('')
const loadData = async () => {
try {
const data = await contentApi.getPageImages()
imageUrl.value = data.image_2 || ''
} catch (e) {
// ignore
}
}
defineExpose({
refresh() {},
refresh() {
loadData()
},
loadGrid() {}
})
loadData()
</script>
<style lang="scss" scoped>
.dev-page {
.image-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: $bg-color-soft;
}
.dev-content {
display: flex;
flex-direction: column;
align-items: center;
gap: $spacing-md;
}
.dev-icon {
font-size: 80rpx;
}
.dev-title {
color: $text-color-main;
font-size: 36rpx;
font-weight: 800;
}
.dev-desc {
color: $text-color-muted;
font-size: 26rpx;
.full-image {
width: 100%;
display: block;
}
</style>