|
登陆进去了就是改密码的时候返回的错误信息还是这个,我还是不明白这个问题在哪
function fnLogin(){
var username = $api.byId("username");
var password = $api.byId("password");
var vusername = $api.val(username);
var vpassword = $api.val(password);
var user = api.require("user");
user.login
user.login({
username: vusername,
password: vpassword
},function(ret,err){
if (ret) {
$api.setStorage('userInfo', ret);
api.openWin({
name: 'index',
url: '../index.html'
});
}
});
// var now = Date.now();
// var appKey = SHA1("A6073756294922"+"UZ"+"C7C30A67-4AA6-4A79-1D8A-2A5910E77791"+"UZ"+now)+"."+now;
// api.ajax({
// url: 'https://d.apicloud.com/mcm/api/user/login',
// method: 'post',
// headers: {
// "X-APICloud-AppId": "A6073756294922",
// "X-APICloud-AppKey": appKey
// },
// data: {
// values: {
// username: vusername,
// password: vpassword
// }
// }
// },
// function(ret,err){
// if (ret && ret.userId) {
// $api.setStorage('userInfo', ret);
// var model = api.require("model");
// model.insert
// model.insert({
// class: '',
// value: valueJson
// },function(ret,err){
//
// });
//
// api.openWin({
// name: 'index',
// url: '../index.html',
// pageParam: {
// username: vusername
// }
// });
//
//
// } else {
// api.toast({
// msg: '登录错误',
// duration: 2000,
// location: 'bottom'
// });
//
// }
// });
} |
|