Skip to content

Commit

Permalink
用户信息增加昵称、修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Humsen committed Nov 8, 2017
1 parent b697290 commit ec1d609
Show file tree
Hide file tree
Showing 25 changed files with 442 additions and 357 deletions.
10 changes: 6 additions & 4 deletions WebContent/js/contact/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ function contactFormValidate() {
notEmpty : {
message : '邮箱为必填哦!'
},
emailAddress : {
message : '输入邮件地址无效!'
regexp : {
regexp : /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
message : '邮箱格式不正确'
}
}
},
Expand Down Expand Up @@ -78,6 +79,7 @@ function sendEmailClick() {
// 进行表单验证
var $formContactAdmin = $('#form_contactAdmin').data('bootstrapValidator');
$formContactAdmin.validate();

if ($formContactAdmin.isValid()) {
// 发送ajax请求
$.ajax({
Expand All @@ -89,8 +91,8 @@ function sendEmailClick() {
if(result == 1){
$.confirm({
title: '发送成功',
content: textStatus + ' : ' + XMLHttpRequest.status,
autoClose: 'ok|1000',
content: '您的邮箱已经发送到站长邮箱,感谢您的支持!',
autoClose: 'ok|5000',
type: 'green',
buttons: {
ok: {
Expand Down
13 changes: 6 additions & 7 deletions WebContent/js/login/formvalidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function submitLoginForm() {

if ($loginValidate.isValid()) {
$.ajax({
url : '/userinfo.hms',
url : '/userInfo.hms',
async : false,// 同步,会阻塞操作
type : 'POST',// PUT DELETE POST
data : {
Expand Down Expand Up @@ -480,7 +480,7 @@ function submitRegisterForm() {
// 注册发送验证码
$.ajax({
url : '/userInfo/code.hms',
async : false,// 同步,会阻塞操作
async : true,// 同步,会阻塞操作
type : 'POST',// PUT DELETE POST
data : {
type : 'send_code_register',
Expand Down Expand Up @@ -544,15 +544,14 @@ function submitRegisterForm() {
// 注册校验验证码
$.ajax({
url : '/userInfo/code.hms',
async : false,// 同步,会阻塞操作
async : true,// 同步,会阻塞操作
type : 'POST',// PUT DELETE POST
data : {
type : 'auth_code_register',
randomCode : $('#txt_validateCode').val(),
},
success : function(response) {
if (response != 0) {
// $('#register').modal('show');
if (response == 1) {
// 发送注册信息
sendRegisterInfo();
} else {
Expand Down Expand Up @@ -617,7 +616,7 @@ function sendRegisterInfo() {
type : 'POST',// PUT DELETE POST
data : registerInfo2Json(),
success : function(result) {
if (result != 0) {
if (result == 1) {
$.confirm({
title : '注册成功',
content : '注册成功',
Expand Down Expand Up @@ -672,7 +671,7 @@ function sendRegisterInfo() {
function registerInfo2Json() {
var newUserInfo = {};

newUserInfo.type = 'register_user_info';
newUserInfo.type = 'create_user_info';
newUserInfo.userName = $('#txt_userNameRegister').val();
newUserInfo.password = $('#txt_userPwdRegister').val()
newUserInfo.email = $('#txt_userEmailRegister').val();
Expand Down
Loading

0 comments on commit ec1d609

Please sign in to comment.