发布网友 发布时间:2022-05-15 09:45
共1个回答
热心网友 时间:2023-10-18 15:36
给你发个例子app.post是封装的ajax 不过参数都一样
app.post(loginurl, {values: {username: username, password: password,deviceid:api.deviceId}}, function (ret) {
if (ret.status == 1) {
api.hideProgress();
var UserInfo =ret.data;
app.setStorage("UserInfo", UserInfo);
api.execScript({
name: 'root',
script: 'window.location.reload();'
});
app.setFrameGroupIndex("main", 0);
api.closeFrame();
app.msg(ret.msg);
} else {
api.hideProgress();
app.msg(ret.msg);
}
}, 'json');