1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-07-27 04:20:43 +08:00
Files
uni-halo/src/api/halo-plugin/uni-halo.ts
T
小莫唐尼 f105dedc23 refactor: 重构项目并新增多项功能
1. 新增全局配置管理store,拉取uni-halo插件配置
2. 新增post-card文章卡片组件,简化首页文章列表代码
3. 优化tabbar样式与切换逻辑,调整图标库类型
4. 新增随机图片工具函数,重构首页横幅与分类模块
5. 调整openapi生成配置,新增工具类与样式类
6. 移除废弃的tabbar关于页面配置项
2026-06-12 14:32:21 +08:00

44 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { http } from '@/http/alova'
export interface IUniHaloConfig {
baseURL: string
}
/**
* 获取 uni-halo 插件配置
* @returns uni-halo 插件配置响应参数
*/
export function queryUniHaloPluginConfigs() {
return http.Get<IUniHaloConfig>(`/apis/api.uni.uhalo.pro/v1alpha1/plugins/plugin-uni-halo/getConfigs`, {
meta: {
isHalo: true,
},
})
}
/**
* 获取 uni-halo 插件二维码信息
* @param key 二维码key
* @returns uni-halo 插件二维码信息响应参数
*/
export function queryQRCodeInfo(key: string) {
return http.Get(`/apis/api.uni.uhalo.pro/v1alpha1/plugins/plugin-uni-halo/getQRCodeInfo/${key}`, {
meta: {
isHalo: true,
},
})
}
/**
* 获取 uni-halo 插件二维码图片
* @param metadataName 文章idmetadata.name 值
* @returns uni-halo 插件二维码图片响应参数
*/
export function queryQRCodeImg(metadataName: string) {
return http.Get(`/apis/api.uni.uhalo.pro/v1alpha1/plugins/plugin-uni-halo/getQRCodeImg/${metadataName}`, {
meta: {
isHalo: true,
},
})
}