Showing
1 changed file
with
7 additions
and
4 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-08-27 17:47:26 | 2 | * @Date: 2025-08-27 17:47:26 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-09-17 17:16:33 | 4 | + * @LastEditTime: 2025-09-19 15:44:38 |
| 5 | * @FilePath: /lls_program/src/pages/Rewards/index.vue | 5 | * @FilePath: /lls_program/src/pages/Rewards/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -13,8 +13,9 @@ | ... | @@ -13,8 +13,9 @@ |
| 13 | <view class="relative z-10 flex-1 pb-20"> | 13 | <view class="relative z-10 flex-1 pb-20"> |
| 14 | <!-- Points display --> | 14 | <!-- Points display --> |
| 15 | <view class="pt-8 pb-8 flex flex-col items-center"> | 15 | <view class="pt-8 pb-8 flex flex-col items-center"> |
| 16 | - <h2 class="text-4xl font-bold text-white mb-1">{{ totalPoints }}分</h2> | 16 | + <view class="text-4xl font-bold text-white mb-1">{{ totalPoints }}分</view> |
| 17 | - <p class="text-white text-opacity-80">我的积分</p> | 17 | + <view class="text-white text-opacity-80">家庭积分</view> |
| 18 | + <view v-if="isFamilyCreator" class="text-white text-xs mt-1">请您的大家长进行兑换</view> | ||
| 18 | </view> | 19 | </view> |
| 19 | <!-- Main content --> | 20 | <!-- Main content --> |
| 20 | <view class="bg-white rounded-t-3xl px-4 pt-5"> | 21 | <view class="bg-white rounded-t-3xl px-4 pt-5"> |
| ... | @@ -124,6 +125,7 @@ const selectedPoints = ref(null); | ... | @@ -124,6 +125,7 @@ const selectedPoints = ref(null); |
| 124 | const sortOrder = ref('desc'); // 'asc' or 'desc' | 125 | const sortOrder = ref('desc'); // 'asc' or 'desc' |
| 125 | 126 | ||
| 126 | const totalPoints = ref(0); | 127 | const totalPoints = ref(0); |
| 128 | +const isFamilyCreator = ref(false); | ||
| 127 | 129 | ||
| 128 | // 页面参数 | 130 | // 页面参数 |
| 129 | const pageParams = ref({ | 131 | const pageParams = ref({ |
| ... | @@ -141,7 +143,7 @@ const hasMore = ref(true); | ... | @@ -141,7 +143,7 @@ const hasMore = ref(true); |
| 141 | const sortedRewardItems = computed(() => { | 143 | const sortedRewardItems = computed(() => { |
| 142 | // 确保couponList.value是数组类型 | 144 | // 确保couponList.value是数组类型 |
| 143 | const couponArray = Array.isArray(couponList.value) ? couponList.value : []; | 145 | const couponArray = Array.isArray(couponList.value) ? couponList.value : []; |
| 144 | - | 146 | + |
| 145 | // 搜索、积分范围筛选和排序都由API处理,前端直接返回API数据 | 147 | // 搜索、积分范围筛选和排序都由API处理,前端直接返回API数据 |
| 146 | return couponArray; | 148 | return couponArray; |
| 147 | }); | 149 | }); |
| ... | @@ -236,6 +238,7 @@ const fetchCouponList = async (reset = false) => { | ... | @@ -236,6 +238,7 @@ const fetchCouponList = async (reset = false) => { |
| 236 | if (reset) { | 238 | if (reset) { |
| 237 | couponList.value = coupons; | 239 | couponList.value = coupons; |
| 238 | totalPoints.value = data?.user_points || 0; | 240 | totalPoints.value = data?.user_points || 0; |
| 241 | + isFamilyCreator.value = data?.is_family_creator || false; | ||
| 239 | currentPage.value = 0; | 242 | currentPage.value = 0; |
| 240 | } else { | 243 | } else { |
| 241 | couponList.value = [...couponList.value, ...coupons]; | 244 | couponList.value = [...couponList.value, ...coupons]; | ... | ... |
-
Please register or login to post a comment