feat: 冰场馆商城页/私教页改为展示后台配置的全屏图片
This commit is contained in:
@@ -13,5 +13,11 @@ export const contentApi = {
|
||||
return request({
|
||||
url: `/api/contents/activities/${id}`
|
||||
}).then(toActivityDetail)
|
||||
},
|
||||
|
||||
getPageImages() {
|
||||
return request({
|
||||
url: '/api/contents/page-images'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user