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

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

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