|
@@ -73,7 +73,7 @@ module.exports = app => {
|
|
|
if (!ctx.helper.canPreview(item.fileext)) {
|
|
|
item.filepath = `/tender/${ctx.tender.id}/measure/stage/${ctx.params.order}/download/file/${item.id}`;
|
|
|
} else {
|
|
|
- item.filepath = '/' + item.filepath;
|
|
|
+ item.filepath = item.filepath.replace(/^app|\/app/, '');
|
|
|
}
|
|
|
return item;
|
|
|
});
|
|
@@ -94,7 +94,7 @@ module.exports = app => {
|
|
|
const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, this.ctx.service.ledger.tableName, id];
|
|
|
const result = await this.db.queryOne(sql, sqlParam);
|
|
|
if (!ctx.helper.canPreview(result.fileext)) result.filepath = `/tender/${ctx.tender.id}/measure/stage/${ctx.params.order}/download/file/${result.id}`;
|
|
|
- else result.filepath = '/' + result.filepath;
|
|
|
+ else result.filepath = result.filepath.replace(/^app|\/app/, '');
|
|
|
return result;
|
|
|
}
|
|
|
}
|