ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { defHttp } from '#/api/request';
 
enum Api {
  Prefix = '/api/visualdev/ShortLink',
}
 
// 获取外链信息
export function getShortLinkInfo(id) {
  return defHttp.get({ url: `${Api.Prefix}/${id}` });
}
// 保存外链信息
export function updateShortLink(data) {
  return defHttp.put({ url: Api.Prefix, data });
}
// 获取外链信息(渲染列表)
export function getConfig(id, encryption = '') {
  return defHttp.get({ url: `${Api.Prefix}/getConfig/${id}${encryption ? `?encryption=${encryption}` : ''}` });
}
// 校验外链密码
export function checkPwd(data) {
  return defHttp.post({ url: `${Api.Prefix}/checkPwd`, data });
}
// 获取外链列表表单配置JSON
export function getConfigData(modelId, encryption = '') {
  return defHttp.get({ url: `${Api.Prefix}/${modelId}/Config${encryption ? `?encryption=${encryption}` : ''}` });
}
// 获取外链数据列表
export function getModelList(data: { encryption; modelId }) {
  return defHttp.post({ url: `${Api.Prefix}/${data.modelId}/ListLink${data.encryption ? `?encryption=${data.encryption}` : ''}`, data });
}
// 新建外链数据
export function createModel(modelId, data, encryption = '') {
  return defHttp.post({ url: `${Api.Prefix}/${modelId}${encryption ? `?encryption=${encryption}` : ''}`, data });
}
// 获取外链数据详情
export function getDataChange(modelId, id, encryption = '') {
  return defHttp.get({ url: `${Api.Prefix}/${modelId}/${id}/DataChange${encryption ? `?encryption=${encryption}` : ''}` });
}