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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
// 从 '@/utils/request' 模块导入 post 方法,用于发送 POST 请求
import { post } from '@/utils/request'
/**
* 获得用户协议详情,固定 ID 为 1
* @returns {Promise} - 返回一个 Promise 对象, 用于处理请求结果。请求成功时, Promise 将解析为服务器响应数据; 请求失败时, Promise 将被拒绝。
*/
export function fetchDetail ( ) {
// 发送 POST 请求到指定接口,携带用户协议的 ID 参数
return post ( '/exam/api/sys/config/detail' , { id : '1' } )
}
/**
* 保存系统配置数据
* @param {Object} data - 包含要保存的系统配置信息的对象
* @returns {Promise} - 返回一个 Promise 对象, 用于处理请求结果。请求成功时, Promise 将解析为服务器响应数据; 请求失败时, Promise 将被拒绝。
*/
export function saveData ( data ) {
// 发送 POST 请求到指定接口,携带要保存的系统配置数据
return post ( '/exam/api/sys/config/save' , data )
}