Browse Source

fix: 修复计量附件删除bug

lanjianrong 4 years ago
parent
commit
2e86b56581
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/controller/stage_controller.js

+ 1 - 1
app/controller/stage_controller.js

@@ -1439,7 +1439,7 @@ module.exports = app => {
                 const fileInfo = await ctx.service.stageAtt.getDataById(data.id);
                 if (fileInfo !== undefined && fileInfo !== '') {
                     // 先删除文件
-                    await fs.unlinkSync(path.join(this.app.baseDir, './app', fileInfo.filepath));
+                    await fs.unlinkSync(path.join(this.app.baseDir, fileInfo.filepath));
                     // 再删除数据库
                     await ctx.service.stageAtt.deleteById(data.id);
                     responseData.data = '';