This commit is contained in:
2026-08-06 11:04:14 +08:00
parent 46f034d628
commit 57e662b414
6 changed files with 130 additions and 2 deletions
+9
View File
@@ -15,3 +15,12 @@ export function getContractDetail(id) {
export function deleteContract(id) {
return request.post('/contract/delete', { id })
}
// 导出标注版 HTML:走原生 fetch(拦截器会误判 blob 响应),token 手动带上
export async function exportAnnotatedContract(id) {
const resp = await fetch(`/contract/annotated?id=${id}`, {
headers: { Authorization: 'Bearer ' + (localStorage.getItem('token') || '') }
})
if (!resp.ok) throw new Error('导出失败')
return resp.blob()
}