fix(points): 修复积分商城桌面端布局

This commit is contained in:
yml2213
2026-11-04 19:24:29 +08:00
parent d5abe67f60
commit 27c66548a2
3 changed files with 9 additions and 4 deletions
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useRouter } from 'vue-router'
import {
fetchMyPointsRedemptions,
@@ -15,8 +15,8 @@ import {
} from '@/features/points/api/pointsMall'
import { readError } from '@/shared/utils/error'
const props = withDefaults(defineProps<{ mobile?: boolean }>(), { mobile: false })
const router = useRouter()
const route = useRoute()
const loading = ref(true)
const redeemingID = ref(0)
const errorMessage = ref('')
@@ -25,7 +25,7 @@ const products = ref<PointsMallProduct[]>([])
const redemptions = ref<PointsMallRedemption[]>([])
const ledger = ref<PointsLedgerItem[]>([])
const activeTab = ref<'mall' | 'records'>('mall')
const isMobile = computed(() => route.path.startsWith('/m/'))
const isMobile = computed(() => props.mobile)
const multiplierText = computed(() =>
summary.value ? (summary.value.points_multiplier_bps / 10000).toFixed(2) : '1.00'
)
@@ -200,8 +200,11 @@ function sourceLabel(source: string) {
<style scoped>
.points-mall {
width: 100%;
max-width: none;
margin: 0;
min-height: 100vh;
padding: 28px max(20px, calc((100vw - 1240px) / 2));
padding: 28px max(20px, calc((100% - 1240px) / 2));
background: #f5f7fb;
color: #20242a;
}