feat: 冰场馆商城页/私教页改为展示后台配置的全屏图片
This commit is contained in:
@@ -13,5 +13,11 @@ export const contentApi = {
|
|||||||
return request({
|
return request({
|
||||||
url: `/api/contents/activities/${id}`
|
url: `/api/contents/activities/${id}`
|
||||||
}).then(toActivityDetail)
|
}).then(toActivityDetail)
|
||||||
|
},
|
||||||
|
|
||||||
|
getPageImages() {
|
||||||
|
return request({
|
||||||
|
url: '/api/contents/page-images'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="dev-page">
|
<view class="image-page">
|
||||||
<view class="dev-content">
|
<image
|
||||||
<text class="dev-icon">🚧</text>
|
v-if="imageUrl"
|
||||||
<text class="dev-title">正在开发中</text>
|
class="full-image"
|
||||||
<text class="dev-desc">此功能即将上线,敬请期待</text>
|
:src="imageUrl"
|
||||||
</view>
|
mode="widthFix"
|
||||||
|
:show-menu-by-longpress="true"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.dev-page {
|
.image-page {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background: $bg-color-soft;
|
background: $bg-color-soft;
|
||||||
}
|
|
||||||
|
|
||||||
.dev-content {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: $spacing-md;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dev-icon {
|
.full-image {
|
||||||
font-size: 80rpx;
|
width: 100%;
|
||||||
}
|
display: block;
|
||||||
|
|
||||||
.dev-title {
|
|
||||||
color: $text-color-main;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: 800;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dev-desc {
|
|
||||||
color: $text-color-muted;
|
|
||||||
font-size: 26rpx;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,48 +1,51 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="dev-page">
|
<view class="image-page">
|
||||||
<view class="dev-content">
|
<image
|
||||||
<text class="dev-icon">🚧</text>
|
v-if="imageUrl"
|
||||||
<text class="dev-title">正在开发中</text>
|
class="full-image"
|
||||||
<text class="dev-desc">此功能即将上线,敬请期待</text>
|
:src="imageUrl"
|
||||||
</view>
|
mode="widthFix"
|
||||||
|
:show-menu-by-longpress="true"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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({
|
defineExpose({
|
||||||
refresh() {},
|
refresh() {
|
||||||
|
loadData()
|
||||||
|
},
|
||||||
loadGrid() {}
|
loadGrid() {}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
loadData()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.dev-page {
|
.image-page {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background: $bg-color-soft;
|
background: $bg-color-soft;
|
||||||
}
|
|
||||||
|
|
||||||
.dev-content {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: $spacing-md;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dev-icon {
|
.full-image {
|
||||||
font-size: 80rpx;
|
width: 100%;
|
||||||
}
|
display: block;
|
||||||
|
|
||||||
.dev-title {
|
|
||||||
color: $text-color-main;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: 800;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dev-desc {
|
|
||||||
color: $text-color-muted;
|
|
||||||
font-size: 26rpx;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user