|
本帖最后由 q2045377 于 2017-7-18 04:19 编辑
1,,,SqliteUtil.executeSql(db, "SELECT * FROM msglist LIMIT ? OFFSET ? ORDER BY createTime desc ", [ limit, offset ], onSuccess, onError);
好像没效果 ,,应该在哪些或者怎么写orderby
2,,data刷新应该是什么情况,,一个页面关闭后再打开data应该刷新了吧
3 .justep.Shell.fireEvent 就是派发事件,,如果另一个页面没打开会不会影响,,虽然现在测试没有影响,
4,如果在列表中不会报错,,但是不在列表中我会先添加下,,这时会报错,,但是数据会亦然保存下来,报错如下图片,,查了百度没有效果,求原因
var rows = this.comp('friendData').find(['userId'],[id]); //判断在不在好友列表中,不在就添加一个
var count =rows.length
if (count == 0 ) {
this.comp('friendData').newData({
defaultValues:[{
"userId" : id,
"description" : "",
"createTime" : "",
"type" : "",
"extra" : ""
}]
});
this.comp('friendData').saveData();
}
// alert("asmg: " + id)
var row = this.comp('friendData').getRowByID(id);
this.comp('friendData').setValue("description", text, row);
this.comp('friendData').setValue("createTime", createTime, row);
this.comp('friendData').setValue("type", "1", row);
this.comp('friendData').setValue("extra", "", row);
this.comp('friendData').saveData();
|
-
|