1
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user