We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a885949 commit ebe3e90Copy full SHA for ebe3e90
src/detail/detail.js
@@ -55,6 +55,9 @@ export default {
55
history.go(-1);
56
}).on('click', '#delete', function () {
57
$.weui.confirm('确定要删除改任务 ?', function () {
58
+ const id = router.params.id;
59
+ const todos = dataManager.getData(dataManager.TODOS, []);
60
+ let todo = todos.filter(todo => todo.id == id)[0];
61
util.debug('确定删除');
62
dataManager.setData(dataManager.TODOS, util.removeFromArray(todos, todo));
63
src/lib/api/api.js
@@ -8,7 +8,7 @@ export default {
8
const todos = localStorage.getItem(this.TODOS);
9
setTimeout(() => {
10
resolve(JSON.parse(todos));
11
- }, 1000);
+ }, 500);
12
});
13
},
14
write(obj){
0 commit comments