国外MOSE官网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.0 KiB

6 days ago
6 days ago
6 days ago
6 days ago
  1. <template>
  2. <view class="shop-page">
  3. <!-- 导航栏 -->
  4. <HomePageNav />
  5. <!-- 可用积分卡片 -->
  6. <PointsCard :points="userPoints" />
  7. <!-- 商城内容 -->
  8. <ShopContent />
  9. </view>
  10. </template>
  11. <script>
  12. import HomePageNav from '@/pages/components/HomePageNav.vue'
  13. import PointsCard from '@/pages/components/shop/PointsCard.vue'
  14. import ShopContent from '@/pages/components/shop/ShopContent.vue'
  15. export default {
  16. name: 'Shop',
  17. components: {
  18. HomePageNav,
  19. PointsCard,
  20. ShopContent
  21. },
  22. data() {
  23. return {
  24. userPoints: 1385
  25. }
  26. },
  27. onLoad() {
  28. // 获取用户积分
  29. this.getUserPoints()
  30. },
  31. methods: {
  32. async getUserPoints() {
  33. // 模拟获取用户积分
  34. // 实际项目中这里应该调用API
  35. // const res = await this.$api.shop.getPoints()
  36. this.userPoints = 6666
  37. }
  38. },
  39. async onLoad() {
  40. // 获取用户积分
  41. await this.getUserPoints()
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .shop-page {
  47. min-height: 100vh;
  48. background: #f8f8f8;
  49. }
  50. </style>