让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:空间域名、网页空间、营销软件、网站建设、昂昂溪网站维护、网站推广。
$("#confirmDealDelete").click(function(){
$("#deleteForm").show();
$("#modal-result").hide();
varv_id='${ClientForm.id}';
varv_advancedPassword=$("#advancedPassword").val();
varv_reAdvancedPassword=$("#reAdvancedPassword").val();
if(v_advancedPassword != v_reAdvancedPassword){
$("#modal-result").html("高级密码不一致");
$("#modal-result").show();
return false;
}
marks();
$.ajax({
type:"POST",
url:"/client/deleteClient.json",
dataType:"json",
data: {client: v_id, advancedPassword: v_advancedPassword, reAdvancedPassword: v_reAdvancedPassword},
cache:false,
success:function(result) {
console.log(result.result);
unMarks();
$("#clientList").trigger("reloadGrid");
$("#details").html("");
if(result.result == undefined || result.result==false){
$("#modal-result").html("删除失败");
$("#modal-result").show();
}else{
$("#modal-result").html("删除成功");
$("#modal-result").show();
$("#deleteForm").hide();
}
},
error:function() {
unMarks();
$("#info").attr("class","info-error");
$("#info").html("Sorry,request error");
}
});
});
});
@RequestMapping(value ="/deleteClient.json", method = RequestMethod.POST, produces ="application/json")
@ResponseBody
publicJSONObject deleteClient(@RequestParam(value ="advancedPassword", required =false) String advancedPassword,
@RequestParam(value ="reAdvancedPassword", required =false) String reAdvancedPassword,
@RequestParam(value ="client", required =false)longclientId){
UserAccount userAccount=userAccountService.findUserAccountById(getUserIdBySpring());
JSONObject result=newJSONObject();
if(userAccount !=null&& userAccount.getId() >0&& userAccount.isActivated() && advancedPassword !=null
&& StringUtils.equals(advancedPassword,reAdvancedPassword)){
String md5=Md5Encrypt.md5(advancedPassword);
if(md5 !=null&& StringUtils.equals(md5,userAccount.getAdvancedPassword())){
clientService.deleteClientByUserId(clientId);
result.put("result",true);
}else{
result.put("result",false);
}
}else{
result.put("result",false);
}
returnresult;
}
functiongetAccountDetails(id) {
$.ajax({
type:"GET",
url:"/client/client-details",
data:{id:id},
timeout:50000,
cache:false,
success:function(result) {
$("#details").html(result);
mScroll("details");
unMarks();
} ,
error:function(){
$("#message").html("Request time out");
unMarks();
}
});
}
@RequestMapping(value ="/client-details",method = RequestMethod.GET)
publicString accountDetails(HttpServletRequest request,
ModelMap modelMap,
@RequestParam(value ="id",required =false,defaultValue ="0")longid) {
Client client=clientService.findClientById(id);
ClientForm form =domainToForm(client);
modelMap.addAttribute("ClientForm",form);
return"/client/clientDetail";
}
网页标题:ajaxdataType:"json",
文章分享:https://www.cdcxhl.com/article42/gcdsec.html
成都网站建设公司_创新互联,为您提供App设计、域名注册、电子商务、搜索引擎优化、微信公众号、定制网站
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联