Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
10 changed files
with
124 additions
and
97 deletions
@@ -102,15 +102,15 @@ class HelperSearch | @@ -102,15 +102,15 @@ class HelperSearch | ||
102 | $result['opts']['pageCount'] = $data['product']['page_total']; | 102 | $result['opts']['pageCount'] = $data['product']['page_total']; |
103 | $result['opts']['nextHref'] = ($next = self::next($data['product']['page_total'],$data['product']['filter'])) ? $next['href'] : ''; | 103 | $result['opts']['nextHref'] = ($next = self::next($data['product']['page_total'],$data['product']['filter'])) ? $next['href'] : ''; |
104 | $result['hasNextPage'] = self::next($data['product']['page_total']); | 104 | $result['hasNextPage'] = self::next($data['product']['page_total']); |
105 | + //全部折扣 | ||
106 | + $result['leftContent'][]['allDiscount'] = isset($data['discount']) ? self::getDiscount($data['discount']['discount']) : array(); | ||
105 | //分类条件 | 107 | //分类条件 |
106 | $result['filters']['sort'] = isset($data['sort']) ? self::searchSort($data['sort']['sort']) : array(); | 108 | $result['filters']['sort'] = isset($data['sort']) ? self::searchSort($data['sort']['sort']) : array(); |
107 | //左侧分类分类 | 109 | //左侧分类分类 |
108 | $result['leftContent'][]['allSort'] = isset($data['sort']) ? self::groupSort($data['sort']['sort']) : array(); | 110 | $result['leftContent'][]['allSort'] = isset($data['sort']) ? self::groupSort($data['sort']['sort']) : array(); |
109 | //一周新品上架 | 111 | //一周新品上架 |
110 | $result['leftContent'][]['newSales'] = isset($data['recent']) ? self::recentShelve($data['recent']['recent']) : array(); | 112 | $result['leftContent'][]['newSales'] = isset($data['recent']) ? self::recentShelve($data['recent']['recent']) : array(); |
111 | - //全部折扣 | ||
112 | - $result['leftContent'][]['allDiscount'] = isset($data['discount']) ? self::getDiscount($data['discount']['discount']) : array(); | ||
113 | - //总记录数 | 113 | + //总记录数 |
114 | $result['totalCount'] = $data['product']['total']; | 114 | $result['totalCount'] = $data['product']['total']; |
115 | //品牌店铺信息 | 115 | //品牌店铺信息 |
116 | $result['shopEntry'] = isset($data['shop']) && !empty($data['shop']) ? self::shop($data['shop'], $data['sort']['sort']) : array(); | 116 | $result['shopEntry'] = isset($data['shop']) && !empty($data['shop']) ? self::shop($data['shop'], $data['sort']['sort']) : array(); |
@@ -86,6 +86,7 @@ $('.invoice').on('touchend', '.checkbox', function() { | @@ -86,6 +86,7 @@ $('.invoice').on('touchend', '.checkbox', function() { | ||
86 | if ($this.hasClass('icon-checkbox')) { | 86 | if ($this.hasClass('icon-checkbox')) { |
87 | $('.invoice').removeClass('focus'); | 87 | $('.invoice').removeClass('focus'); |
88 | } | 88 | } |
89 | + return false; | ||
89 | }); | 90 | }); |
90 | 91 | ||
91 | function orderCompute(firstEnter) { | 92 | function orderCompute(firstEnter) { |
1 | <div class="register-page"> | 1 | <div class="register-page"> |
2 | - <!--<form id="register-form" class="register-form" method="POST" action="{{actionUrl}}" autocomplete="off">--> | ||
3 | - <ul> | ||
4 | - <li class="clearfix"> | ||
5 | - <select id="region" class="region" name="region"> | ||
6 | - {{#each region}} | ||
7 | - <option {{#if selected}}selected="selected"{{/if}} value="{{areaCode}}">{{name}}</option> | ||
8 | - {{/each}} | ||
9 | - </select> | ||
10 | - </li> | ||
11 | - <li class="clearfix" data-index="0"> | ||
12 | - <span id="country-code" class="country-code">{{location}}</span> | ||
13 | - <input value="" id="phone-num" class="input va phone-num" type="text" name="phoneNum" placeholder="请输入手机号码" autocomplete="off"> | ||
14 | - </li> | ||
15 | - <li class="w330 clearfix" data-index="1"> | ||
16 | - <input id="captcha" class="input va captcha" type="text" name="captcha" placeholder="图形验证码" autocomplete="off" maxlength="4"> | ||
17 | - <img id="captcha-img" class="captcha-img" src="{{captchaUrl}}" alt=""> | ||
18 | - <a class="link change-captcha">换一张</a> | ||
19 | - </li> | ||
20 | - <li class="clearfix" data-index="2"> | ||
21 | - <input id="msg-captcha" class="input va msg-captcha" type="text" name="msgCaptcha" placeholder="短信验证码" autocomplete="off" maxlength="4"> | ||
22 | - <input id="send-captcha" class="btn send-captcha disable" type="button" value="获取短信验证码"> | ||
23 | - <span id="msg-tip" class="hide msg-tip">短信验证码已发送至您的手机,请查收</span> | ||
24 | - </li> | ||
25 | - <li class="clearfix" data-index="3"> | ||
26 | - <input id="pwd" class="input va pwd" name="pwd" placeholder="设置密码" autocomplete="off" maxlength="20" type="password"> | ||
27 | - <div class="pwd-intensity-container"> | ||
28 | - <span class="pwd-intensity low">低</span> | ||
29 | - <span class="pwd-intensity mid">中</span> | ||
30 | - <span class="pwd-intensity high">高</span> | ||
31 | - </div> | ||
32 | - <div id="pwd-tips" class="hide pwd-tips"> | ||
33 | - <div class="default" id="pwd-tip1"><i></i>密码只支持6-20位字符</div> | ||
34 | - <div class="default" id="pwd-tip2"><i></i>建议由字母、 数字、 符号两种以上组合</div> | ||
35 | - </div> | ||
36 | - </li> | 2 | + <ul> |
3 | + <li class="clearfix"> | ||
4 | + <select id="region" class="region" name="region"> | ||
5 | + {{#each region}} | ||
6 | + <option {{#if selected}}selected="selected"{{/if}} value="{{areaCode}}">{{name}}</option> | ||
7 | + {{/each}} | ||
8 | + </select> | ||
9 | + </li> | ||
10 | + <li class="clearfix" data-index="0"> | ||
11 | + <span id="country-code" class="country-code">{{location}}</span> | ||
12 | + <input value="" id="phone-num" class="input va phone-num" type="text" name="phoneNum" placeholder="请输入手机号码" autocomplete="off"> | ||
13 | + </li> | ||
14 | + <li class="w330 clearfix" data-index="1"> | ||
15 | + <input id="captcha" class="input va captcha" type="text" name="captcha" placeholder="图形验证码" autocomplete="off" maxlength="4"> | ||
16 | + <img id="captcha-img" class="captcha-img" src="{{captchaUrl}}" alt=""> | ||
17 | + <a class="link change-captcha">换一张</a> | ||
18 | + </li> | ||
19 | + <li class="clearfix" data-index="2"> | ||
20 | + <input id="msg-captcha" class="input va msg-captcha" type="text" name="msgCaptcha" placeholder="短信验证码" autocomplete="off" maxlength="4"> | ||
21 | + <input id="send-captcha" class="btn send-captcha disable" type="button" value="获取短信验证码"> | ||
22 | + <span id="msg-tip" class="hide msg-tip">短信验证码已发送至您的手机,请查收</span> | ||
23 | + </li> | ||
24 | + <li class="clearfix" data-index="3"> | ||
25 | + <input id="pwd" class="input va pwd" name="pwd" placeholder="设置密码" autocomplete="off" maxlength="20" type="password"> | ||
26 | + <div class="pwd-intensity-container"> | ||
27 | + <span class="pwd-intensity low">低</span> | ||
28 | + <span class="pwd-intensity mid">中</span> | ||
29 | + <span class="pwd-intensity high">高</span> | ||
30 | + </div> | ||
31 | + <div id="pwd-tips" class="hide pwd-tips"> | ||
32 | + <div class="default" id="pwd-tip1"><i></i>密码只支持6-20位字符</div> | ||
33 | + <div class="default" id="pwd-tip2"><i></i>建议由字母、 数字、 符号两种以上组合</div> | ||
34 | + </div> | ||
35 | + </li> | ||
37 | 36 | ||
38 | - <li class="items-container clearfix"> | ||
39 | - <input id="agree-terms" class="agree-terms" type="checkbox" checked=""> | ||
40 | - <span> | ||
41 | - 我已阅读并同意遵守 | ||
42 | - <a class="link go-yoho-items" href="{{itemUrl}}">YOHO!有货服务条款</a> | ||
43 | - </span> | ||
44 | - </li> | ||
45 | - <li class="clearfix"> | ||
46 | - <input name="refer" id="refer" type="hidden" value="{{referUrl}}"> | ||
47 | - <input id="register-btn" class="btn register-btn disable" type="submit" value="{{regBtnText}}" disabled=""> | ||
48 | - </li> | ||
49 | - {{# loginUrl}} | ||
50 | - <li class="quick-login-container"> | ||
51 | - 我已注册YOHO!有货账号 | ||
52 | - <a class="link go-login" href="{{.}}">完善信息</a> | ||
53 | - </li> | ||
54 | - {{/loginUrl}} | 37 | + <li class="items-container clearfix"> |
38 | + <input id="agree-terms" class="agree-terms" type="checkbox" checked=""> | ||
39 | + <span> | ||
40 | + 我已阅读并同意遵守 | ||
41 | + <a class="link go-yoho-items" href="{{itemUrl}}">YOHO!有货服务条款</a> | ||
42 | + </span> | ||
43 | + </li> | ||
44 | + <li class="clearfix"> | ||
45 | + <input name="refer" id="refer" type="hidden" value="{{referUrl}}"> | ||
46 | + <input id="register-btn" class="btn register-btn disable" type="submit" value="{{regBtnText}}" disabled=""> | ||
47 | + </li> | ||
48 | + {{# loginUrl}} | ||
49 | + <li class="quick-login-container"> | ||
50 | + 我已注册YOHO!有货账号 | ||
51 | + <a class="link go-login" href="{{.}}">快速登录</a> | ||
52 | + </li> | ||
53 | + {{/loginUrl}} | ||
55 | 54 | ||
56 | - {{# skipUrl}} | ||
57 | - <li class="skip-user-info"> | ||
58 | - <a href="{{.}}">跳过此步</a> | ||
59 | - </li> | ||
60 | - {{/skipUrl}} | 55 | + {{# skipUrl}} |
56 | + <li class="skip-user-info"> | ||
57 | + <a href="{{.}}">跳过此步</a> | ||
58 | + </li> | ||
59 | + {{/skipUrl}} | ||
61 | 60 | ||
62 | - </ul> | ||
63 | - <div id="err-tip" class="err-tip hide"> | ||
64 | - <span></span> | ||
65 | - <b></b> | ||
66 | - </div> | ||
67 | - <!--</form>--> | 61 | + </ul> |
62 | + <div id="err-tip" class="err-tip hide"> | ||
63 | + <span></span> | ||
64 | + <b></b> | ||
65 | + </div> | ||
68 | </div> | 66 | </div> |
@@ -39,12 +39,12 @@ | @@ -39,12 +39,12 @@ | ||
39 | <div class="good-detail-text"> | 39 | <div class="good-detail-text"> |
40 | <a href="{{url}}">{{name}}</a> | 40 | <a href="{{url}}">{{name}}</a> |
41 | <p class="price"> | 41 | <p class="price"> |
42 | - <span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}"> | ||
43 | - ¥{{salePrice}} | ||
44 | - </span> | ||
45 | {{# marketPrice}} | 42 | {{# marketPrice}} |
46 | <span class="market-price">¥{{.}}</span> | 43 | <span class="market-price">¥{{.}}</span> |
47 | {{/ marketPrice}} | 44 | {{/ marketPrice}} |
45 | + <span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}"> | ||
46 | + ¥{{salePrice}} | ||
47 | + </span> | ||
48 | </p> | 48 | </p> |
49 | </div> | 49 | </div> |
50 | </div> | 50 | </div> |
@@ -29,7 +29,9 @@ var $pwdIntensity = $('.pwd-intensity'), | @@ -29,7 +29,9 @@ var $pwdIntensity = $('.pwd-intensity'), | ||
29 | 29 | ||
30 | //signup验证 | 30 | //signup验证 |
31 | var $region = $('#country-code'), | 31 | var $region = $('#country-code'), |
32 | - $regionSelect = $('#region'); | 32 | + $regionSelect = $('#region'), |
33 | + isPwd = false, | ||
34 | + pwdVal; | ||
33 | 35 | ||
34 | setTimeout(function() { | 36 | setTimeout(function() { |
35 | $pn.val(''); | 37 | $pn.val(''); |
@@ -43,10 +45,13 @@ setTimeout(function() { | @@ -43,10 +45,13 @@ setTimeout(function() { | ||
43 | $ca.attr('maxlength', caCount); | 45 | $ca.attr('maxlength', caCount); |
44 | 46 | ||
45 | //密码规则提示 | 47 | //密码规则提示 |
46 | -$pwd.focus(function() { | 48 | +$pwd.focus(function(event) { |
47 | $pwdTips.removeClass('hide'); | 49 | $pwdTips.removeClass('hide'); |
50 | + isPwd = true; | ||
51 | + pwdVal = $(this).val(); | ||
48 | }).blur(function() { | 52 | }).blur(function() { |
49 | $pwdTips.addClass('hide'); | 53 | $pwdTips.addClass('hide'); |
54 | + isPwd = false; | ||
50 | }); | 55 | }); |
51 | 56 | ||
52 | 57 | ||
@@ -509,6 +514,23 @@ exports.init = function(page) { | @@ -509,6 +514,23 @@ exports.init = function(page) { | ||
509 | }); | 514 | }); |
510 | }); | 515 | }); |
511 | 516 | ||
517 | + // 防止粘贴密码 | ||
518 | + /*$('#pwd, #repwd').keydown(function (event) { | ||
519 | + | ||
520 | + console.log(event.ctrlKey); | ||
521 | + console.log(isPwd); | ||
522 | + console.log(event.keyCode); | ||
523 | + | ||
524 | + if (event.ctrlKey && isPwd && event.keyCode === 86) { | ||
525 | + $(this).val(pwdVal); | ||
526 | + } | ||
527 | + | ||
528 | + });*/ | ||
529 | + | ||
530 | + $pwd[0].onpaste = function() { | ||
531 | + return false; | ||
532 | + }; | ||
533 | + | ||
512 | //ajax表单提交 | 534 | //ajax表单提交 |
513 | $registerBtn.click(function() { | 535 | $registerBtn.click(function() { |
514 | 536 |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | outline: none; | 27 | outline: none; |
28 | } | 28 | } |
29 | 29 | ||
30 | - input { | 30 | + input.input { |
31 | height: 43px; | 31 | height: 43px; |
32 | line-height: 43px; | 32 | line-height: 43px; |
33 | font-size: 16px; | 33 | font-size: 16px; |
@@ -53,28 +53,26 @@ | @@ -53,28 +53,26 @@ | ||
53 | float: left; | 53 | float: left; |
54 | } | 54 | } |
55 | 55 | ||
56 | - &.send-captcha { | ||
57 | - top: 0; | ||
58 | - background: #ff1901; | ||
59 | - position: absolute; | ||
60 | - width: 100px; | ||
61 | - right: 0; | ||
62 | - font-size: 12px; | ||
63 | - text-indent: 0; | ||
64 | - letter-spacing: 0; | ||
65 | - | ||
66 | - &.disable { | ||
67 | - background: #555; | ||
68 | - } | ||
69 | - } | ||
70 | - | ||
71 | &.agree-terms { | 56 | &.agree-terms { |
72 | - width: initial; | ||
73 | - height: initial; | ||
74 | vertical-align: middle; | 57 | vertical-align: middle; |
75 | } | 58 | } |
76 | } | 59 | } |
77 | 60 | ||
61 | + input.send-captcha { | ||
62 | + top: 0; | ||
63 | + background: #ff1901; | ||
64 | + position: absolute; | ||
65 | + width: 100px; | ||
66 | + right: 0; | ||
67 | + font-size: 12px; | ||
68 | + text-indent: 0; | ||
69 | + letter-spacing: 0; | ||
70 | + | ||
71 | + &.disable { | ||
72 | + background: #555; | ||
73 | + } | ||
74 | + } | ||
75 | + | ||
78 | .link { | 76 | .link { |
79 | text-decoration: underline; | 77 | text-decoration: underline; |
80 | color: #ff1901; | 78 | color: #ff1901; |
@@ -102,9 +102,6 @@ class SearchModel | @@ -102,9 +102,6 @@ class SearchModel | ||
102 | if (!isset($condition['order']) || empty($condition['order'])) { | 102 | if (!isset($condition['order']) || empty($condition['order'])) { |
103 | $condition['order'] = 's_n_desc'; | 103 | $condition['order'] = 's_n_desc'; |
104 | } | 104 | } |
105 | - if (!isset($condition['p_d']) || empty($condition['p_d'])) { | ||
106 | - $condition['p_d'] = '0,0.9'; | ||
107 | - } | ||
108 | $options = array( | 105 | $options = array( |
109 | 'imgSize' => $imgSize, | 106 | 'imgSize' => $imgSize, |
110 | 'minImgSize' => $minImgSize, | 107 | 'minImgSize' => $minImgSize, |
@@ -168,8 +165,10 @@ class SearchModel | @@ -168,8 +165,10 @@ class SearchModel | ||
168 | // 组合搜索分类url | 165 | // 组合搜索分类url |
169 | $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); | 166 | $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); |
170 | // 组合搜索店铺url | 167 | // 组合搜索店铺url |
171 | - $param['keyword'] = $searchCondition['condition']['query']; | ||
172 | - $urlList['shop'] = HelperSearch::getShopUrl($param); | 168 | + if (isset($param['keyword'])) { |
169 | + $param['keyword'] = $searchCondition['condition']['query']; | ||
170 | + $urlList['shop'] = HelperSearch::getShopUrl($param); | ||
171 | + } | ||
173 | //用户浏览记录 | 172 | //用户浏览记录 |
174 | //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); | 173 | //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); |
175 | $result = Yohobuy::getMulti($urlList, array(), true); | 174 | $result = Yohobuy::getMulti($urlList, array(), true); |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | 2 | ||
3 | use Action\AbstractAction; | 3 | use Action\AbstractAction; |
4 | 4 | ||
5 | -class RegisterController extends AbstractAction | 5 | +class Register1Controller extends AbstractAction |
6 | { | 6 | { |
7 | /** | 7 | /** |
8 | * 登录页 | 8 | * 登录页 |
@@ -49,7 +49,7 @@ class RegisterController extends AbstractAction | @@ -49,7 +49,7 @@ class RegisterController extends AbstractAction | ||
49 | 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190' | 49 | 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190' |
50 | ) | 50 | ) |
51 | ); | 51 | ); |
52 | - $this->_view->display('index', $data); | 52 | + $this->_view->display('../register/index', $data); |
53 | } | 53 | } |
54 | 54 | ||
55 | public function checkmobileAction() | 55 | public function checkmobileAction() |
@@ -17,7 +17,11 @@ class ListController extends WebAction | @@ -17,7 +17,11 @@ class ListController extends WebAction | ||
17 | */ | 17 | */ |
18 | public function saleAction() | 18 | public function saleAction() |
19 | { | 19 | { |
20 | - $list = SearchModel::getListData(); | 20 | + //排序 |
21 | + $condition['order'] = 's_n_desc'; | ||
22 | + //打折 | ||
23 | + $condition['p_d'] = '0,0.9'; | ||
24 | + $list = SearchModel::getListData($condition); | ||
21 | $data = array( | 25 | $data = array( |
22 | //初始化js | 26 | //初始化js |
23 | 'productListPage' => true, | 27 | 'productListPage' => true, |
-
Please register or login to post a comment