Authored by zhangxiaoru

添加图形验证码

... ... @@ -14,6 +14,15 @@
<span id="area-code" class="area-code">{{areaCode}}</span>
<input id="phone-num" class="input phone-num" type="text" placeholder="手机号">
</div>
{{!--图片验证 start--}}
{{#if isWechatLogin}}
<div id="js-img-check">
<input type="hidden" name="captsrc" value="{{captsrc}}">
</div>
{{/if}}
{{!--图片验证 end--}}
<span id="btn-next" class="btn btn-next disable row">发送验证码</span>
{{#if isWechatLogin}}
... ...
... ... @@ -24,6 +24,17 @@ var requested = false;
require('../../common');
var ImgCheck = require('plugin/img-check');
var imgCheck = new ImgCheck('#js-img-check', {
useREM: {
rootFontSize: 40,
picWidth: 150
}
});
imgCheck.init();
function nextStep(url, mobileNo, areaCode) {
if (requested) {
return false;
... ... @@ -85,7 +96,8 @@ $btnNext.on('touchstart', function() {
openId = trim($openId.val()),
nickname = trim($nickname.val()),
sourceType = trim($sourceType.val()),
areaCode = $countrySelect.val();
areaCode = $countrySelect.val(),
verify = trim(imgCheck.getResults());
if ($btnNext.hasClass('disable')) {
return;
... ...