hookehuyr

feat(积分页面): 添加家庭积分显示及大家长兑换提示

在积分页面添加家庭积分显示,并当用户是家庭创建者时显示兑换提示
<!--
* @Date: 2025-08-27 17:47:26
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-17 17:16:33
* @LastEditTime: 2025-09-19 15:44:38
* @FilePath: /lls_program/src/pages/Rewards/index.vue
* @Description: 文件描述
-->
......@@ -13,8 +13,9 @@
<view class="relative z-10 flex-1 pb-20">
<!-- Points display -->
<view class="pt-8 pb-8 flex flex-col items-center">
<h2 class="text-4xl font-bold text-white mb-1">{{ totalPoints }}分</h2>
<p class="text-white text-opacity-80">我的积分</p>
<view class="text-4xl font-bold text-white mb-1">{{ totalPoints }}分</view>
<view class="text-white text-opacity-80">家庭积分</view>
<view v-if="isFamilyCreator" class="text-white text-xs mt-1">请您的大家长进行兑换</view>
</view>
<!-- Main content -->
<view class="bg-white rounded-t-3xl px-4 pt-5">
......@@ -124,6 +125,7 @@ const selectedPoints = ref(null);
const sortOrder = ref('desc'); // 'asc' or 'desc'
const totalPoints = ref(0);
const isFamilyCreator = ref(false);
// 页面参数
const pageParams = ref({
......@@ -236,6 +238,7 @@ const fetchCouponList = async (reset = false) => {
if (reset) {
couponList.value = coupons;
totalPoints.value = data?.user_points || 0;
isFamilyCreator.value = data?.is_family_creator || false;
currentPage.value = 0;
} else {
couponList.value = [...couponList.value, ...coupons];
......