|
我在一个页面 上放了三个list,分别显示不同的data,每个list中都有image的列,list1和list2中的图片是读取的本地,list3中的图片是读的另一个表userdata中的字段,如果不加list3中的image获取方法的话,页面打开没问题,但是如果加上list3的image的bind-attr-src的话,页面就卡死了,需要差不多十秒才能加载出来数据,怎么回事啊?
js代码:- Model.prototype.modelParamsReceive = function(event) {
- var teamID = event.data.teamID;
- var fteamData = this.comp("fteamData");
- fteamData.setFilter("filter", "id = " + teamID);
- this.comp("list1").refresh();
- var steamData = this.comp("steamData");
- steamData.setFilter("filter", "parent = " + teamID);
- this.comp("list2").refresh();
- var relationData = this.comp("relationData");
- relationData.setFilter("filter", "branchID = " + teamID);
- this.comp("list3").refresh();
- };
- Model.prototype.showImg = function(parent, subnum) {
- if (parent === 0) {
- return "r/icon/home.jpg";
- }
- if (parent > 0) {
- return "r/icon/up.jpg";
- }
- if (subnum === 0) {
- return "r/icon/final.jpg";
- }
- if (subnum > 0) {
- return "r/icon/down.jpg";
- }
- };
- Model.prototype.showPhoto = function(userID) {
- this.comp("userData").refreshData();
- this.comp("userData").find([ "id" ], [ userID ])[0].val("photo");
- };
- Model.prototype.countSubnum = function(teamID) {
- this.comp("teamData").refreshData();
- return this.comp("teamData").find([ "parent" ], [ teamID ]).length;
- };
复制代码
|
-
|