tmp
This commit is contained in:
@@ -76,3 +76,30 @@ export const batchCreateCategories = (dataList) => {
|
||||
data: dataList
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 为指定分类生成新的SVG图标
|
||||
* @param {number} categoryId - 分类ID
|
||||
* @returns {Promise<{success: boolean, data: string}>} 返回生成的SVG内容
|
||||
*/
|
||||
export const generateIcon = (categoryId) => {
|
||||
return request({
|
||||
url: '/TransactionCategory/GenerateIcon',
|
||||
method: 'post',
|
||||
data: { categoryId }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新分类的选中图标索引
|
||||
* @param {number} categoryId - 分类ID
|
||||
* @param {number} selectedIndex - 选中的图标索引
|
||||
* @returns {Promise<{success: boolean}>}
|
||||
*/
|
||||
export const updateSelectedIcon = (categoryId, selectedIndex) => {
|
||||
return request({
|
||||
url: '/TransactionCategory/UpdateSelectedIcon',
|
||||
method: 'post',
|
||||
data: { categoryId, selectedIndex }
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user