Commit 361cd587 by shz

修改前后台验证处理

parent 25a80714
@font-face { @font-face {
font-family: 'iconfont'; font-family: 'iconfont';
<<<<<<< HEAD
src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot'); src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot');
src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439179733_4587424.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439179733_4587424.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439179733_4587424.svg#iconfont') format('svg'); src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439179733_4587424.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439179733_4587424.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439179733_4587424.svg#iconfont') format('svg');
=======
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot');
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439002040_1403098.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439002040_1403098.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439002040_1403098.svg#iconfont') format('svg');
>>>>>>> remotes/origin/dev
/* IE9*/ /* IE9*/
/* iOS 4.1- */ /* iOS 4.1- */
...@@ -19,7 +14,6 @@ ...@@ -19,7 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
<<<<<<< HEAD
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -79,8 +73,6 @@ ...@@ -79,8 +73,6 @@
.modal .modal-dialog .modal-content .btn:focus { .modal .modal-dialog .modal-content .btn:focus {
outline: 0; outline: 0;
} }
=======
>>>>>>> remotes/origin/dev
html, html,
body { body {
width: 100%; width: 100%;
...@@ -94,13 +86,10 @@ body { ...@@ -94,13 +86,10 @@ body {
color: #707070; color: #707070;
background-color: #f9f9f9; background-color: #f9f9f9;
} }
<<<<<<< HEAD
body { body {
height: auto; height: auto;
padding-bottom: 45px; padding-bottom: 45px;
} }
=======
>>>>>>> remotes/origin/dev
.collect { .collect {
position: fixed; position: fixed;
top: 10px; top: 10px;
...@@ -174,16 +163,12 @@ body { ...@@ -174,16 +163,12 @@ body {
height: auto; height: auto;
padding: 10px; padding: 10px;
overflow: hidden; overflow: hidden;
<<<<<<< HEAD
position: relative; position: relative;
=======
>>>>>>> remotes/origin/dev
border-bottom: 1px solid #b7b7b7; border-bottom: 1px solid #b7b7b7;
} }
.detail_row p { .detail_row p {
margin-bottom: 0; margin-bottom: 0;
} }
<<<<<<< HEAD
.detail_row ul { .detail_row ul {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -240,14 +225,6 @@ body { ...@@ -240,14 +225,6 @@ body {
width: 100%; width: 100%;
height: auto; height: auto;
margin-top: 8px; margin-top: 8px;
=======
.detail_row .detail_title {
color: #000000;
}
.detail_row #wrapper {
width: 100%;
margin-top: 5px;
>>>>>>> remotes/origin/dev
overflow: hidden; overflow: hidden;
} }
.detail_row #wrapper #scroller { .detail_row #wrapper #scroller {
...@@ -283,7 +260,6 @@ body { ...@@ -283,7 +260,6 @@ body {
.detail_row #wrapper #scroller ul li:last-child { .detail_row #wrapper #scroller ul li:last-child {
margin-right: 0; margin-right: 0;
} }
<<<<<<< HEAD
.detail_row .map { .detail_row .map {
position: absolute; position: absolute;
top: 5px; top: 5px;
...@@ -299,46 +275,14 @@ body { ...@@ -299,46 +275,14 @@ body {
background-size: cover; background-size: cover;
-webkit-background-size: cover; -webkit-background-size: cover;
display: inline-block; display: inline-block;
=======
.detail_row ul {
margin-bottom: 0;
}
.detail_row ul li {
padding: 0;
}
.detail_row ul li .btn {
color: #ff0000;
border-color: #959595;
background-color: transparent;
}
.detail_row ul li.price span {
color: #000000;
}
.detail_row ul li.price span em {
font-style: normal;
}
.detail_row ul li.price span em:nth-child(1) {
color: #ff0000;
font-size: 16px;
font-weight: bold;
}
.detail_row ul li.price span em:nth-child(2) {
position: relative;
top: -5px;
font-size: 7px;
>>>>>>> remotes/origin/dev
} }
.detail_row .infoCont li span { .detail_row .infoCont li span {
color: #000000; color: #000000;
} }
.detail_row .recommendCont { .detail_row .recommendCont {
<<<<<<< HEAD
margin-top: 5px; margin-top: 5px;
overflow: hidden; overflow: hidden;
zoom: 1; zoom: 1;
=======
overflow: hidden;
>>>>>>> remotes/origin/dev
} }
.detail_row .recommendCont li { .detail_row .recommendCont li {
margin: 5px 0 0 15px; margin: 5px 0 0 15px;
...@@ -359,7 +303,6 @@ body { ...@@ -359,7 +303,6 @@ body {
-webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-right-radius: 5px;
} }
<<<<<<< HEAD
.detail_row .peopleCont li { .detail_row .peopleCont li {
width: 100%; width: 100%;
height: 60px; height: 60px;
...@@ -557,10 +500,4 @@ body { ...@@ -557,10 +500,4 @@ body {
} }
.modal #carousel_wrapper .indicators li.carousel_active { .modal #carousel_wrapper .indicators li.carousel_active {
opacity: 1; opacity: 1;
=======
.detail_row .single_omit {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
>>>>>>> remotes/origin/dev
} }
...@@ -92,6 +92,7 @@ body { ...@@ -92,6 +92,7 @@ body {
background: url("../img/formBg.jpg") no-repeat; background: url("../img/formBg.jpg") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
-webkit-background-size: 100% 100%; -webkit-background-size: 100% 100%;
padding: 0 25px;
} }
.container-fluid form h2 { .container-fluid form h2 {
margin: 20% 0; margin: 20% 0;
...@@ -100,32 +101,53 @@ body { ...@@ -100,32 +101,53 @@ body {
} }
.container-fluid form .has-feedback { .container-fluid form .has-feedback {
margin-bottom: 0; margin-bottom: 0;
background-color: #fff; background-color: #ffffff;
border: 1px solid #DED6D9; border: 1px solid #cfd0d0;
} }
.container-fluid form .has-feedback .form-control { .container-fluid form .has-feedback .form-control {
height: 60px; height: 60px;
color: #7d7d7d; color: #7d7d7d;
border: 0;
box-shadow: none; box-shadow: none;
-webkit-box-shadow: none; -webkit-box-shadow: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-webkit-appearance: none; -webkit-appearance: none;
} }
.container-fluid form .has-feedback .form-control::-webkit-input-placeholder { .container-fluid form .has-feedback .form-control::-webkit-input-placeholder {
color: #7d7d7d; color: #7d7d7d;
} }
.container-fluid form .has-feedback:first-of-type { .container-fluid form .has-feedback:first-of-type {
margin-bottom: -1px;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
-webkit-border-top-left-radius: 4px; -webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px; -webkit-border-top-right-radius: 4px;
margin-bottom: -1px; }
.container-fluid form .has-feedback:first-of-type .form-control {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
} }
.container-fluid form .has-feedback:last-of-type { .container-fluid form .has-feedback:last-of-type {
margin-top: -1px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px; -webkit-border-bottom-right-radius: 4px;
margin-top: -1px; }
.container-fluid form .has-feedback:last-of-type .form-control {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
} }
.container-fluid form .has-feedback.username .form-control-feedback { .container-fluid form .has-feedback.username .form-control-feedback {
width: 30px; width: 30px;
...@@ -146,15 +168,16 @@ body { ...@@ -146,15 +168,16 @@ body {
right: 15px; right: 15px;
} }
.container-fluid form .has-feedback.code .form-control { .container-fluid form .has-feedback.code .form-control {
width: 65%; width: 60%;
} }
.container-fluid form .has-feedback.code .form-control-feedback { .container-fluid form .has-feedback.code .form-control-feedback {
top: 4px; top: 6px;
right: 4px; right: 4px;
width: 30%; width: 35%;
height: 50px; height: 46px;
line-height: 50px; line-height: 46px;
color: #ffffff; color: #ffffff;
font-size: 16px;
background-color: #0bacd3; background-color: #0bacd3;
box-shadow: 0 2px 0 0 #088aa9; box-shadow: 0 2px 0 0 #088aa9;
-webkit-box-shadow: 0 2px 0 0 #088aa9; -webkit-box-shadow: 0 2px 0 0 #088aa9;
...@@ -170,7 +193,8 @@ body { ...@@ -170,7 +193,8 @@ body {
} }
.container-fluid form .btn { .container-fluid form .btn {
color: #ffffff; color: #ffffff;
margin: 10% 0 5%; margin: 12% 0 5%;
padding: 16px;
background-color: #008cd7; background-color: #008cd7;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
...@@ -183,6 +207,9 @@ body { ...@@ -183,6 +207,9 @@ body {
box-shadow: 0 2px 0 0 #117bb9; box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9; -webkit-box-shadow: 0 2px 0 0 #117bb9;
} }
.container-fluid form .btn.btn-register {
margin-top: 20%;
}
.container-fluid form a { .container-fluid form a {
display: block; display: block;
color: #ffffff; color: #ffffff;
...@@ -196,9 +223,6 @@ body { ...@@ -196,9 +223,6 @@ body {
margin: 0 5px; margin: 0 5px;
background-color: rgba(255, 255, 255, 0.4); background-color: rgba(255, 255, 255, 0.4);
} }
.container-fluid form a:active {
color: ;
}
.container-fluid form a:hover { .container-fluid form a:hover {
text-decoration: none; text-decoration: none;
} }
......
@font-face { @font-face {
font-family: 'iconfont'; font-family: 'iconfont';
<<<<<<< HEAD
src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot'); src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot');
src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439179733_4587424.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439179733_4587424.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439179733_4587424.svg#iconfont') format('svg'); src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439179733_4587424.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439179733_4587424.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439179733_4587424.svg#iconfont') format('svg');
=======
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot');
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439002040_1403098.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439002040_1403098.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439002040_1403098.svg#iconfont') format('svg');
>>>>>>> remotes/origin/dev
/* IE9*/ /* IE9*/
/* iOS 4.1- */ /* iOS 4.1- */
...@@ -19,7 +14,6 @@ ...@@ -19,7 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
<<<<<<< HEAD
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -79,8 +73,6 @@ ...@@ -79,8 +73,6 @@
.modal .modal-dialog .modal-content .btn:focus { .modal .modal-dialog .modal-content .btn:focus {
outline: 0; outline: 0;
} }
=======
>>>>>>> remotes/origin/dev
html, html,
body { body {
width: 100%; width: 100%;
...@@ -149,10 +141,6 @@ body { ...@@ -149,10 +141,6 @@ body {
} }
.search .btn-group .dropdown-menu a.active { .search .btn-group .dropdown-menu a.active {
color: #008cd7; color: #008cd7;
<<<<<<< HEAD
=======
border-bottom-color: #008cd7;
>>>>>>> remotes/origin/dev
} }
.search .btn-group .dropdown-menu .left-menu { .search .btn-group .dropdown-menu .left-menu {
height: 100%; height: 100%;
...@@ -201,10 +189,7 @@ body { ...@@ -201,10 +189,7 @@ body {
-webkit-border-bottom-right-radius: 4px; -webkit-border-bottom-right-radius: 4px;
box-shadow: 0 2px 0 0 #088aa9; box-shadow: 0 2px 0 0 #088aa9;
-webkit-box-shadow: 0 2px 0 0 #088aa9; -webkit-box-shadow: 0 2px 0 0 #088aa9;
<<<<<<< HEAD
pointer-events: auto; pointer-events: auto;
=======
>>>>>>> remotes/origin/dev
} }
.btn-group-justified { .btn-group-justified {
width: 100%; width: 100%;
...@@ -262,10 +247,6 @@ body { ...@@ -262,10 +247,6 @@ body {
} }
.btn-group-justified .btn-group .dropdown-menu a.active { .btn-group-justified .btn-group .dropdown-menu a.active {
color: #008cd7; color: #008cd7;
<<<<<<< HEAD
=======
border-bottom-color: #008cd7;
>>>>>>> remotes/origin/dev
} }
.btn-group-justified .btn-group .dropdown-menu .left-menu { .btn-group-justified .btn-group .dropdown-menu .left-menu {
height: 100%; height: 100%;
...@@ -302,11 +283,7 @@ body { ...@@ -302,11 +283,7 @@ body {
overflow: hidden; overflow: hidden;
} }
#wrapper #scroller { #wrapper #scroller {
<<<<<<< HEAD
padding-bottom: 45px; padding-bottom: 45px;
=======
padding-bottom: 40px;
>>>>>>> remotes/origin/dev
} }
#wrapper #scroller div { #wrapper #scroller div {
width: 100%; width: 100%;
...@@ -324,7 +301,6 @@ body { ...@@ -324,7 +301,6 @@ body {
} }
#wrapper #scroller div p img { #wrapper #scroller div p img {
height: 100%; height: 100%;
<<<<<<< HEAD
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-top-right-radius: 5px; border-top-right-radius: 5px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
...@@ -333,16 +309,6 @@ body { ...@@ -333,16 +309,6 @@ body {
-webkit-border-top-right-radius: 5px; -webkit-border-top-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-right-radius: 5px;
=======
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
>>>>>>> remotes/origin/dev
} }
#wrapper #scroller div ul { #wrapper #scroller div ul {
height: 100%; height: 100%;
...@@ -360,25 +326,17 @@ body { ...@@ -360,25 +326,17 @@ body {
white-space: nowrap; white-space: nowrap;
} }
#wrapper #scroller div ul li.multiLine_omit { #wrapper #scroller div ul li.multiLine_omit {
<<<<<<< HEAD
color: #000000; color: #000000;
font-weight: bold; font-weight: bold;
=======
>>>>>>> remotes/origin/dev
height: 36px; height: 36px;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
white-space: normal; white-space: normal;
} }
<<<<<<< HEAD
#wrapper #scroller div ul li .address { #wrapper #scroller div ul li .address {
color: #000000; color: #000000;
font-size: 22px; font-size: 22px;
=======
#wrapper #scroller div ul li:first-child {
color: #000000;
>>>>>>> remotes/origin/dev
font-weight: bold; font-weight: bold;
} }
#wrapper #scroller div ul li:last-child { #wrapper #scroller div ul li:last-child {
...@@ -389,24 +347,10 @@ body { ...@@ -389,24 +347,10 @@ body {
} }
#wrapper #scroller div ul li:last-child .label { #wrapper #scroller div ul li:last-child .label {
color: #ff0000; color: #ff0000;
<<<<<<< HEAD
font-size: 9px; font-size: 9px;
padding: 0 3px; padding: 0 3px;
border: 1px solid #acacac; border: 1px solid #acacac;
vertical-align: bottom; vertical-align: bottom;
=======
font-size: 7px;
padding: 0 3px;
border: 1px solid #acacac;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
-webkit-border-top-left-radius: 2px;
-webkit-border-top-right-radius: 2px;
-webkit-border-bottom-left-radius: 2px;
-webkit-border-bottom-right-radius: 2px;
>>>>>>> remotes/origin/dev
} }
#wrapper #scroller div ul li:last-child span { #wrapper #scroller div ul li:last-child span {
color: #000000; color: #000000;
...@@ -416,7 +360,6 @@ body { ...@@ -416,7 +360,6 @@ body {
} }
#wrapper #scroller div ul li:last-child span em:nth-child(1) { #wrapper #scroller div ul li:last-child span em:nth-child(1) {
color: #ff0000; color: #ff0000;
<<<<<<< HEAD
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
} }
...@@ -428,20 +371,6 @@ body { ...@@ -428,20 +371,6 @@ body {
width: 100%; width: 100%;
height: 45px; height: 45px;
line-height: 45px; line-height: 45px;
=======
font-size: 16px;
font-weight: bold;
}
#wrapper #scroller div ul li:last-child span em:nth-child(2) {
position: relative;
top: -5px;
font-size: 7px;
}
.footer {
width: 100%;
height: 40px;
line-height: 40px;
>>>>>>> remotes/origin/dev
color: #008cd7; color: #008cd7;
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
......
...@@ -12,9 +12,9 @@ if (is_user_logged_in()) { ...@@ -12,9 +12,9 @@ if (is_user_logged_in()) {
$phone = $_POST['phone']; $phone = $_POST['phone'];
$password = $_POST['password']; $password = $_POST['password'];
if (!$phone) { if (!$phone) {
$context['phoneError'] = '请输入用户名'; $context['error'] = '请输入用户名';
} else if (!$password) { } else if (!$password) {
$context['passwordError'] = '请输入密码'; $context['error'] = '请输入密码';
} else { } else {
if (strlen($phone) != 11) { if (strlen($phone) != 11) {
$response = wp_remote_post('http://218.1.67.130:8988/api/NanTongWechat/LoginWechat' . $response = wp_remote_post('http://218.1.67.130:8988/api/NanTongWechat/LoginWechat' .
...@@ -33,9 +33,9 @@ if (is_user_logged_in()) { ...@@ -33,9 +33,9 @@ if (is_user_logged_in()) {
if (!is_wp_error($user)) { if (!is_wp_error($user)) {
wp_redirect($const_my_page); wp_redirect($const_my_page);
} else if ($user->get_error_code() == 'invalid_username') { } else if ($user->get_error_code() == 'invalid_username') {
$context['phoneError'] = '请输入有效的用户名'; $context['error'] = '请输入有效的用户名';
} else if ($user->get_error_code() == 'incorrect_password') { } else if ($user->get_error_code() == 'incorrect_password') {
$context['passwordError'] = '您输入的密码无效'; $context['error'] = '您输入的密码无效';
} }
} }
} }
......
<?php <?php
require_once('const.php');
$context = array(); $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
$context['url'] = home_url(); $context['url'] = home_url();
...@@ -8,11 +9,11 @@ if ($_POST) { ...@@ -8,11 +9,11 @@ if ($_POST) {
$code = $_POST['code']; $code = $_POST['code'];
$password = $_POST['password']; $password = $_POST['password'];
if (!$phone) { if (!$phone) {
$context['phoneError'] = '请输入11位手机号'; $context['error'] = '请输入11位手机号';
} else if (!$code) { } else if (!$code) {
$context['codeError'] = '请输入验证码'; $context['error'] = '请输入验证码';
} else if (!$password) { } else if (!$password) {
$context['passwordError'] = '请输入密码'; $context['error'] = '请输入密码';
} else { } else {
$search_code = dao::search_tospur_verify($phone, $code); $search_code = dao::search_tospur_verify($phone, $code);
if ($code == $search_code) { if ($code == $search_code) {
...@@ -22,16 +23,15 @@ if ($_POST) { ...@@ -22,16 +23,15 @@ if ($_POST) {
$creds['user_login'] = $phone; $creds['user_login'] = $phone;
$creds['user_password'] = $password; $creds['user_password'] = $password;
$creds['remember'] = true; $creds['remember'] = true;
echo '注册成功';
$user = wp_signon($creds, false); $user = wp_signon($creds, false);
if (!is_wp_error($user)) { if (!is_wp_error($user)) {
echo '自动登录,跳转页面'; wp_redirect($const_my_page);
} }
} else { } else {
$context['phoneError'] = '抱歉,用户名已存在'; $context['error'] = '抱歉,用户名已存在';
} }
} else { } else {
$context['codeError'] = '请输入正确的验证码'; $context['error'] = '请输入正确的验证码';
} }
} }
} }
......
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
myModal.on('hide.bs.modal',function(){ myModal.on('hide.bs.modal',function(){
notice.children().remove(); notice.children().remove();
}); });
{% if(error) %}
notice.html('<span>{{ error }}</span>');
myModal.modal('show');
{% endif %}
}); });
</script> </script>
</head> </head>
......
...@@ -50,6 +50,10 @@ ...@@ -50,6 +50,10 @@
notice.children().remove(); notice.children().remove();
}); });
sendCodeBindClick("{{ url }}", 0); sendCodeBindClick("{{ url }}", 0);
{% if(error) %}
notice.html('<span>{{ error }}</span>');
myModal.modal('show');
{% endif %}
}); });
</script> </script>
</head> </head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment