Authored by whb

index css

@@ -3837,7 +3837,8 @@ define("js/passport/entry", ["jquery","jquery.placeholder"], function(require, e @@ -3837,7 +3837,8 @@ define("js/passport/entry", ["jquery","jquery.placeholder"], function(require, e
3837 require("js/passport/reg"); 3837 require("js/passport/reg");
3838 require("js/passport/back"); 3838 require("js/passport/back");
3839 require("js/passport/login"); 3839 require("js/passport/login");
3840 -require("js/passport/reset"); 3840 +require("js/passport/reset");
  3841 +require("js/passport/vertification");
3841 }); 3842 });
3842 define("js/passport/reg", ["jquery"], function(require, exports, module){ 3843 define("js/passport/reg", ["jquery"], function(require, exports, module){
3843 /* 3844 /*
@@ -5345,3 +5346,106 @@ $('#pwd, #repwd').keydown(function(e) { @@ -5345,3 +5346,106 @@ $('#pwd, #repwd').keydown(function(e) {
5345 }); 5346 });
5346 5347
5347 }); 5348 });
  5349 +define("js/passport/vertification", ["jquery"], function(require, exports, module){
  5350 +/**
  5351 + * 验证手机
  5352 + * @author: xuqi<qi.xu@yoho.cn>
  5353 + * @date: 2015/12/14
  5354 + */
  5355 +
  5356 +var $ = require("jquery");
  5357 +
  5358 +var $sc = $('#send-captcha'),
  5359 + $msgTip = $('#captcha-tip'),
  5360 + $errTip = $('#err-tip'),
  5361 + $next = $('#next-step'),
  5362 + seconds,
  5363 + itime;
  5364 +
  5365 +$sc.click(function() {
  5366 + $.post('/passport/register/authcode', {
  5367 + mobile: $('#mobile').val(),
  5368 + area: $('#area').val(),
  5369 + captcha: $('#captchaPic').val(),
  5370 + project: 'repassword'
  5371 + }, function(jsonData) {
  5372 + if (jsonData.code === 200) {
  5373 + $errTip.hide();
  5374 + if ($(this).hasClass('disable')) {
  5375 + return;
  5376 + }
  5377 + seconds = 60;
  5378 +
  5379 + //$sc.addClass('disable').prop('disabled', true);
  5380 + $sc.addClass('disable').attr('disabled', true);
  5381 + $msgTip.removeClass('hide');
  5382 +
  5383 + $sc.val(seconds-- + '秒后可重新操作');
  5384 + itime = setInterval(function() {
  5385 + if (seconds === 0) {
  5386 + clearInterval(itime);
  5387 +
  5388 + //$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
  5389 + $sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
  5390 + } else {
  5391 + $sc.val(seconds-- + '秒后可重新操作');
  5392 + }
  5393 + }, 1000);
  5394 + } else {
  5395 + $(this).addClass('error');
  5396 + $errTip.removeClass('hide').text('发送失败');
  5397 + }
  5398 + });
  5399 +});
  5400 +
  5401 +if ($(this).hasClass('disable')) {
  5402 + return;
  5403 +}
  5404 +seconds = 60;
  5405 +
  5406 +//$sc.addClass('disable').prop('disabled', true);
  5407 +$sc.addClass('disable').attr('disabled', true);
  5408 +$msgTip.removeClass('hide');
  5409 +
  5410 +$sc.val(seconds-- + '秒后可重新操作');
  5411 +itime = setInterval(function() {
  5412 + if (seconds === 0) {
  5413 + clearInterval(itime);
  5414 +
  5415 + //$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
  5416 + $sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
  5417 + } else {
  5418 + $sc.val(seconds-- + '秒后可重新操作');
  5419 + }
  5420 +}, 1000);
  5421 +
  5422 +
  5423 +$('#captcha').keyup(function() {
  5424 + var v = $.trim($(this).val());
  5425 +
  5426 + if (v !== '') {
  5427 +
  5428 + //添加验证码正确验证
  5429 + //$next.removeClass('disable').prop('disabled', false);
  5430 + $next.removeClass('disable').removeAttr('disabled');
  5431 + } else {
  5432 +
  5433 + //$next.addClass('disable').prop('disabled', true);
  5434 + $next.addClass('disable').attr('disabled', true);
  5435 + }
  5436 +}).blur(function() {
  5437 + var v = $.trim($(this).val());
  5438 +
  5439 + if (v === '') {
  5440 +
  5441 + //添加验证码正确验证
  5442 + $(this).addClass('error');
  5443 + $errTip.removeClass('hide');
  5444 + } else {
  5445 + $(this).removeClass('error');
  5446 + $errTip.addClass('hide');
  5447 + }
  5448 +}).focus(function() {
  5449 + $(this).removeClass('error');
  5450 +});
  5451 +});
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -95,20 +95,20 @@ function getShoppingKey() { @@ -95,20 +95,20 @@ function getShoppingKey() {
95 } 95 }
96 96
97 //YAS统计代码 97 //YAS统计代码
98 -(function(w, d, s, j, f) {  
99 - var a = d.createElement(s);  
100 - var m = d.getElementsByTagName(s)[0];  
101 -  
102 - w.YohoAcquisitionObject = f;  
103 -  
104 - w[f] = function() {  
105 - w[f].p = arguments;  
106 - };  
107 -  
108 - a.async = 1;  
109 - a.src = j;  
110 - m.parentNode.insertBefore(a, m);  
111 -})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas'); 98 +//(function(w, d, s, j, f) {
  99 +// var a = d.createElement(s);
  100 +// var m = d.getElementsByTagName(s)[0];
  101 +//
  102 +// w.YohoAcquisitionObject = f;
  103 +//
  104 +// w[f] = function() {
  105 +// w[f].p = arguments;
  106 +// };
  107 +//
  108 +// a.async = 1;
  109 +// a.src = j;
  110 +// m.parentNode.insertBefore(a, m);
  111 +//})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
112 112
113 (function() { 113 (function() {
114 var uid = getUid(); 114 var uid = getUid();
@@ -5,4 +5,5 @@ @@ -5,4 +5,5 @@
5 require('./reg'); 5 require('./reg');
6 require('./back'); 6 require('./back');
7 require('./login'); 7 require('./login');
8 -require('./reset');  
  8 +require('./reset');
  9 +require('./vertification');
@@ -89,10 +89,10 @@ class Bootstrap extends Bootstrap_Abstract @@ -89,10 +89,10 @@ class Bootstrap extends Bootstrap_Abstract
89 $module = 'Product'; 89 $module = 'Product';
90 $url = strtolower($dispatcher->getRequest()->getRequestUri()); 90 $url = strtolower($dispatcher->getRequest()->getRequestUri());
91 //list列表的index 91 //list列表的index
92 - if(empty($url) || $url == '/index') {  
93 - $listRequest = new Yaf\Request\Http('/product/list/index');  
94 - $dispatcher->setRequest($listRequest);  
95 - } 92 + if(empty($url) || $url == '/index' || $url == '/') {
  93 + $listRequest = new Yaf\Request\Http('/product/list/index');
  94 + $dispatcher->setRequest($listRequest);
  95 + }
96 break; 96 break;
97 case 'sale'://促销 97 case 'sale'://促销
98 $module = 'Product'; 98 $module = 'Product';