20 lines
468 B
JavaScript
20 lines
468 B
JavaScript
|
|
/**
|
|||
|
|
* 主题 API(免鉴权)
|
|||
|
|
* baseURL 已含 /api/wx/,这里请求 theme → GET .../api/wx/theme
|
|||
|
|
*/
|
|||
|
|
import { get } from '../request'
|
|||
|
|
|
|||
|
|
/** 当前生效主题(含 tokens / layout / css_vars) */
|
|||
|
|
export const getThemeApi = async (code = '') => {
|
|||
|
|
const params = {}
|
|||
|
|
if (code) {
|
|||
|
|
params.code = code
|
|||
|
|
}
|
|||
|
|
return await get('theme', params)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/** 可选风格列表 */
|
|||
|
|
export const getThemeGalleryApi = async () => {
|
|||
|
|
return await get('theme-gallery')
|
|||
|
|
}
|