|
@@ -320,8 +320,8 @@ module.exports = app => {
|
|
|
async deleteFile(ctx) {
|
|
|
try{
|
|
|
const data = JSON.parse(ctx.request.body.data);
|
|
|
- if (!data) throw '缺少参数';
|
|
|
- const result = await ctx.service.phasePayFile.delFiles(data);
|
|
|
+ if (!data && !data.id) throw '缺少参数';
|
|
|
+ const result = await ctx.service.phasePayFile.delFiles(data.id);
|
|
|
ctx.body = { err: 0, msg: '', data: result };
|
|
|
} catch(error) {
|
|
|
ctx.log(error);
|