2018-06-07 00:45:47 +08:00
|
|
|
|
$(function () {
|
|
|
|
|
$(".container").autoCenter();
|
2018-08-26 17:14:39 +08:00
|
|
|
|
|
|
|
|
|
$("a[data-method]").on('click', function () {
|
|
|
|
|
var $this = $(this);
|
|
|
|
|
switch ($this.attr("data-method")) {
|
|
|
|
|
case "register":
|
|
|
|
|
$("#dialogNew").modal('show');
|
|
|
|
|
break;
|
|
|
|
|
case "forgot":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#btnSubmit').on('click', function () {
|
|
|
|
|
$.bc({
|
2018-09-13 16:34:32 +08:00
|
|
|
|
url: "api/New/",
|
2018-08-26 17:14:39 +08:00
|
|
|
|
data: { UserName: $('#userName').val(), Password: $('#password').val(), DisplayName: $('#displayName').val(), Description: $('#description').val() },
|
|
|
|
|
modal: '#dialogNew',
|
2018-09-09 13:19:05 +08:00
|
|
|
|
method: "post",
|
2018-08-26 17:14:39 +08:00
|
|
|
|
callback: function (result) {
|
|
|
|
|
var title = result ? "提交成功<br/>等待管理员审批" : "提交失败";
|
|
|
|
|
swal({ html: true, showConfirmButton: false, showCancelButton: false, timer: 1500, title: title, type: result ? "success" : "error" });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2016-10-20 17:55:29 +08:00
|
|
|
|
})
|