Skip to content

Commit

Permalink
完善校验逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed May 17, 2018
1 parent 282fd16 commit 865c130
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions resources/modules/verify-new-mobile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export default function verifyNewMobile(mobileVerified, $container, $mobile) {
if (!mobileVerified) {
return;
}

if (!$container) {
$container = $('.js-verify-code-from-group');
}
if (!$mobile) {
$mobile = $('.js-mobile');
}

var mobile = $mobile.val();
if (mobile) {
$container.hide();
}

$mobile.change(function () {
if ($mobile.val() === mobile) {
$container.hide();
} else {
$container.show();
}
});
}

0 comments on commit 865c130

Please sign in to comment.