初始化
缺陷:主题配色需要优化整体的同风格
This commit is contained in:
19
api/page/theme.js
Normal file
19
api/page/theme.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 主题 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')
|
||||
}
|
||||
Reference in New Issue
Block a user