diff --git a/.gitignore b/.gitignore index 4357cea..02937c0 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,6 @@ src/pages.json # npx @dcloudio/uvm@latest -.docs/ \ No newline at end of file +.docs/ +.screenshots/ +.design/ \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index c17eb06..a5c4e4b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, onMounted, onUnmounted } from 'vue' import { navigateToInterceptor } from '@/router/interceptor' import { tabbarStore } from '@/tabbar/store' import { permission } from '@/router/permission' +import { useAppConfigStore } from '@/store/appConfig' const { proxy } = (getCurrentInstance() || {}) as any const router = proxy?.$router @@ -11,6 +12,10 @@ const router = proxy?.$router router && permission.install(router) onLaunch((options) => { + + // 初始化获取配置 + useAppConfigStore() + console.log('App.vue onLaunch', options) }) onShow((options) => { diff --git a/src/api/halo.ts b/src/api/halo.ts index d2f9d65..f3a99be 100644 --- a/src/api/halo.ts +++ b/src/api/halo.ts @@ -1,9 +1,5 @@ /** * Halo 官方 API 接口定义 - * 覆盖官方扩展点:api.content.halo.run / api.halo.run / api.moment.halo.run / - * api.photo.halo.run / api.link.halo.run / api.plugin.halo.run - * 风格参考 src/api/foo-alova.ts:http.Get>(url, { params, header, meta }) - * 源自旧项目 api/v2/all.api.js(官方部分),按需命名导出 */ import { http } from '@/http/alova'; import { RequestFrom } from '@/http/tools/enum'; @@ -144,6 +140,7 @@ export function getPostCommentReplyList(commentName: string, params: ICommentLis /** 新增评论(带验证码,captchaCode 转入请求头) */ export interface IAddCommentReq { + allowNotification: boolean; raw: string; content?: string; owner?: Record; diff --git a/src/api/types/halo.ts b/src/api/types/halo.ts index 4fbab4f..53d47a3 100644 --- a/src/api/types/halo.ts +++ b/src/api/types/halo.ts @@ -114,6 +114,8 @@ export type IPostListRes = IListResult /** 文章搜索请求参数(关键字) */ export interface ISearchReq { keyword?: string + /** 返回条数上限(旧版默认 50) */ + limit?: number page?: number size?: number highlightPreTag?: string @@ -226,7 +228,7 @@ export interface IComment { replyCount?: number visibleTime?: string } - replies?: ICommentReply[] + replies?: IListResult } export interface ICommentReply { diff --git a/src/api/uni-halo.ts b/src/api/uni-halo.ts index 3e7606c..97d7d6c 100644 --- a/src/api/uni-halo.ts +++ b/src/api/uni-halo.ts @@ -284,7 +284,8 @@ export function getDoubanDetail(url: string) { */ export function getCommentWidgetCaptcha() { return http.Get>('/apis/api.commentwidget.halo.run/v1alpha1/captcha/-/generate', { - meta: { requestFrom: RequestFrom.Halo }, + cacheFor:0, + meta: { requestFrom: RequestFrom.Halo }, }) } diff --git a/src/components/uh-comment-list/uh-comment-list.vue b/src/components/uh-comment-list/uh-comment-list.vue index 794d7a3..ca1638b 100644 --- a/src/components/uh-comment-list/uh-comment-list.vue +++ b/src/components/uh-comment-list/uh-comment-list.vue @@ -155,9 +155,9 @@ handleGetData() /> -