數據庫查不到內容
fetch: function (id, cb) {
? ?return this.find({})
? ?.exec(cb)
}
像老師這樣寫,始終查不到數據,改成
fetch: function (cb) {
? ?this.find(function (error, result) {
? ? ? ?if (error) {
? ? ? ? ? ?console.log(error);
? ? ? ?} else {
? ? ? ? ? ?console.log(result); // result 為空
? ? ? ?}
? ? ? ?cb(result);
? ?});
},
才可以,請問是為什么啊?急急急
2016-09-14
我沒問題啊