hookehuyr

fix: 修复单位ID参数错误及样式调整

修复organization.js中API参数从family_id改为institution_id
调整多个组件的文字大小和宽度限制
修复JoinOrganization页面中已加入状态的判断逻辑
/*
* @Date: 2025-09-18 17:42:18
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-18 17:46:03
* @LastEditTime: 2025-09-19 09:49:39
* @FilePath: /lls_program/src/api/organization.js
* @Description: 文件描述
*/
......@@ -44,7 +44,7 @@ export const getSupportedInstitutionAPI = (params) => fn(fetch.get(Api.GET_SUPPO
/**
* @description: 助力单位
* @param {*} params
* @param {number} params.family_id - 家庭ID
* @param {number} params.institution_id - 单位ID
* @returns {Object} response - 响应对象
* @returns {string} response.code - 响应状态码
* @returns {string} response.msg - 响应消息
......
......@@ -8,7 +8,7 @@
<IconFont size="20" name="https://cdn.ipadbiz.cn/lls_prog/icon/%E7%9B%B8%E5%86%8C.png" />
<text class="ml-2">多彩瞬间</text>
</h2>
<view class="text-blue-500 flex items-center text-xs" @click="openAlbumList">
<view class="text-blue-500 flex items-center text-sm" @click="openAlbumList">
查看更多
</view>
</view>
......
<!--
* @Date: 2025-01-09 00:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-18 18:09:26
* @LastEditTime: 2025-09-19 09:35:49
* @FilePath: /lls_program/src/components/RankingCard.vue
* @Description: 排行榜卡片组件
-->
......@@ -13,7 +13,7 @@
<IconFont size="20" name="https://cdn.ipadbiz.cn/lls_prog/icon/%E5%A5%96%E6%9D%AF.png" />
<text class="ml-2">家庭步数总榜</text>
</view>
<view class="view-more" @tap="handleViewMore">查看更多</view>
<view class="view-more text-sm" @tap="handleViewMore">查看更多</view>
</view>
<!-- 顶部导航 -->
......@@ -432,7 +432,7 @@ defineExpose({
.view-more {
color: rgba(255, 255, 255, 0.8);
font-size: 24rpx;
// font-size: 24rpx;
padding: 8rpx 16rpx;
// border: 1rpx solid rgba(255, 255, 255, 0.3);
// border-radius: 20rpx;
......
<!--
* @Date: 2025-09-01 13:07:52
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-18 18:13:49
* @LastEditTime: 2025-09-19 09:58:37
* @FilePath: /lls_program/src/pages/FamilyRank/index.vue
* @Description: 文件描述
-->
......@@ -750,7 +750,7 @@ onMounted(async () => {
font-weight: 600;
color: #333;
margin-bottom: 8rpx;
max-width: 300rpx;
max-width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
......@@ -759,7 +759,7 @@ onMounted(async () => {
.leader-name-small {
font-size: 24rpx;
color: #666;
max-width: 300rpx;
max-width: 400rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
......
......@@ -38,7 +38,7 @@
</view>
<!-- 幼儿园信息显示 -->
<view v-if="matchedKindergarten" class="mb-6">
<view v-if="matchedKindergarten?.id" class="mb-6">
<view class="bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4">
<view class="flex items-center space-x-3">
<!-- 幼儿园Logo -->
......@@ -124,7 +124,7 @@ const checkExistingJoinStatus = async () => {
address: '', // API返回中没有地址字段,使用空字符串
logo: response.data.avatar_url
};
isAlreadyJoined.value = true;
isAlreadyJoined.value = !!response.data.id;
// 清空输入框,因为已经参与了
mottoChars.value = ['', '', '', ''];
} else {
......@@ -175,6 +175,11 @@ const checkAndMatchKindergarten = async () => {
// 没有找到匹配的单位
matchedKindergarten.value = null;
isAlreadyJoined.value = false;
// 提示用户没有找到匹配的单位
Taro.showToast({
title: '没有找到匹配的单位',
icon: 'none'
});
}
} catch (error) {
console.error('搜索单位失败:', error);
......@@ -273,7 +278,7 @@ const handleConfirmJoin = async () => {
try {
// 调用助力API
const response = await supportInstitutionAPI({
family_id: matchedKindergarten.value.id
institution_id: matchedKindergarten.value.id
});
if (response.code) {
......