|

楼主 |
发表于 2017-11-16 19:12:00
|
显示全部楼层
在timer案例上,动态创建timer中,添加如下ajax调用。你再添加一个子页,随便加个按钮。
Model.prototype.dtimerTimer = function(event) {
this.getDescrip(event);
this.comp('output1').set('value','------执行了'+event.times+'次------');
};
Model.prototype.getDescrip = function(event){
var desc = "erwerw323232";
$.ajax({
type : "get",
url : 'http://192.168.0.24:8080/WaterMIS_App/data',
dataType : "json",
async : true,
headers: {'Authorization': desc},
success : function(data) {
var aAA = "ajax json post success ";
},
error : function(msg) {
// alert("failed.");
}
});
};
|
|