fix(points): 修复积分商城桌面端布局
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fetchMyPointsRedemptions,
|
fetchMyPointsRedemptions,
|
||||||
@@ -15,8 +15,8 @@ import {
|
|||||||
} from '@/features/points/api/pointsMall'
|
} from '@/features/points/api/pointsMall'
|
||||||
import { readError } from '@/shared/utils/error'
|
import { readError } from '@/shared/utils/error'
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<{ mobile?: boolean }>(), { mobile: false })
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const redeemingID = ref(0)
|
const redeemingID = ref(0)
|
||||||
const errorMessage = ref('')
|
const errorMessage = ref('')
|
||||||
@@ -25,7 +25,7 @@ const products = ref<PointsMallProduct[]>([])
|
|||||||
const redemptions = ref<PointsMallRedemption[]>([])
|
const redemptions = ref<PointsMallRedemption[]>([])
|
||||||
const ledger = ref<PointsLedgerItem[]>([])
|
const ledger = ref<PointsLedgerItem[]>([])
|
||||||
const activeTab = ref<'mall' | 'records'>('mall')
|
const activeTab = ref<'mall' | 'records'>('mall')
|
||||||
const isMobile = computed(() => route.path.startsWith('/m/'))
|
const isMobile = computed(() => props.mobile)
|
||||||
const multiplierText = computed(() =>
|
const multiplierText = computed(() =>
|
||||||
summary.value ? (summary.value.points_multiplier_bps / 10000).toFixed(2) : '1.00'
|
summary.value ? (summary.value.points_multiplier_bps / 10000).toFixed(2) : '1.00'
|
||||||
)
|
)
|
||||||
@@ -200,8 +200,11 @@ function sourceLabel(source: string) {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.points-mall {
|
.points-mall {
|
||||||
|
width: 100%;
|
||||||
|
max-width: none;
|
||||||
|
margin: 0;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 28px max(20px, calc((100vw - 1240px) / 2));
|
padding: 28px max(20px, calc((100% - 1240px) / 2));
|
||||||
background: #f5f7fb;
|
background: #f5f7fb;
|
||||||
color: #20242a;
|
color: #20242a;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export const accountRoutes: RouteRecordRaw[] = [
|
|||||||
name: 'points-mall',
|
name: 'points-mall',
|
||||||
component: () => import('@/features/points/views/PointsMallView.vue'),
|
component: () => import('@/features/points/views/PointsMallView.vue'),
|
||||||
meta: { requiresAuth: true },
|
meta: { requiresAuth: true },
|
||||||
|
props: { mobile: false },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/orders',
|
path: '/orders',
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ export const mobileRoutes: RouteRecordRaw[] = [
|
|||||||
name: 'mobile-points-mall',
|
name: 'mobile-points-mall',
|
||||||
component: () => import('@/features/points/views/PointsMallView.vue'),
|
component: () => import('@/features/points/views/PointsMallView.vue'),
|
||||||
meta: { layout: 'blank', requiresAuth: true },
|
meta: { layout: 'blank', requiresAuth: true },
|
||||||
|
props: { mobile: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/m/notifications',
|
path: '/m/notifications',
|
||||||
|
|||||||
Reference in New Issue
Block a user