|
本帖最后由 huayin 于 2016-10-16 17:20 编辑
Model.prototype.orderButClick = function(event){
var orderData = this.comp("orderData2");
var userData = this.comp("userData");
var content ="";
this.comp("cartData").each(function(options){
content = content = options.row.val("fMenuname") + "(" + options.row.val("fCount") + ")";
})
var row =event.bindingContext.$object;
orderData.newData({
index: 0,
defaultValues:[{
"ID": orderData.getID(),
"addtime": justep.Date.toString(new Date(), justep.Date.STANDART_FORMAT),
"ischeck": 1
}]
})
orderData.saveData({
onSuccess: function(){
justep.Util.hint("下单成功");
}
})
};
代码如上, 到这里 就是老卡在 getID 这里了, 我是新手,还望各位前辈多多指点
|
|