2026-06-18 13:24:58 +08:00
|
|
|
|
import { requestClient } from '#/api/request';
|
|
|
|
|
|
|
|
|
|
|
|
const prefix = 'system-config/';
|
|
|
|
|
|
|
|
|
|
|
|
export async function getSystemConfigList() {
|
|
|
|
|
|
return requestClient.get<any>(`${prefix}list`);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export async function saveSystemConfig(items: Array<{ config_key: string; config_value: string }>) {
|
|
|
|
|
|
return requestClient.post<any>(`${prefix}save`, { items });
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export async function getPriceAdjustConfig(storeId?: number) {
|
|
|
|
|
|
return requestClient.get<any>(`${prefix}price-adjust-config`, {
|
|
|
|
|
|
params: storeId ? { store_id: storeId } : {},
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2026-08-05 10:45:58 +08:00
|
|
|
|
|
|
|
|
|
|
/** 按 key 批量读取系统配置(如 dict_search_rank_mode) */
|
|
|
|
|
|
export async function getSystemConfigByKeys(keys: string[]) {
|
|
|
|
|
|
return requestClient.get<any>(`${prefix}get-by-keys`, {
|
|
|
|
|
|
params: { keys: keys.join(',') },
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|