diff --git a/disconf-web/html/assets/css/project.css b/disconf-web/html/assets/css/project.css index 031d77e16..2cbf3f4b4 100644 --- a/disconf-web/html/assets/css/project.css +++ b/disconf-web/html/assets/css/project.css @@ -276,7 +276,8 @@ th { .startActivity-form-value { width: 500px; height: 30px; - border: 1px solid #D6D6D6 border-radius : 5 px; + border: 1px solid #D6D6D6; + border-radius: 5px; } .startActivity-form-value-small { @@ -352,7 +353,8 @@ th { .ticketDiscount-form-value { width: 500px; height: 30px; - border: 1px solid #D6D6D6 border-radius : 5 px; + border: 1px solid #D6D6D6; + border-radius: 5px; } .ticketDiscount-form-textarea { @@ -533,7 +535,8 @@ input.regForm-item-value { input.question-form-value { width: 380px; height: 22px; - border: 1px solid #D6D6D6 border-radius : 5 px; + border: 1px solid #D6D6D6; + border-radius: 5px; vertical-align: middle; margin-bottom: 0px; border-radius: 0 4px 4px 0; @@ -714,7 +717,8 @@ input.autoPush-detail-item-input { .register-item-value { width: 200px; height: 30px; - border: 1px solid #D6D6D6 border-radius : 5 px; + border: 1px solid #D6D6D6; + border-radius: 5px; } .register-item-value-area { @@ -986,13 +990,15 @@ q:before, q:after { .private-item-value { width: 300px; height: 30px; - border: 1px solid #D6D6D6 border-radius : 5 px; + border: 1px solid #D6D6D6; + border-radius: 5px; text-align: left; vertical-align: middle; } .private-item-value-pre { - border: 1px solid #D6D6D6 border-radius : 5 px; + border: 1px solid #D6D6D6; + border-radius: 5px; text-align: left; vertical-align: middle; } diff --git a/disconf-web/html/assets/js/modify_password.js b/disconf-web/html/assets/js/modify_password.js index 57db832a9..6cb149f7c 100644 --- a/disconf-web/html/assets/js/modify_password.js +++ b/disconf-web/html/assets/js/modify_password.js @@ -13,9 +13,16 @@ $("#item_submit").on("click", function (e) { // 验证 if (!old_password || !new_password || !new_password_2) { $("#error").removeClass("hide"); - $("#error").html("表单不能为空或填写格式错误!"); + $("#error").html("修改密码失败, 表单不能为空或填写格式错误!"); return; } + + if (new_password != new_password_2) { + $("#error").removeClass("hide"); + $("#error").html("修改密码失败, 两次输入的密码不一致!"); + return; + } + $.ajax({ type: "PUT", url: "/api/account/password", @@ -25,9 +32,9 @@ $("#item_submit").on("click", function (e) { "new_password_2": new_password_2 } }).done(function (data) { - $("#error").removeClass("hide"); if (data.success === "true") { - $("#error").html(data.result); + alert(data.result); + window.location.href = "/login.html"; } else { Util.input.whiteError($("#error"), data); } diff --git a/disconf-web/html/assets/js/register.js b/disconf-web/html/assets/js/register.js new file mode 100644 index 000000000..7505890e5 --- /dev/null +++ b/disconf-web/html/assets/js/register.js @@ -0,0 +1,31 @@ +var appId = -1; +var envId = -1; +var version = ""; + +// 提交 +$("#item_submit").on("click", function (e) { + $("#error").addClass("hide"); + var user_name = $("#reg_user_name").val(); + var pwd = $("#reg_pwd").val(); + + // 验证 + if (!user_name || !pwd) { + $("#error").html("注册失败, 表单不能为空或填写格式错误!"); + return; + } + $.ajax({ + type: "PUT", + url: "/api/account/register", + data: { + "name": user_name, + "password": pwd + } + }).done(function (data) { + if (data.success === "true") { + alert(data.result); + window.location.href = "/login.html"; + } else { + $("#error").html(data.result); + } + }); +}); diff --git a/disconf-web/html/login.html b/disconf-web/html/login.html index 872703a24..0e96a963a 100644 --- a/disconf-web/html/login.html +++ b/disconf-web/html/login.html @@ -78,7 +78,11 @@
@@ -95,12 +99,12 @@