|
楼主 |
发表于 2016-8-18 16:40:13
|
显示全部楼层
Model.prototype.getGiGoods = function(goodsId){
//加载商品数据
var goodsData = this.comp('goodsData');
//justep.Util.hint("goodsId:" + this.goodsId);
var id = goodsId; // this.getElementByXid('startDate').value;
var params = {};
if (id) {
params = {
id : id
};
}
justep.Baas.sendRequest({
"url" : "/sanco/clanec",
"action" : "getGiGoods",
"async" : false,
"params" : params,
"success" : function(ret) {
goodsData.loadData(ret);
//justep.Util.hint("goodsDataCustomRefresh装载成功");
}
});
var content="";
goodsData.each(function(options) {
var row = options.row;
content = content + row.val("postage") + "," + row.val("price");
});
justep.Util.hint("返回:"+content);
if (data.getCount() === 1) {
justep.Util.hint("返回1条数据");
}
};
运行结果: 提示"返回1条数据" |
|