|
Model.prototype.MessageDataCustomRefresh = function(event){
var MessageData = event.source;
$.ajax({
type: "GET",
url: require.toUrl('$UI/wy5188/wymaster/framework/json/dbMsgNotice.json'),
dataType: 'json',
async: false,//使用同步方式,目前data组件有同步依赖 二级
cache: false,
success: function(data){
MessageData.loadData(data);//将返回的数据加载到data组件
console.log(data);
},
error: function(){
alert("加载数据失败");
}
});
};
{"rows":[
{"id":"0001","data":{"content":"我要换灯泡43432","time":"2015-11-22 13:57:27","ordersn":"20151155421102","address":"西乡大道新源花园二楼201房 3343","usersn":"U990319163"},"type":"POSTORDER","publishto":"WORKER"},
{"id":"0002","data":{"content":"我要换灯泡43432","time":"2015-11-22 14:15:08","ordersn":"20151155421102","workersn":"W1139421933","usersn":"U990319163"},"type":"GRABORDER","publishto":"USER"}
]}
这样不能将data里面的数据添加到w文件,要想将data里面的数据显示出来怎么做,json不能变 |
|