提交 04e1cfad 编写于 作者: doc_wei's avatar doc_wei

解决部分接口请求类型错误的问题

上级 48502cc2
......@@ -37,35 +37,35 @@ layui.config({
//桌面背景选择
$('.bgPicItem').on('click', function () {
var bgSrc = $(this).attr('picUrl');
AjaxPostUtil.request({url:reqBasePath + "sys025", params:{winBgPicUrl: bgSrc}, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "sys025", params: {winBgPicUrl: bgSrc}, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
$('.background-preview').css('background-image', 'url(' + bgSrc + ')');
winui.resetBg(bgSrc);
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
//桌面锁屏背景选择
// 桌面锁屏背景选择
$('.lockBgPicItem').on('click', function () {
var bgSrc = $(this).attr('picUrl');
AjaxPostUtil.request({url:reqBasePath + "sys026", params:{winLockBgPicUrl: bgSrc}, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "sys026", params: {winLockBgPicUrl: bgSrc}, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
$('.lockscreen-preview').css('background-image', 'url(' + bgSrc + ')');
winui.resetLockBg(bgSrc);
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
//颜色选择
// 颜色选择
$('.color-choose>div').on('click', function () {
var color = Number($(this)[0].classList[0].replace('theme-color-', ''));
AjaxPostUtil.request({url:reqBasePath + "sys024", params:{themeColor: color}, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "sys024", params: {themeColor: color}, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
winui.resetColor(color);
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
......@@ -132,12 +132,12 @@ layui.config({
});
}, 'click .bgPicItem1':function(index, row){
var bgSrc = row.picUrl;
AjaxPostUtil.request({url:reqBasePath + "sys025", params:{winBgPicUrl: bgSrc}, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "sys025", params: {winBgPicUrl: bgSrc}, type:'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
$('.background-preview').css('background-image', 'url(' + bgSrc + ')');
winui.resetBg(bgSrc);
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
......
......@@ -252,7 +252,7 @@ layui.config({
winui.lockScreen(function(password) {
if(!isNull(password)) {
var pJudge = false;
AjaxPostUtil.request({url: reqBasePath + "login008", params: {password: password}, type: 'json', callback: function(json) {
AjaxPostUtil.request({url: reqBasePath + "login008", params: {password: password}, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
pJudge = true;
}else{
......@@ -426,17 +426,17 @@ layui.config({
winui.lockScreen(function (password) {
if(!isNull(password)){
var pJudge = false;
AjaxPostUtil.request({url:reqBasePath + "login008", params:{password: password}, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "login008", params: {password: password}, type: 'json', method: "POST", callback: function(json){
if(json.returnCode == 0){
pJudge = true;
}else{
pJudge = false;
winui.window.msg(json.returnMessage, { shift: 6 });
winui.window.msg(json.returnMessage, {shift: 6});
}
}, async: false});
return pJudge;
}else{
winui.window.msg('请输入密码', { shift: 6 });
winui.window.msg('请输入密码', {shift: 6});
return false;
}
});
......
......@@ -36,19 +36,19 @@ layui.config({
newPassword: $("#newPassword").val(),
oldPassword: $("#oldPassword").val()
};
AjaxPostUtil.request({url:reqBasePath + "login007", params:params, type:'json', callback:function(json){
AjaxPostUtil.request({url: reqBasePath + "login007", params:params, type: 'json', method: "POST", callback: function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
}else{
winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
return false;
});
//取消
// 取消
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册