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