|
发表于 2017-9-8 17:25:39
|
显示全部楼层
把加载数据放到onCustomRefresh中- Model.prototype.menuDataCustomRefresh = function(event){
- var menuData = this.comp("menuData");
- $.ajax({
- type: "GET",
- url: require.toUrl('./json/menu.json'),
- dataType: 'json',
- async: false,
- cache: false,
- success: function(data){
- menuData.loadData(data);
- },
- error: function(){
- throw justep.Error.create("加载数据失败");
- }
- });
- };
复制代码
|
|