|
楼主 |
发表于 2016-8-26 23:19:55
|
显示全部楼层
显示params, success都没有定义,params, success怎么定义?
Model.prototype.loginClick = function(event){//登录
var self = this;
var userData = this.comp("userData");
if ( $.trim(this.comp('zhanghao').val()) === "" || $.trim(this.comp('mima').val()) === "") {
this.comp("messageDialog").show({
"title" : "提示",
"message" : "忘记输入账号或密码?"
});
}else{
var params = {
"zhanghao":this.comp('zhanghao').val(),
"mima":this.comp('mima').val()
};
var success = function(resultData) {
userData.loadData(resultData);
if (userData.val('zhanghao')&&userData.val('mima')) {
localStorage.setItem('zhanghao',userData.val('zhanghao'));
localStorage.setItem('mima',userData.val('mima'));
justep.Shell.showPage("app"); //登录成功,跳转到APP首页
}else{
self.comp("messageDialog").show({
"title" : "温馨提示",
"message" : "用户名或密码不正确!"
});
}
};
}
};
Model.prototype.userDataCustomRefresh = function(event){
Baas.sendRequest({
"url" : "/gongzuoshi/x8", // servlet请求地址
"action" : "queryX8_user", // action
"params" : params, // action对应的参数
"success" : success // 请求成功后的回调方法
});
}; |
|