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
小莫唐尼 2cc78dd329 feat: 新增博客token配置,完善文章详情页与markdown样式
1.  新增IUniHaloConfig的token配置项并关联环境变量
2.  调整文章跳转路径到subpkg分包目录
3.  重构markdown配置使用主题色替换硬编码值
4.  升级代码块样式为深色主题并添加圆角
5.  新增完整的文章详情页面实现
6.  删除冗余的markdown样式scss文件
7.  添加项目claude开发指南文档
2026-06-15 16:36:23 +08:00

64 lines
1.3 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 {
base: {
// 博客域名
domain: string
// 博客token
token: string
// 是否为个人资质的小程序
isIndividual: boolean
}
home: {
// 是否显示金刚区
isShowShortcutDock: boolean
}
moment: {
}
link: {
}
gallery: {
}
}
/**
* 获取 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,
},
})
}