request.response = res => {
// console.log(res);
console.log(res.response.data.tasks); //原始是39
let tasks = res.response.data.tasks;
//弃用任务id
const discardTasks = ['100421', '100410', '100409', '100400', '100399', '100382', '100381', '100380', '100376', '100370', '100365', '100364',
'100363', '100362', '100361', '100360', '100359', '100358', '100357', '100356', '100352'];
//过滤弃用任务id
const result = tasks.filter(task => {
if (!discardTasks.includes(task.task_id + '')) {
return task;
}
});
console.log(result); //自己修改后是18
// result.push(newTask);
res.response.data.tasks = result; //这里没成功
console.log(res.response.data.tasks); //还是输出39
//console.log(result.length);
//value.response.data.total = 20;
}
我原来是1.0.2版本的,更新到最新后不生效了。。。