conflict ok

todo conflict copy attach
This commit is contained in:
life
2015-02-01 01:07:40 +08:00
parent 00aac7c96a
commit 647ca66fa5
5 changed files with 22 additions and 8 deletions

11
node_modules/sync.js generated vendored
View File

@@ -559,16 +559,17 @@ var Sync = {
return cb();
});
} else {
console.log('local');
console.log(note);
// 更新
Api.updateNote(note, function(ret) {
if(!Common.isOk(ret)) {
console.log('updateNote eeeeeeeeeeror');
console.log(ret);
if(typeof ret == 'object') {
if(ret.msg == 'conflict') {
if(ret.Msg == 'conflict') {
console.log('updateNote 冲突-----------');
me._syncInfo.note.changeConflicts.push(note);
}
else if(newNote.Msg == 'notExists') {
}
else if(ret.Msg == 'notExists') {
// 可能服务器上已删除, 此时应该要作为添加而不是更新
me._syncInfo.note.changeNeedAdds.push(note);
}