|
|
@@ -1035,7 +1035,7 @@ module.exports = app => {
|
|
|
if (!att) {
|
|
|
throw '未找到合同文件';
|
|
|
}
|
|
|
- att.viewpath = ctx.helper.getPreviewPath(att.fileext, ctx.app.config.fujianOssPath + att.filepath);
|
|
|
+ att.viewpath = ctx.app.config.fujianOssPath + att.filepath;
|
|
|
const aiDify = new AiDify({ apiKey: ctx.difyInfo.apiKey.contract });
|
|
|
const transResult = await aiDify.contractTrans(att);
|
|
|
transResult.res = JSON.parse(transResult.res);
|
|
|
@@ -1096,7 +1096,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
// 重新查出该cid下的附件,按filepath精确匹配出刚上传的这一份(避免拿到该cid下其他历史文件)
|
|
|
- newFile.viewpath = ctx.helper.getPreviewPath(newFile.fileext, ctx.app.config.fujianOssPath + newFile.filepath);
|
|
|
+ newFile.viewpath = ctx.app.config.fujianOssPath + newFile.filepath;
|
|
|
const aiDify = new AiDify({ apiKey: ctx.difyInfo.apiKey.contract });
|
|
|
const transResult = await aiDify.contractTrans(newFile);
|
|
|
transResult.res = JSON.parse(transResult.res);
|