You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
4.5 KiB

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="org.wdk.WDKConstant"%>
<%@ page import="org.wdk.WDKCore"%>
<%@ page import="org.wdk.WDK"%>
<%@ page import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String WDK_ROOT = WDKCore.WDK_ROOT;
SessionUser su = (SessionUser)WDK.getSessionUser(request, response);
WDK.writeSessionUser(out, su);
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<title>密码修改</title>
<base href="<%=basePath%>" target="_self">
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
<script type="text/javascript">
var param = $.getURLParam('param');
var jparam = $.str2json($.urlparam_decode(param));
var _account_uuid = jparam.queryParams.account_uuid;
var _user_uuid = jparam.queryParams.user_uuid;
$(function(){
//不可输入空格键:
$(".nospaceinside").on("keypress",removeAllBlank);
function removeAllBlank(e) {
if(e.keyCode == 32){
e.preventDefault();
}
}
});
//注册保存按钮事件
function opt_save(){
//验证
var isok = $("#edit_form").form('validate');
if (!isok) {
alert('尚有必填项未填或填写有误,请检查后提交');
return false;
}
var old_pwd = $('#old_pwd').val();
var new_pwd = $('#new_pwd').val();
var new_pwd_confirm = $('#new_pwd_confirm').val();
if(new_pwd != new_pwd_confirm) {
alert('两次输入的新密码不一致,请检查后提交');
return false;
}
$.wait_open();
$.cuajax({
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
,method:"post"
,timeout:WDK_Timeout
,data:{
_SRVNAME:'service.usr.account'
,_SRVMETHOD:'changePwdSelf'
,_DATA:$.json2str({
account_uuid:_account_uuid,
user_uuid:_user_uuid,
old_pwd: old_pwd,
new_pwd: new_pwd_confirm
})
}
,success:function(result) {
$.wait_close();
//返回值字符串转json
var jres = $.str2json(result);
if(jres.code=="1"){ //操作成功
alert(jres.desc);
$.closeWin();
}else{
alert(jres.desc);
}
}
,error:function(result){
$.wait_close();
alert('网络错误!result='+result);
}
});
}
//关闭当前页面
function opt_close() {
var wid = $.getURLParam("wid");
$.closeWin(wid);
}
</script>
</head>
<body class="easyui-layout win" data-options="fit:true">
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="height:50px;line-height:35px;">
<div class="page-toolbar">
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-save'" onclick="opt_save()">保存</a>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-close'" onclick="opt_close()">关闭</a>
</div>
</div>
<div data-options="region:'center',border:false,collapsed:false" >
<div class="edit-container-win1">
<form id="edit_form">
<input type="hidden" id="account_uuid">
<div class="row">
<div class="formgroup">
<label class="required">验证原密码</label>
<div>
<input type="password" class="easyui-validatebox nospaceinside nospaceinside" id="old_pwd" name="old_pwd" value="" data-options="required:true,tipPosition:'bottom'"/>
</div>
</div>
</div>
<div class="row">
<div class="formgroup">
<label class="required">新密码</label>
<div>
<input type="password" class="easyui-validatebox nospaceinside nospaceinside" id="new_pwd" name="new_pwd" value="" data-options="required:true,tipPosition:'bottom'"/>
</div>
</div>
</div>
<div class="row">
<div class="formgroup">
<label class="required">确认新密码</label>
<div>
<input type="password" class="easyui-validatebox nospaceinside nospaceinside" id="new_pwd_confirm" name="new_pwd_confirm" value="" data-options="required:true,tipPosition:'bottom'"/>
</div>
</div>
</div>
</form>
</div>
</div>
</body>
</html>