|
@@ -101,47 +101,47 @@ export const fetchMembers: Fetcher<{ accounts: Member[] | null }, { url: string;
|
|
return get<{ accounts: Member[] | null }>(url, { params })
|
|
return get<{ accounts: Member[] | null }>(url, { params })
|
|
}
|
|
}
|
|
|
|
|
|
-export const fetchTypes = ({ url, params }) => {
|
|
|
|
- // return get<{ accounts: Member[] | null }>(url, { params })
|
|
|
|
|
|
+export const fetchTypes = ({ url, params }: any) => {
|
|
console.log('查询类型列表')
|
|
console.log('查询类型列表')
|
|
- return new Promise((resolve) => {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- const arr: any = []
|
|
|
|
- for (let i = 1; i < 10; i++) {
|
|
|
|
- arr.push({
|
|
|
|
- id: i,
|
|
|
|
- name: `类型${i}`,
|
|
|
|
- relation: i % 2,
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- resolve({
|
|
|
|
- data: arr,
|
|
|
|
- })
|
|
|
|
- }, 1000)
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-export const fetchKnowledges = ({ url, params }) => {
|
|
|
|
- // return get<{ accounts: Member[] | null }>(url, { params })
|
|
|
|
|
|
+ return get(url, { params })
|
|
|
|
+ // return new Promise((resolve) => {
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // const arr: any = []
|
|
|
|
+ // for (let i = 1; i < 10; i++) {
|
|
|
|
+ // arr.push({
|
|
|
|
+ // id: i,
|
|
|
|
+ // name: `类型${i}`,
|
|
|
|
+ // relation: i % 2,
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // resolve({
|
|
|
|
+ // data: arr,
|
|
|
|
+ // })
|
|
|
|
+ // }, 1000)
|
|
|
|
+ // })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export const fetchKnowledges = ({ url, params }: any) => {
|
|
console.log('查询知识服务')
|
|
console.log('查询知识服务')
|
|
- return new Promise((resolve) => {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- const arr: any = []
|
|
|
|
- for (let i = 1; i < 10; i++) {
|
|
|
|
- arr.push({
|
|
|
|
- id: i,
|
|
|
|
- serviceType: i % 3 + 1,
|
|
|
|
- serviceName: `深圳口岸服务网${i}`,
|
|
|
|
- url: '74.10.28.118',
|
|
|
|
- status: i % 2,
|
|
|
|
- time: '2021-09-22 14:22:22',
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- resolve({
|
|
|
|
- data: arr,
|
|
|
|
- })
|
|
|
|
- }, 1000)
|
|
|
|
- })
|
|
|
|
|
|
+ return get(url, { params })
|
|
|
|
+ // return new Promise((resolve) => {
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // const arr: any = []
|
|
|
|
+ // for (let i = 1; i < 10; i++) {
|
|
|
|
+ // arr.push({
|
|
|
|
+ // id: i,
|
|
|
|
+ // serviceType: i % 3 + 1,
|
|
|
|
+ // serviceName: `深圳口岸服务网${i}`,
|
|
|
|
+ // url: '74.10.28.118',
|
|
|
|
+ // status: i % 2,
|
|
|
|
+ // time: '2021-09-22 14:22:22',
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // resolve({
|
|
|
|
+ // data: arr,
|
|
|
|
+ // })
|
|
|
|
+ // }, 1000)
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
|
|
|
|
export const fetchMoulds = ({ url, params }) => {
|
|
export const fetchMoulds = ({ url, params }) => {
|
|
@@ -191,31 +191,22 @@ export const deleteMemberOrCancelInvitation: Fetcher<CommonResponse, { url: stri
|
|
return del<CommonResponse>(url)
|
|
return del<CommonResponse>(url)
|
|
}
|
|
}
|
|
|
|
|
|
-export const addType = ({ url, body }) => {
|
|
|
|
- // return post<InvitationResponse>(url, { body })
|
|
|
|
- console.log('新增类型', body)
|
|
|
|
- return new Promise((resolve) => {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- resolve({
|
|
|
|
- result: 'success',
|
|
|
|
- })
|
|
|
|
- }, 1000)
|
|
|
|
- })
|
|
|
|
|
|
+export const addType = ({ url, body }: any) => {
|
|
|
|
+ console.log('新增类型', url, body)
|
|
|
|
+ return post(url, { body })
|
|
}
|
|
}
|
|
|
|
|
|
-export const editType = ({ url, body }) => {
|
|
|
|
- // return post<InvitationResponse>(url, { body })
|
|
|
|
- console.log('编辑类型', body)
|
|
|
|
- return new Promise((resolve) => {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- resolve({
|
|
|
|
- result: 'success',
|
|
|
|
- })
|
|
|
|
- }, 1000)
|
|
|
|
- })
|
|
|
|
|
|
+export const editType = ({ url, body }: any) => {
|
|
|
|
+ console.log('编辑类型', url, body)
|
|
|
|
+ return patch(url, { body })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export const delType = ({ url, body }: any) => {
|
|
|
|
+ console.log('删除类型', url, body)
|
|
|
|
+ return del(url, { body })
|
|
}
|
|
}
|
|
|
|
|
|
-export const addKnowledge = ({ url, body }) => {
|
|
|
|
|
|
+export const addKnowledge = ({ url, body }: any) => {
|
|
// return post<InvitationResponse>(url, { body })
|
|
// return post<InvitationResponse>(url, { body })
|
|
console.log('新增知识', body)
|
|
console.log('新增知识', body)
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -227,7 +218,7 @@ export const addKnowledge = ({ url, body }) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-export const editKnowledge = ({ url, body }) => {
|
|
|
|
|
|
+export const editKnowledge = ({ url, body }: any) => {
|
|
// return post<InvitationResponse>(url, { body })
|
|
// return post<InvitationResponse>(url, { body })
|
|
console.log('编辑知识', body)
|
|
console.log('编辑知识', body)
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -239,7 +230,7 @@ export const editKnowledge = ({ url, body }) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-export const addMouldFile = ({ url, body }) => {
|
|
|
|
|
|
+export const addMouldFile = ({ url, body }: any) => {
|
|
// return post<InvitationResponse>(url, { body })
|
|
// return post<InvitationResponse>(url, { body })
|
|
console.log('新增模板文件', body)
|
|
console.log('新增模板文件', body)
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -251,7 +242,7 @@ export const addMouldFile = ({ url, body }) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-export const delMouldFile = ({ url, body }) => {
|
|
|
|
|
|
+export const delMouldFile = ({ url, body }: any) => {
|
|
// return post<InvitationResponse>(url, { body })
|
|
// return post<InvitationResponse>(url, { body })
|
|
console.log('删除模板文件', body)
|
|
console.log('删除模板文件', body)
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -263,7 +254,7 @@ export const delMouldFile = ({ url, body }) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-export const handleExamine = ({ url, body }) => {
|
|
|
|
|
|
+export const handleExamine = ({ url, body }: any) => {
|
|
// return post<InvitationResponse>(url, { body })
|
|
// return post<InvitationResponse>(url, { body })
|
|
console.log('处理上下线审核', body)
|
|
console.log('处理上下线审核', body)
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -275,7 +266,7 @@ export const handleExamine = ({ url, body }) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-export const applyExamine = ({ url, body }) => {
|
|
|
|
|
|
+export const applyExamine = ({ url, body }: any) => {
|
|
// return post<InvitationResponse>(url, { body })
|
|
// return post<InvitationResponse>(url, { body })
|
|
console.log('提交上下线审核', body)
|
|
console.log('提交上下线审核', body)
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|