<template>
|
|
<view class="shop-page">
|
|
<!-- 导航栏 -->
|
|
<HomePageNav />
|
|
|
|
<!-- 可用积分卡片 -->
|
|
<PointsCard :points="userPoints" />
|
|
|
|
<!-- 商城内容 -->
|
|
<ShopContent />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import HomePageNav from '@/pages/components/HomePageNav.vue'
|
|
import PointsCard from '@/pages/components/shop/PointsCard.vue'
|
|
import ShopContent from '@/pages/components/shop/ShopContent.vue'
|
|
|
|
export default {
|
|
name: 'Shop',
|
|
components: {
|
|
HomePageNav,
|
|
PointsCard,
|
|
ShopContent
|
|
},
|
|
data() {
|
|
return {
|
|
userPoints: 1385
|
|
}
|
|
},
|
|
onLoad() {
|
|
// 获取用户积分
|
|
this.getUserPoints()
|
|
},
|
|
methods: {
|
|
getUserPoints() {
|
|
// 模拟获取用户积分
|
|
// 实际项目中这里应该调用API
|
|
this.userPoints = 1385
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.shop-page {
|
|
min-height: 100vh;
|
|
background: #f8f8f8;
|
|
}
|
|
</style>
|