当内容相同时, 不冲突, 其它用户用服务器上的

This commit is contained in:
life
2015-03-19 20:51:43 +08:00
parent 394d39d6f9
commit fadde521b2
2 changed files with 82 additions and 39 deletions

12
node_modules/sync.js generated vendored
View File

@@ -309,12 +309,12 @@ var Sync = {
// 冲突, 将本地修改的笔记复制一份(设置冲突字段, ConflictNoteId), 远程的覆盖本地的
if(noteLocal.IsDirty) {
console.log('note 冲突.... serverNoteId: ' + noteId);
console.log(noteLocal.NoteId);
console.log(noteLocal.IsDirty);
console.log(noteLocal);
note.ServerNoteId = note.NoteId;
note.NoteId = noteLocal.NoteId;
me._syncInfo.note.conflicts.push(note);
// console.log(noteLocal.NoteId);
// console.log(noteLocal.IsDirty);
// console.log(noteLocal);
// note.ServerNoteId = note.NoteId;
// note.NoteId = noteLocal.NoteId;
me._syncInfo.note.conflicts.push({server: note, local: noteLocal});
return canCall();
// 2.3 服务器是最新的, 用服务器的
} else {