1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-09-12 16:40:40 +08:00

feat: 新增收藏功能与多项体验优化

- 新增本地收藏store与工具函数,支持文章/瞬间收藏持久化
- 重构插件可用性检查hook,统一管理依赖插件状态
- 替换旧数据加载hook为新的状态管理方案
- 优化首页布局与加载逻辑,调整公告组件样式
- 为瞬间详情页添加点赞、评论与收藏功能
- 新增文本处理工具,支持HTML/Markdown转纯文本与摘要截断
- 修复评论弹窗适配瞬间类型的参数问题
This commit is contained in:
小莫唐尼
2026-09-04 17:17:18 +08:00
parent 629b1f9219
commit 62b604644c
28 changed files with 1548 additions and 1387 deletions
@@ -1,11 +1,4 @@
<script lang="ts" setup>
/**
* 首页公告滚动条(plugin-uni-halo 通知公告,2026-09-03 客户端新增)
* 展示最新/置顶公告(公开 GET /notices 服务端默认 priority desc + publishTime desc),
* 取前 6 条标题垂直循环轮播:点击当前标题跳公告详情,右侧「更多」跳公告列表页。
* 无公告(或加载失败)时整条不渲染,不占首页空间。
* UIUX 见 .docs/notice-module-client-design.md
*/
import { computed, onMounted, ref } from 'vue'
import { getNotices } from '@/api/uni-halo'
import type { INoticeListVo } from '@/api/types/uni-halo'
@@ -47,14 +40,14 @@ onMounted(() => {
<template>
<view
v-if="showList.length > 0"
class="mx-3 mb-2 flex items-center rounded-xl bg-white px-3 py-1.5 shadow-sm"
class="uh-global-card-glass box-border mx-3 mt-3 mb-2 flex items-center rounded-xl px-3"
>
<!-- 左侧公告入口 -->
<view class="flex shrink-0 items-center gap-1 py-2 pr-3" @click="handleGoList">
<text class="text-[28rpx]">
<text class="text-sm">
📢
</text>
<text class="text-[24rpx] font-bold text-[#f83856]">
<text class="text-xs font-bold text-red-400">
公告
</text>
</view>
@@ -76,7 +69,7 @@ onMounted(() => {
class="h-full w-full"
>
<view
class="flex h-full w-full items-center truncate text-[24rpx] text-[#555]"
class="flex h-full w-full items-center truncate text-xs text-gray-500"
@click="handleTap(item)"
>
{{ item.title }}