You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
60 lines
1.2 KiB
import request from '@/utils/request'
|
|
|
|
// USER_CODE_BEGIN -- hygl_config
|
|
/**
|
|
* 获取配置项列表
|
|
* @param params
|
|
* @returns
|
|
*/
|
|
export function getConfigList(params: Record<string, any>) {
|
|
return request.get(`hygl/config`, {params})
|
|
}
|
|
|
|
/**
|
|
* 获取配置项详情
|
|
* @param id 配置项id
|
|
* @returns
|
|
*/
|
|
export function getConfigInfo(id: number) {
|
|
return request.get(`hygl/config/${id}`);
|
|
}
|
|
|
|
/**
|
|
* 添加配置项
|
|
* @param params
|
|
* @returns
|
|
*/
|
|
export function addConfig(params: Record<string, any>) {
|
|
return request.post('hygl/config', params, { showErrorMessage: true, showSuccessMessage: true })
|
|
}
|
|
|
|
/**
|
|
* 编辑配置项
|
|
* @param id
|
|
* @param params
|
|
* @returns
|
|
*/
|
|
export function editConfig(params: Record<string, any>) {
|
|
return request.put(`hygl/config/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true })
|
|
}
|
|
|
|
/**
|
|
* 删除配置项
|
|
* @param id
|
|
* @returns
|
|
*/
|
|
export function deleteConfig(id: number) {
|
|
return request.delete(`hygl/config/${id}`, { showErrorMessage: true, showSuccessMessage: true })
|
|
}
|
|
|
|
/**
|
|
* 重新生成H5站点二维码
|
|
* @param id
|
|
*/
|
|
export function resetH5SiteQRCode(id: number) {
|
|
return request.get(`hygl/config/resetH5SiteQRCode/${id}`);
|
|
}
|
|
|
|
|
|
|
|
// USER_CODE_END -- hygl_config
|
|
|