Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
36 changed files
with
1194 additions
and
214 deletions
@@ -46,7 +46,7 @@ class LoginData extends \LibModels\Wap\Passport\LoginData | @@ -46,7 +46,7 @@ class LoginData extends \LibModels\Wap\Passport\LoginData | ||
46 | 46 | ||
47 | $param['client_secret'] = Sign::getSign($param); | 47 | $param['client_secret'] = Sign::getSign($param); |
48 | 48 | ||
49 | - return Yohobuy::get(Yohobuy::API_URL2, $param); | 49 | + return Yohobuy::get(Yohobuy::API_URL, $param); |
50 | } | 50 | } |
51 | 51 | ||
52 | } | 52 | } |
@@ -2,33 +2,33 @@ | @@ -2,33 +2,33 @@ | ||
2 | namespace LibModels\Web\Product; | 2 | namespace LibModels\Web\Product; |
3 | 3 | ||
4 | use Api\Yohobuy; | 4 | use Api\Yohobuy; |
5 | -use Api\Sign; | ||
6 | 5 | ||
7 | 6 | ||
8 | /** | 7 | /** |
9 | * 热销排行 | 8 | * 热销排行 |
10 | - * | ||
11 | - * */ | 9 | + */ |
12 | class HotrankData extends \LibModels\Wap\Product\SearchData | 10 | class HotrankData extends \LibModels\Wap\Product\SearchData |
13 | -{ | ||
14 | - const URI_HOTRANK_RES = '/operations/service/v4/resource'; | ||
15 | - const URI_HOTRANK_TAG = '/operations/api/v5/resource/get'; | 11 | +{ |
12 | + const URI_HOTRANK_TAG = 'http://test.service.api.yohobuy.com/operations/service/v1/hotranktag'; | ||
16 | 13 | ||
17 | - | ||
18 | /** | 14 | /** |
19 | - 获取热销排行 | ||
20 | - * 分类标签 | 15 | + * 获取标签 |
16 | + * $client_type 客户端类型 | ||
17 | + * $channel 频道类型 | ||
21 | */ | 18 | */ |
22 | - public static function getHotranktag($client_type = 'web',$channel = 0, $is_concurrent = true, $callback = '') | 19 | + public static function getHotranktag($client_type = 'web',$channel = 0,$is_concurrent = true) |
23 | { | 20 | { |
24 | - // 构建必传参数 | ||
25 | - $params = Yohobuy::param(); | ||
26 | - $params['client_type'] = 'web'; | ||
27 | - $params['channel'] =$channel ; | ||
28 | - $params['is_concurrent'] = true; | ||
29 | - $params['callback'] = $callback; | ||
30 | - $params['client_secret'] = Sign::getSign($params); | ||
31 | - return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_HOTRANK_TAG, $params); | 21 | + $params = array('client_type'=>$client_type,'channel'=>$channel,'is_concurrent' => $is_concurrent); |
22 | + return Yohobuy::yarClient(self::URI_HOTRANK_TAG, 'getTag',$params); | ||
32 | } | 23 | } |
33 | 24 | ||
25 | + /** | ||
26 | + * 通过ID获取标签信息 | ||
27 | + * $id 标签ID | ||
28 | + */ | ||
29 | + public static function getTagById($id,$is_concurrent = true) | ||
30 | + { | ||
31 | + $params['id'] = $id; | ||
32 | + return Yohobuy::yarClient(self::URI_HOTRANK_TAG, 'getOneTag',$params); | ||
33 | + } | ||
34 | } | 34 | } |
@@ -834,9 +834,8 @@ class Process | @@ -834,9 +834,8 @@ class Process | ||
834 | { | 834 | { |
835 | $result = array(); | 835 | $result = array(); |
836 | $temp = array(); | 836 | $temp = array(); |
837 | - if ($data[$key]['template_name'] == 'custom_brands') | 837 | + if ($data[$key]['template_name'] == 'custom_brands' || $data[$key]['template_name'] == 'kids_brands') |
838 | { | 838 | { |
839 | - // print_r($data[$key]); | ||
840 | $result = array( | 839 | $result = array( |
841 | 'hotBrands' => array( | 840 | 'hotBrands' => array( |
842 | 'name' => '', | 841 | 'name' => '', |
@@ -856,7 +855,6 @@ class Process | @@ -856,7 +855,6 @@ class Process | ||
856 | { | 855 | { |
857 | $width = 185; | 856 | $width = 185; |
858 | $height = 86; | 857 | $height = 86; |
859 | - $type = 'lifestyle'; | ||
860 | $val['src'] = Images::getImageUrl($val['src'], $width, $height, 2); | 858 | $val['src'] = Images::getImageUrl($val['src'], $width, $height, 2); |
861 | $val['url'] = Helpers::transUrl($val['url'], $type); | 859 | $val['url'] = Helpers::transUrl($val['url'], $type); |
862 | $floor['logoBrand'][] = array( | 860 | $floor['logoBrand'][] = array( |
@@ -865,11 +863,8 @@ class Process | @@ -865,11 +863,8 @@ class Process | ||
865 | ); | 863 | ); |
866 | } | 864 | } |
867 | $floor['moreBrand'] = 'http://yohobuy.com/brands'; | 865 | $floor['moreBrand'] = 'http://yohobuy.com/brands'; |
868 | - //$floor['moreBrand'] = 'http://yohobuy.com/brands?gender=1,3&openby:yohobuy={"action":"go.list","params":{"actiontype":0,"gender":"1,3"}}'; | ||
869 | - //print_r($floor); | ||
870 | $type_key = sprintf("%s_%s", $type, $key); | 866 | $type_key = sprintf("%s_%s", $type, $key); |
871 | $cacheKey = sprintf("%s_%s", CacheConfig::KEY_INDEX_BRANDS_LIST_DATA, $type_key); | 867 | $cacheKey = sprintf("%s_%s", CacheConfig::KEY_INDEX_BRANDS_LIST_DATA, $type_key); |
872 | - //print_r($cacheKey); | ||
873 | Cache::set($cacheKey, $floor, 7200); | 868 | Cache::set($cacheKey, $floor, 7200); |
874 | $result['hotBrands']['brandUrl'] = '/common/getIndexResourceBrand?type=' . $type_key; | 869 | $result['hotBrands']['brandUrl'] = '/common/getIndexResourceBrand?type=' . $type_key; |
875 | //print_r($result['hotBrands']['brandUrl']); | 870 | //print_r($result['hotBrands']['brandUrl']); |
@@ -181,10 +181,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() { | @@ -181,10 +181,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() { | ||
181 | hasChooseColor = false; | 181 | hasChooseColor = false; |
182 | 182 | ||
183 | //当前尺码行隐藏 | 183 | //当前尺码行隐藏 |
184 | - $sizeRowList.eq(curSizeIndex).removeClass('show').addClass('hide'); | 184 | + $sizeRowList.eq(curSizeIndex).addClass('hide'); |
185 | 185 | ||
186 | //目标尺码行显示 | 186 | //目标尺码行显示 |
187 | - $sizeRowList.eq(0).removeClass('hide').addClass('show'); | 187 | + $sizeRowList.eq(0).removeClass('hide'); |
188 | 188 | ||
189 | curSizeIndex = 0; | 189 | curSizeIndex = 0; |
190 | 190 | ||
@@ -202,10 +202,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() { | @@ -202,10 +202,10 @@ $yohoPage.on('touchstart', '.color-list .block', function() { | ||
202 | displayGoodNum(curGoodNum); | 202 | displayGoodNum(curGoodNum); |
203 | 203 | ||
204 | // 尺码行当前行隐藏 | 204 | // 尺码行当前行隐藏 |
205 | - $sizeRowList.eq(curSizeIndex).removeClass('show').addClass('hide'); | 205 | + $sizeRowList.eq(curSizeIndex).addClass('hide'); |
206 | 206 | ||
207 | //尺码对应行显示 | 207 | //尺码对应行显示 |
208 | - $sizeRowList.eq(index + 1).removeClass('hide').addClass('show'); | 208 | + $sizeRowList.eq(index + 1).removeClass('hide'); |
209 | 209 | ||
210 | curSizeIndex = index + 1; | 210 | curSizeIndex = index + 1; |
211 | $curColorBlock = $this; | 211 | $curColorBlock = $this; |
@@ -393,4 +393,4 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -393,4 +393,4 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
393 | }); | 393 | }); |
394 | 394 | ||
395 | exports.init = init; | 395 | exports.init = init; |
396 | -exports.show = show; | 396 | +exports.show = show; |
@@ -19,17 +19,10 @@ | @@ -19,17 +19,10 @@ | ||
19 | <div class="chose-items"> | 19 | <div class="chose-items"> |
20 | <div class="color-list block-list"> | 20 | <div class="color-list block-list"> |
21 | <span>颜色</span> | 21 | <span>颜色</span> |
22 | - <!--<ul class="clearfix" data-type="color"> | ||
23 | - {{# colors}} | ||
24 | - <li class="block {{#if chosed}}chosed{{/if}} {{#unless colorNum}}zero-stock{{/unless}}" data-num="{{colorNum}}" data-id="{{id}}" data-numstr="{{sizeNumStr}}" data-skcid="{{skcId}}"> | ||
25 | - {{name}} | ||
26 | - </li> | ||
27 | - {{/ colors}} | ||
28 | - </ul>--> | ||
29 | {{# colors}} | 22 | {{# colors}} |
30 | <ul class="size-row clearfix {{#unless @first}}hide{{/if}}"> | 23 | <ul class="size-row clearfix {{#unless @first}}hide{{/if}}"> |
31 | {{# color}} | 24 | {{# color}} |
32 | - <li class="block {{#if chosed}}chosed{{/if}} {{#unless colorNum}}zero-stock{{/unless}}" data-num="{{colorNum}}" data-id="{{id}}" data-numstr="{{sizeNumStr}}" data-skcid="{{skcId}}"> | 25 | + <li class="block {{#if chosed}}chosed{{/if}} {{#unless colorNum}}zero-stock{{/unless}}" data-num="{{colorNum}}"> |
33 | {{name}} | 26 | {{name}} |
34 | </li> | 27 | </li> |
35 | {{/ color}} | 28 | {{/ color}} |
@@ -41,20 +34,12 @@ | @@ -41,20 +34,12 @@ | ||
41 | {{# sizes}} | 34 | {{# sizes}} |
42 | <ul class="size-row clearfix {{#unless @first}}hide{{/if}}"> | 35 | <ul class="size-row clearfix {{#unless @first}}hide{{/if}}"> |
43 | {{# size}} | 36 | {{# size}} |
44 | - <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id="{{id}}" data-colorid="{{colorId}}" data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodsId}}"> | 37 | + <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-num="{{sizeNum}}" data-skuid="{{skuId}}"> |
45 | {{name}} | 38 | {{name}} |
46 | </li> | 39 | </li> |
47 | {{/ size}} | 40 | {{/ size}} |
48 | </ul> | 41 | </ul> |
49 | {{/ sizes}} | 42 | {{/ sizes}} |
50 | - | ||
51 | - <!--{{#if defaultSizes}} | ||
52 | - <ul class="size-row clearfix default-size"> | ||
53 | - {{#each defaultSizes}} | ||
54 | - <li class="block {{#if numZero}}zero-stock{{/if}}" data-numstr="{{numStr}}">{{name}}</li> | ||
55 | - {{/each}} | ||
56 | - </ul> | ||
57 | - {{/if}}--> | ||
58 | </div> | 43 | </div> |
59 | <p> | 44 | <p> |
60 | <div class="num"> | 45 | <div class="num"> |
1 | +{{> layout/simple-header}} | ||
2 | +<div class="login-page passport-page yoho-page clearfix"> | ||
3 | + <div class="bindwrapper"> | ||
4 | + <h3 class="welcomeword">欢迎加入<span class="yoho">YOHO!FAMILY</span></h3> | ||
5 | + <p class="safeword">为了您的账户安全,请您完善账户信息,以便为您提供更优质的服务</p> | ||
6 | + <form action="" id="bindmobileform"> | ||
7 | + <div class="yohobindrow"> | ||
8 | + <div class="name areatag">地区</div> | ||
9 | + <div class="content"> | ||
10 | + <div class="yohoselectarea"> | ||
11 | + <div class="optionshow"> | ||
12 | + <span class="areaname" id="areaname">中国</span><span class="righttag"></span> | ||
13 | + </div> | ||
14 | + <div class="optionslist hide"> | ||
15 | + <div class="optionitem" areanum="+88">中国香港</div> | ||
16 | + <div class="optionitem" areanum="+87">中国台湾</div> | ||
17 | + <div class="optionitem" areanum="+86">中国</div> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + </div> | ||
22 | + <div class="yohobindrow"> | ||
23 | + <div class="name phonetag">手机号码</div> | ||
24 | + <div class="content"> | ||
25 | + <div class="yohophonewrapper"><div class="areanum" id="areanum">+86</div><input type="text" class="phonenum" /></div> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | + </form> | ||
29 | + | ||
30 | + <div class="protoctolwrapper"> | ||
31 | + <div class="choosewrapper"><input type="checkbox" class="choosetag"></div> | ||
32 | + <span>我已阅读并同意遵守<a href="" class="protoctol">YOHO!有货服务条款</a></span> | ||
33 | + </div> | ||
34 | + <div class="btnwrapper"> | ||
35 | + <a href="javascript:void(0)" class="yohobindbtn" id="bindfirststep">下一步</a> | ||
36 | + </div> | ||
37 | + </div> | ||
38 | +</div> | ||
39 | +{{> layout/footer}} |
@@ -2,9 +2,14 @@ | @@ -2,9 +2,14 @@ | ||
2 | <div class="new-sale-page product-page yoho-page"> | 2 | <div class="new-sale-page product-page yoho-page"> |
3 | {{# saleList}} | 3 | {{# saleList}} |
4 | {{# saleBanner}} | 4 | {{# saleBanner}} |
5 | - <div class="banner-img" style="height: {{bannerHeight}}px;background:url({{img}}) no-repeat top center;"></div> | 5 | + <div class="sale-list-banner" style="height: {{bannerHeight}}px;"> |
6 | + <ul style="height: {{bannerHeight}}px;"> | ||
7 | + {{# list}} | ||
8 | + <li class="banner-img" style="background:url({{img}}) no-repeat top center;"></li> | ||
9 | + {{/ list}} | ||
10 | + </ul> | ||
11 | + </div> | ||
6 | {{/ saleBanner}} | 12 | {{/ saleBanner}} |
7 | - | ||
8 | <div class="center-content clearfix"> | 13 | <div class="center-content clearfix"> |
9 | {{# saleTitle}} | 14 | {{# saleTitle}} |
10 | <div class="header-title"> | 15 | <div class="header-title"> |
@@ -144,7 +144,7 @@ | @@ -144,7 +144,7 @@ | ||
144 | {{!-- sale列表 --}} | 144 | {{!-- sale列表 --}} |
145 | {{#if saleListPage}} | 145 | {{#if saleListPage}} |
146 | <script> | 146 | <script> |
147 | - seajs.use(['js/product/list', 'js/product/product'], function (list, product) { | 147 | + seajs.use(['js/product/list', 'js/product/product', 'js/product/banner'], function (list, product) { |
148 | 148 | ||
149 | product.init(4); | 149 | product.init(4); |
150 | window.onresize = function () { | 150 | window.onresize = function () { |
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | <span class="title">性别:</span> | 39 | <span class="title">性别:</span> |
40 | 40 | ||
41 | <div class="attr-content clearfix"> | 41 | <div class="attr-content clearfix"> |
42 | - {{#each channel}} | 42 | + {{#each gender}} |
43 | <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}"> | 43 | <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}"> |
44 | {{name}} | 44 | {{name}} |
45 | </a> | 45 | </a> |
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | <div class="attr-content"> | 55 | <div class="attr-content"> |
56 | <ul class="sort-pre clearfix"> | 56 | <ul class="sort-pre clearfix"> |
57 | {{#each sort}} | 57 | {{#each sort}} |
58 | - <li> | 58 | + <li data-id="{{id}}"> |
59 | <span class="attr {{#if checked}}checked{{/if}}"> | 59 | <span class="attr {{#if checked}}checked{{/if}}"> |
60 | {{name}} | 60 | {{name}} |
61 | <div class="sort-up-icon"></div> | 61 | <div class="sort-up-icon"></div> |
@@ -92,14 +92,16 @@ | @@ -92,14 +92,16 @@ | ||
92 | {{/ default}} | 92 | {{/ default}} |
93 | </ul> | 93 | </ul> |
94 | 94 | ||
95 | - <div class="brand-opt"> | ||
96 | - <span id="brand-more" class="brand-more"> | ||
97 | - <em>更多</em> | ||
98 | - <i class="iconfont"></i> | ||
99 | - </span> | 95 | + {{#unless hideMore}} |
96 | + <div class="brand-opt"> | ||
97 | + <span id="brand-more" class="brand-more"> | ||
98 | + <em>更多</em> | ||
99 | + <i class="iconfont"></i> | ||
100 | + </span> | ||
100 | 101 | ||
101 | - <span id="brand-multi" class="multi-select">多选 +</span> | ||
102 | - </div> | 102 | + <span id="brand-multi" class="multi-select">多选 +</span> |
103 | + </div> | ||
104 | + {{/unless}} | ||
103 | 105 | ||
104 | <div class="brand-panel hide"> | 106 | <div class="brand-panel hide"> |
105 | <div class="panel-head clearfix"> | 107 | <div class="panel-head clearfix"> |
@@ -177,17 +179,15 @@ | @@ -177,17 +179,15 @@ | ||
177 | </div> | 179 | </div> |
178 | {{/if}} | 180 | {{/if}} |
179 | 181 | ||
180 | - {{#if size}} | ||
181 | - <div class="size section"> | ||
182 | - <span class="title">尺码:</span> | 182 | + <div class="size section hide"> |
183 | + <span class="title">尺码:</span> | ||
183 | 184 | ||
184 | - <div class="attr-content clearfix"> | ||
185 | - {{# size}} | ||
186 | - <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">{{name}}</a> | ||
187 | - {{/ size}} | ||
188 | - </div> | 185 | + <div class="attr-content clearfix"> |
186 | + {{# size}} | ||
187 | + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">{{name}}</a> | ||
188 | + {{/ size}} | ||
189 | </div> | 189 | </div> |
190 | - {{/if}} | 190 | + </div> |
191 | 191 | ||
192 | {{#if seniorChose}} | 192 | {{#if seniorChose}} |
193 | <div class="senior section"> | 193 | <div class="senior section"> |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | {{/ tags}} | 25 | {{/ tags}} |
26 | </div> | 26 | </div> |
27 | <div class="good-detail-img"> | 27 | <div class="good-detail-img"> |
28 | - <a class="good-thumb" href="{{url}}"> | 28 | + <a class="good-thumb" href="{{url}}" target="_blank"> |
29 | <img class="lazy" data-original="{{thumb}}"> | 29 | <img class="lazy" data-original="{{thumb}}"> |
30 | </a> | 30 | </a> |
31 | {{# isFew}} | 31 | {{# isFew}} |
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | {{/if}} | 37 | {{/if}} |
38 | </div> | 38 | </div> |
39 | <div class="good-detail-text"> | 39 | <div class="good-detail-text"> |
40 | - <a href="{{url}}">{{name}}</a> | 40 | + <a href="{{url}}" target="_blank">{{name}}</a> |
41 | <p class="price"> | 41 | <p class="price"> |
42 | {{# marketPrice}} | 42 | {{# marketPrice}} |
43 | <span class="market-price">¥{{.}}</span> | 43 | <span class="market-price">¥{{.}}</span> |
web-static/img/product/default-active.png
0 → 100644

1.16 KB
web-static/img/product/default-normal.png
0 → 100644

1.26 KB
@@ -211,13 +211,17 @@ $account.on('keyup', function() { | @@ -211,13 +211,17 @@ $account.on('keyup', function() { | ||
211 | //密码 | 211 | //密码 |
212 | $password.on('blur', function() { | 212 | $password.on('blur', function() { |
213 | validatePassword(); | 213 | validatePassword(); |
214 | + | ||
215 | + if ($capsLock.hasClass('hide')) { | ||
216 | + return; | ||
217 | + } | ||
218 | + | ||
219 | + $capsLock.addClass('hide'); | ||
214 | }).on('keypress', function(e) { | 220 | }).on('keypress', function(e) { |
215 | - var code = e.which, | ||
216 | - isShift = e.shiftKey || (code === 16) || false; | 221 | + var code = e.which; |
217 | 222 | ||
218 | //CapsLock检测 | 223 | //CapsLock检测 |
219 | - if ((!isShift && (code >= 65 && code <= 90)) || | ||
220 | - (isShift && (code >= 97 && code <= 122))) { | 224 | + if (code >= 65 && code <= 90) { |
221 | $capsLock.removeClass('hide'); | 225 | $capsLock.removeClass('hide'); |
222 | return; | 226 | return; |
223 | } | 227 | } |
@@ -276,7 +280,7 @@ $('#login-btn').on('click', function() { | @@ -276,7 +280,7 @@ $('#login-btn').on('click', function() { | ||
276 | if (data.data) { | 280 | if (data.data) { |
277 | 281 | ||
278 | //防止data.data为undefined时下行语句执行出错而导致脚本不能走到complete去处理authing | 282 | //防止data.data为undefined时下行语句执行出错而导致脚本不能走到complete去处理authing |
279 | - location.href = data.data.href; | 283 | + location.href = data.data.session; |
280 | } | 284 | } |
281 | } else { | 285 | } else { |
282 | $passwordTip.removeClass('hide').children('em').text(data.message); | 286 | $passwordTip.removeClass('hide').children('em').text(data.message); |
@@ -417,6 +417,18 @@ function pwdFn($obj) { | @@ -417,6 +417,18 @@ function pwdFn($obj) { | ||
417 | // Tips: 不可以在获得焦点的时候验证,获得焦点和失去焦点的间隔太小,如果中间存在ajax校验的话会出现问题 | 417 | // Tips: 不可以在获得焦点的时候验证,获得焦点和失去焦点的间隔太小,如果中间存在ajax校验的话会出现问题 |
418 | // ( ▼-▼ )注册页和信息完善页面接口不同 | 418 | // ( ▼-▼ )注册页和信息完善页面接口不同 |
419 | exports.init = function(page) { | 419 | exports.init = function(page) { |
420 | + | ||
421 | + $('#agree-terms').click(function() { | ||
422 | + if ($(this).attr('notchecked')) { | ||
423 | + console.log(1); | ||
424 | + $(this).removeAttr('notchecked'); | ||
425 | + } else { | ||
426 | + console.log(2); | ||
427 | + $(this).attr('notchecked', 'true'); | ||
428 | + } | ||
429 | + | ||
430 | + }); | ||
431 | + | ||
420 | $registerPage.find('.va').keyup(function() { | 432 | $registerPage.find('.va').keyup(function() { |
421 | 433 | ||
422 | var j, | 434 | var j, |
@@ -438,7 +450,7 @@ exports.init = function(page) { | @@ -438,7 +450,7 @@ exports.init = function(page) { | ||
438 | 450 | ||
439 | } | 451 | } |
440 | 452 | ||
441 | - if (statusLen === 4 && $('#agree-terms').is(':checked')) { | 453 | + if (statusLen === 4 && !$('#agree-terms').attr('notchecked')) { |
442 | $registerBtn.removeClass('disable').removeAttr('disabled'); | 454 | $registerBtn.removeClass('disable').removeAttr('disabled'); |
443 | } else { | 455 | } else { |
444 | $registerBtn.addClass('disable').attr('disabled', 'true'); | 456 | $registerBtn.addClass('disable').attr('disabled', 'true'); |
@@ -515,18 +527,6 @@ exports.init = function(page) { | @@ -515,18 +527,6 @@ exports.init = function(page) { | ||
515 | }); | 527 | }); |
516 | 528 | ||
517 | // 防止粘贴密码 | 529 | // 防止粘贴密码 |
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() { | 530 | $pwd[0].onpaste = function() { |
531 | return false; | 531 | return false; |
532 | }; | 532 | }; |
web-static/js/product/banner.js
0 → 100644
1 | +/* | ||
2 | + * author: chenglong | ||
3 | + */ | ||
4 | + | ||
5 | +var Slide = require('../common/yohoui/YH.slide'); | ||
6 | +var $ = require('yoho.jquery'); | ||
7 | + | ||
8 | +var $contain = $('.sale-list-banner'); | ||
9 | +var $item = $contain.find('li'); | ||
10 | +var index = 0; | ||
11 | +var pagationStr = ''; | ||
12 | +var pagationBoxStr = ''; | ||
13 | +var i; | ||
14 | +var current = true; | ||
15 | +var slide; | ||
16 | + | ||
17 | +for (i = 0; i < $item.length; i++) { | ||
18 | + | ||
19 | + if (i === 0) { | ||
20 | + pagationStr += '<span class="active"></span>'; | ||
21 | + } else { | ||
22 | + pagationStr += '<span></span>'; | ||
23 | + } | ||
24 | +} | ||
25 | + | ||
26 | +pagationBoxStr = '<div class="sale-list-pagation"><div>' + pagationStr + '</div></div>'; | ||
27 | + | ||
28 | +$contain.append($(pagationBoxStr)); | ||
29 | + | ||
30 | +slide = new Slide({ | ||
31 | + length: $item.length, | ||
32 | + loop: true, | ||
33 | + auto: true, | ||
34 | + timeout: 2, | ||
35 | + index: 0 | ||
36 | +}); | ||
37 | + | ||
38 | + | ||
39 | +slide.on('change', function(data) { | ||
40 | + if (current) { | ||
41 | + current = false; | ||
42 | + } else { | ||
43 | + return; | ||
44 | + } | ||
45 | + index++; | ||
46 | + | ||
47 | + | ||
48 | + $('.sale-list-pagation').find('span').removeClass('active'); | ||
49 | + $item.eq(data.from).animate({ | ||
50 | + opacity: 0 | ||
51 | + }, 300); | ||
52 | + $item.eq(data.to).css({ | ||
53 | + zIndex: index | ||
54 | + }).animate({ | ||
55 | + opacity: 1 | ||
56 | + }, 300, function() { | ||
57 | + current = true; | ||
58 | + }); | ||
59 | + | ||
60 | + $('.sale-list-pagation').find('span').eq(data.to).addClass('active'); | ||
61 | + | ||
62 | +}); | ||
63 | + | ||
64 | +$contain.hover(function() { | ||
65 | + if (current) { | ||
66 | + slide.pause(); | ||
67 | + } | ||
68 | + | ||
69 | +}, function() { | ||
70 | + slide.resume(); | ||
71 | +}); | ||
72 | + | ||
73 | +$('.sale-list-pagation span').click(function() { | ||
74 | + | ||
75 | + var index = $(this).index(); | ||
76 | + | ||
77 | + if (current) { | ||
78 | + slide.go(index); | ||
79 | + } | ||
80 | +}); | ||
81 | + | ||
82 | +slide.init(); |
@@ -4,7 +4,8 @@ | @@ -4,7 +4,8 @@ | ||
4 | * @date: 2015/12/4 | 4 | * @date: 2015/12/4 |
5 | */ | 5 | */ |
6 | 6 | ||
7 | -var $ = require('yoho.jquery'); | 7 | +var $ = require('yoho.jquery'), |
8 | + Handlebars = require('yoho.handlebars'); | ||
8 | 9 | ||
9 | var checkUnicode = { | 10 | var checkUnicode = { |
10 | unchecked: '', | 11 | unchecked: '', |
@@ -38,6 +39,13 @@ var $seniorSubWrap = $('.senior-sub-wrap'), | @@ -38,6 +39,13 @@ var $seniorSubWrap = $('.senior-sub-wrap'), | ||
38 | 39 | ||
39 | var seniorHoverTime, hoveredIndex; | 40 | var seniorHoverTime, hoveredIndex; |
40 | 41 | ||
42 | +// 尺寸 handlebars 模板 | ||
43 | +var sizeTmpl = '{{# size}}<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">{{name}}</a>{{/ size}}', | ||
44 | + sizeCache = {}, // 缓存一下尺寸信息 | ||
45 | + $sizeWrap = $('.filter-box .size'); | ||
46 | + | ||
47 | +sizeTmpl = Handlebars.compile(sizeTmpl); | ||
48 | + | ||
41 | //清除checkbox选中状态 | 49 | //清除checkbox选中状态 |
42 | function clearChecked($checkbox) { | 50 | function clearChecked($checkbox) { |
43 | $checkbox.removeClass('checked').html(checkUnicode.unchecked); | 51 | $checkbox.removeClass('checked').html(checkUnicode.unchecked); |
@@ -85,13 +93,45 @@ $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | @@ -85,13 +93,45 @@ $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | ||
85 | //【分类】 | 93 | //【分类】 |
86 | $('.sort-pre').on('click', 'li', function() { | 94 | $('.sort-pre').on('click', 'li', function() { |
87 | var $this = $(this), | 95 | var $this = $(this), |
88 | - index = $this.index(); | 96 | + index = $this.index(), |
97 | + id = $this.data('id'); | ||
98 | + | ||
99 | + if ($this.hasClass('active')) { | ||
100 | + | ||
101 | + // 选中时,再次点击取消选中 | ||
102 | + $this.removeClass('active'); | ||
103 | + $sortSub.children(':eq(' + index + ')').addClass('hide'); | ||
104 | + $sizeWrap.addClass('hide'); | ||
105 | + return; | ||
106 | + } | ||
89 | 107 | ||
90 | $this.siblings('.active').removeClass('active'); | 108 | $this.siblings('.active').removeClass('active'); |
91 | $this.addClass('active'); | 109 | $this.addClass('active'); |
92 | 110 | ||
93 | $sortSub.children(':not(.hide)').addClass('hide'); | 111 | $sortSub.children(':not(.hide)').addClass('hide'); |
94 | $sortSub.children(':eq(' + index + ')').removeClass('hide'); | 112 | $sortSub.children(':eq(' + index + ')').removeClass('hide'); |
113 | + | ||
114 | + if (sizeCache[id]) { | ||
115 | + $sizeWrap.find('.attr-content').html(sizeCache[id]); | ||
116 | + $sizeWrap.removeClass('hide'); | ||
117 | + } else { | ||
118 | + $.ajax({ | ||
119 | + url: '/product/search/sortSize', | ||
120 | + data: { | ||
121 | + msort: id | ||
122 | + } | ||
123 | + }).then(function(res) { | ||
124 | + if ($.type(res) === 'array' && res.length) { | ||
125 | + sizeCache[id] = sizeTmpl({ | ||
126 | + size: res | ||
127 | + }); | ||
128 | + $sizeWrap.find('.attr-content').html(sizeCache[id]); | ||
129 | + $sizeWrap.removeClass('hide'); | ||
130 | + } else { | ||
131 | + $sizeWrap.addClass('hide'); | ||
132 | + } | ||
133 | + }); | ||
134 | + } | ||
95 | }); | 135 | }); |
96 | 136 | ||
97 | //【品牌】 | 137 | //【品牌】 |
@@ -132,10 +172,17 @@ $brandMore.click(function() { | @@ -132,10 +172,17 @@ $brandMore.click(function() { | ||
132 | }); | 172 | }); |
133 | 173 | ||
134 | //【品牌】索引 | 174 | //【品牌】索引 |
135 | -$('.brands-index').on('click', 'span', function() { | 175 | +$('.brands-index').on('mouseenter', 'span', function() { |
136 | var $this = $(this), | 176 | var $this = $(this), |
137 | index = $this.data('index'); | 177 | index = $this.data('index'); |
138 | 178 | ||
179 | + if ($this.hasClass('hover')) { | ||
180 | + return; | ||
181 | + } | ||
182 | + | ||
183 | + $this.siblings('span.hover').removeClass('hover'); | ||
184 | + $this.addClass('hover'); | ||
185 | + | ||
139 | if ($this.index() === 0) { | 186 | if ($this.index() === 0) { |
140 | 187 | ||
141 | //全部 | 188 | //全部 |
@@ -35,7 +35,7 @@ $('.logo-brand').logoBrand({ | @@ -35,7 +35,7 @@ $('.logo-brand').logoBrand({ | ||
35 | '<div class="good-info">' + | 35 | '<div class="good-info">' + |
36 | '<div class="item-img">' + | 36 | '<div class="item-img">' + |
37 | '<a class="good-thumb" target="_blank" href="\{{url}}">' + | 37 | '<a class="good-thumb" target="_blank" href="\{{url}}">' + |
38 | - '<img class="lazy" data-original="\{{img}}">' + | 38 | + '<img class="lazy" data-original="\{{thumb}}">' + |
39 | '</a>' + | 39 | '</a>' + |
40 | '</div>' + | 40 | '</div>' + |
41 | '<div class="good-detail-text">' + | 41 | '<div class="good-detail-text">' + |
@@ -117,6 +117,10 @@ $('.logo-brand').logoBrand({ | @@ -117,6 +117,10 @@ $('.logo-brand').logoBrand({ | ||
117 | var nowIndex = $(this).index(), | 117 | var nowIndex = $(this).index(), |
118 | sid = $(this).data('sid'); | 118 | sid = $(this).data('sid'); |
119 | 119 | ||
120 | + if ($(this).hasClass('current')) { | ||
121 | + return; | ||
122 | + } | ||
123 | + | ||
120 | //处理current样式 | 124 | //处理current样式 |
121 | $(this).addClass('current').siblings().removeClass('current'); | 125 | $(this).addClass('current').siblings().removeClass('current'); |
122 | $('.floatlayer').find('li').removeClass('current').eq(nowIndex).addClass('current'); | 126 | $('.floatlayer').find('li').removeClass('current').eq(nowIndex).addClass('current'); |
@@ -135,7 +139,11 @@ $('.logo-brand').logoBrand({ | @@ -135,7 +139,11 @@ $('.logo-brand').logoBrand({ | ||
135 | $('.floatlayer').on('click', 'li', function() { | 139 | $('.floatlayer').on('click', 'li', function() { |
136 | var nowIndex = $(this).index(); | 140 | var nowIndex = $(this).index(); |
137 | 141 | ||
138 | - $('.hot-cate').find('li').trigger('click'); | 142 | + if ($(this).hasClass('current')) { |
143 | + return; | ||
144 | + } | ||
145 | + | ||
146 | + $('.hot-cate').find('li').eq(nowIndex).trigger('click'); | ||
139 | 147 | ||
140 | //处理current样式 | 148 | //处理current样式 |
141 | $(this).addClass('current').siblings().removeClass('current'); | 149 | $(this).addClass('current').siblings().removeClass('current'); |
1 | $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | 1 | $tip: sprite-map("passport/tip/*.png", $spacing: 10px); |
2 | 2 | ||
3 | -@import "login", "register", "back", "welcome"; | ||
4 | - | ||
5 | .passport-page { | 3 | .passport-page { |
6 | width: 1150px; | 4 | width: 1150px; |
7 | margin-left: auto; | 5 | margin-left: auto; |
@@ -207,4 +205,6 @@ $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | @@ -207,4 +205,6 @@ $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | ||
207 | margin: 0 auto; | 205 | margin: 0 auto; |
208 | margin-top: 50px; | 206 | margin-top: 50px; |
209 | } | 207 | } |
210 | -} | ||
208 | +} | ||
209 | + | ||
210 | +@import "login", "register", "back", "welcome", "third"; |
@@ -121,4 +121,17 @@ $third: sprite-map("passport/third/*.png"); | @@ -121,4 +121,17 @@ $third: sprite-map("passport/third/*.png"); | ||
121 | background: sprite($third, renren) no-repeat; | 121 | background: sprite($third, renren) no-repeat; |
122 | } | 122 | } |
123 | } | 123 | } |
124 | + | ||
125 | + .caps-lock { | ||
126 | + position: absolute; | ||
127 | + color: #666; | ||
128 | + border: #ffe57d; | ||
129 | + background: #fff6d2; | ||
130 | + white-space: nowrap; | ||
131 | + top: 8px; | ||
132 | + left: 278px; | ||
133 | + padding: 0 20px; | ||
134 | + height: 27px; | ||
135 | + line-height: 30px; | ||
136 | + } | ||
124 | } | 137 | } |
web-static/sass/passport/_third.scss
0 → 100644
1 | +.yohobindbtn { | ||
2 | + display: block; | ||
3 | + width:210px; | ||
4 | + height: 45px; | ||
5 | + line-height: 45px; | ||
6 | + background-color: #f02200; | ||
7 | + color: #fff; | ||
8 | + font-size: 16px; | ||
9 | + text-align: center; | ||
10 | +} | ||
11 | +.hide { | ||
12 | + display: none; | ||
13 | +} | ||
14 | +.novisiable { | ||
15 | + visibility: hidden; | ||
16 | +} | ||
17 | +.actlevel { | ||
18 | + background-color: #f02200 !important; | ||
19 | + color: white !important; | ||
20 | +} | ||
21 | +.mask { | ||
22 | + position: fixed; | ||
23 | + top: 0; | ||
24 | + right: 0; | ||
25 | + bottom: 0; | ||
26 | + left: 0; | ||
27 | + z-index: 1050; | ||
28 | + overflow-x: hidden; | ||
29 | + -webkit-overflow-scrolling: touch; | ||
30 | + outline: 0; | ||
31 | +} | ||
32 | + | ||
33 | +.bindwrapper { | ||
34 | + margin: 0 auto; | ||
35 | + width: 980px; | ||
36 | + min-height: 450px; | ||
37 | + padding-top: 122px; | ||
38 | +} | ||
39 | +.welcomeword { | ||
40 | + width: 100%; | ||
41 | + text-align: center; | ||
42 | + font-size: 22px; | ||
43 | + line-height: 22px; | ||
44 | + color: #545454; | ||
45 | + margin-bottom: 15px; | ||
46 | + .yoho { | ||
47 | + color: #e12000; | ||
48 | + } | ||
49 | +} | ||
50 | +.safeword { | ||
51 | + width: 100%; | ||
52 | + text-align: center; | ||
53 | + font-size: 16px; | ||
54 | + line-height: 16px; | ||
55 | + color: #545454; | ||
56 | + margin-bottom: 63px; | ||
57 | +} | ||
58 | +.yohobindrow { | ||
59 | + width: 480px; | ||
60 | + margin: 0 auto 22px; | ||
61 | + height: 40px; | ||
62 | + .name { | ||
63 | + float: left; | ||
64 | + text-align: right; | ||
65 | + margin-right: 14px; | ||
66 | + width: 96px; | ||
67 | + } | ||
68 | + .areatag { | ||
69 | + height: 30px; | ||
70 | + line-height: 30px; | ||
71 | + } | ||
72 | + .phonetag, | ||
73 | + .setpwdtag { | ||
74 | + height: 47px; | ||
75 | + line-height: 47px; | ||
76 | + } | ||
77 | + .content { | ||
78 | + float: left; | ||
79 | + text-align: left; | ||
80 | + margin-top: 0; | ||
81 | + padding-left: 0; | ||
82 | + } | ||
83 | + | ||
84 | + &::after { | ||
85 | + display: block; | ||
86 | + content: ''; | ||
87 | + clear: both; | ||
88 | + } | ||
89 | +} | ||
90 | +.sendnotify { | ||
91 | + width: 260px; | ||
92 | + text-align: left; | ||
93 | + margin: 0 auto 18px; | ||
94 | +} | ||
95 | +.validaterow { | ||
96 | + overflow: hidden; | ||
97 | + margin: 0 auto 22px; | ||
98 | + padding-left: 250px; | ||
99 | + .name { | ||
100 | + float: left; | ||
101 | + text-align: right; | ||
102 | + margin-right: 14px; | ||
103 | + width: 96px; | ||
104 | + } | ||
105 | + .areatag { | ||
106 | + height: 30px; | ||
107 | + line-height: 30px; | ||
108 | + } | ||
109 | + .phonetag { | ||
110 | + height: 47px; | ||
111 | + line-height: 47px; | ||
112 | + } | ||
113 | + .content { | ||
114 | + float: left; | ||
115 | + text-align: left; | ||
116 | + } | ||
117 | + &::after { | ||
118 | + display: block; | ||
119 | + content: ''; | ||
120 | + clear: both; | ||
121 | + } | ||
122 | + .validatewrapper { | ||
123 | + float: left; | ||
124 | + height: 45px; | ||
125 | + width: 133px; | ||
126 | + text-align: center; | ||
127 | + line-height: 45px; | ||
128 | + background-color: #d8d8d8; | ||
129 | + color: #000; | ||
130 | + font-size: 13px; | ||
131 | + .yohobindbtn{ | ||
132 | + width: 133px; | ||
133 | + font-size: 13px; | ||
134 | + } | ||
135 | + margin-left: 18px; | ||
136 | + } | ||
137 | +} | ||
138 | +.validatepicrow { | ||
139 | + overflow: hidden; | ||
140 | + margin: 0 auto 22px; | ||
141 | + padding-left: 250px; | ||
142 | + .name { | ||
143 | + float: left; | ||
144 | + text-align: right; | ||
145 | + margin-right: 14px; | ||
146 | + width: 96px; | ||
147 | + } | ||
148 | + .areatag { | ||
149 | + height: 30px; | ||
150 | + line-height: 30px; | ||
151 | + } | ||
152 | + .yohophonewrapper { | ||
153 | + | ||
154 | + } | ||
155 | + .phonetag { | ||
156 | + height: 47px; | ||
157 | + line-height: 47px; | ||
158 | + } | ||
159 | + .content { | ||
160 | + float: left; | ||
161 | + text-align: left; | ||
162 | + } | ||
163 | + &::after { | ||
164 | + display: block; | ||
165 | + content: ''; | ||
166 | + clear: both; | ||
167 | + } | ||
168 | + .validatewrapper { | ||
169 | + float: left; | ||
170 | + height: 45px; | ||
171 | + text-align: center; | ||
172 | + line-height: 45px; | ||
173 | + color: #000; | ||
174 | + font-size: 13px; | ||
175 | + .yohobindbtn{ | ||
176 | + width: 133px; | ||
177 | + font-size: 13px; | ||
178 | + } | ||
179 | + margin-left: 18px; | ||
180 | + } | ||
181 | + .change-captcha { | ||
182 | + cursor: pointer; | ||
183 | + color: #f02200; | ||
184 | + text-decoration: underline; | ||
185 | + } | ||
186 | +} | ||
187 | +.setpwdwrapper { | ||
188 | + margin-bottom: 10px; | ||
189 | + height: 45px; | ||
190 | +} | ||
191 | +.safelevel { | ||
192 | + width: 291px; | ||
193 | + height: 15px; | ||
194 | + margin: 0 auto; | ||
195 | + text-align: right; | ||
196 | + font-size: 10px; | ||
197 | + color: #000; | ||
198 | + | ||
199 | + span { | ||
200 | + width: 28px; | ||
201 | + height: 15px; | ||
202 | + line-height: 15px; | ||
203 | + background-color: #e5e5e5; | ||
204 | + font-size: 10px; | ||
205 | + color: #000; | ||
206 | + margin-right: 4px; | ||
207 | + padding: 1px 8px; | ||
208 | + } | ||
209 | +} | ||
210 | +.green .color { | ||
211 | + background-color: #0f0; | ||
212 | + color: #fff; | ||
213 | +} | ||
214 | +.yellow .color { | ||
215 | + background-color: #ff0; | ||
216 | + color: #fff; | ||
217 | +} | ||
218 | +.red .color { | ||
219 | + background-color: #f00; | ||
220 | + color: #fff; | ||
221 | +} | ||
222 | +.yohoselectarea { | ||
223 | + position: relative; | ||
224 | + box-sizing: border-box; | ||
225 | + width: 131px; | ||
226 | + height: 33px; | ||
227 | + .optionshow { | ||
228 | + width: 100%; | ||
229 | + height: 100%; | ||
230 | + padding-left: 16px; | ||
231 | + border: 1px solid #d9d9d9; | ||
232 | + .areaname { | ||
233 | + display: block; | ||
234 | + float: left; | ||
235 | + width: 110px; | ||
236 | + height: 100%; | ||
237 | + line-height: 33px; | ||
238 | + font-size: 13px; | ||
239 | + color: #000; | ||
240 | + } | ||
241 | + .righttag { | ||
242 | + display: block; | ||
243 | + float: left; | ||
244 | + width: 21px; | ||
245 | + height: 100%; | ||
246 | + line-height: 33px; | ||
247 | + background-color: #d8d8d8; | ||
248 | + background-image: url('../img/arrowbottom.png'); | ||
249 | + background-repeat: no-repeat; | ||
250 | + background-position: center center; | ||
251 | + } | ||
252 | + } | ||
253 | + .optionslist { | ||
254 | + background-color: white; | ||
255 | + position: absolute; | ||
256 | + top: 35px; | ||
257 | + left: 0; | ||
258 | + width: 149px; | ||
259 | + z-index: 2; | ||
260 | + .optionitem { | ||
261 | + height: 33px; | ||
262 | + line-height: 33px; | ||
263 | + padding-left: 16px; | ||
264 | + font-size: 13px; | ||
265 | + &:hover { | ||
266 | + background-color: #dfdfdf; | ||
267 | + } | ||
268 | + } | ||
269 | + } | ||
270 | +} | ||
271 | +.yohophonewrapper { | ||
272 | + width: 271px; | ||
273 | + height: 47px; | ||
274 | + border: 1px solid #d9d9d9; | ||
275 | + position: relative; | ||
276 | + .areanum { | ||
277 | + float: left; | ||
278 | + height: 100%; | ||
279 | + width: 63px; | ||
280 | + line-height: 47px; | ||
281 | + text-align: center; | ||
282 | + color: #000; | ||
283 | + background-color: #d8d8d8; | ||
284 | + } | ||
285 | + .phonenum { | ||
286 | + outline: none; | ||
287 | + box-sizing: border-box; | ||
288 | + float: left; | ||
289 | + height: 45px; | ||
290 | + width: 205px; | ||
291 | + line-height: 38px; | ||
292 | + padding-left: 8px; | ||
293 | + border: none; | ||
294 | + color: #000; | ||
295 | + } | ||
296 | +} | ||
297 | +.protoctolwrapper{ | ||
298 | + width: 350px; | ||
299 | + margin: 38px auto 0; | ||
300 | + padding-left: 85px; | ||
301 | + overflow: hidden; | ||
302 | + .choosewrapper { | ||
303 | + float: left; | ||
304 | + width: 13px; | ||
305 | + height: 13px; | ||
306 | + background-color: #4c4c4c; | ||
307 | + background-image: none; | ||
308 | + background-position: center center; | ||
309 | + background-repeat: no-repeat; | ||
310 | + margin-right: 14px; | ||
311 | + } | ||
312 | + .choosetag { | ||
313 | + width: 100%; | ||
314 | + height: 100%; | ||
315 | + display: block; | ||
316 | + opacity: 0; | ||
317 | + filter: alpha(opacity=0); | ||
318 | + } | ||
319 | + span { | ||
320 | + float: left; | ||
321 | + } | ||
322 | + .protoctol { | ||
323 | + color: #f02200; | ||
324 | + text-decoration: underline; | ||
325 | + } | ||
326 | + &::after { | ||
327 | + display: block; | ||
328 | + content: ''; | ||
329 | + clear: both; | ||
330 | + } | ||
331 | +} | ||
332 | +.confirmwrapper { | ||
333 | + overflow: hidden; | ||
334 | + margin-top: 47px !important; | ||
335 | +} | ||
336 | +.btnwrapper{ | ||
337 | + width: 350px; | ||
338 | + margin: 20px auto 0; | ||
339 | + padding-left: 85px; | ||
340 | +} | ||
341 | +.thirdloginwrapper { | ||
342 | + margin: 0 auto; | ||
343 | + width: 1150px; | ||
344 | + min-height: 450px; | ||
345 | + padding-top: 160px; | ||
346 | + .safeword { | ||
347 | + margin-bottom: 30px; | ||
348 | + } | ||
349 | + .left { | ||
350 | + box-sizing: border-box; | ||
351 | + float: left; | ||
352 | + width: 450px; | ||
353 | + height: 318px; | ||
354 | + border-right: 1px solid #e5e5e5; | ||
355 | + } | ||
356 | + .right { | ||
357 | + box-sizing: border-box; | ||
358 | + float: right; | ||
359 | + width: 696px; | ||
360 | + padding-top: 64px; | ||
361 | + height: 318px; | ||
362 | + } | ||
363 | + .gobuy, | ||
364 | + .completeprofile { | ||
365 | + float: left; | ||
366 | + display: inline-block; | ||
367 | + width: 94px; | ||
368 | + height: 94px; | ||
369 | + line-height: 94px; | ||
370 | + text-align: center; | ||
371 | + border-radius: 50%; | ||
372 | + background-color: #f02200; | ||
373 | + color: white; | ||
374 | + } | ||
375 | + .gobuy { | ||
376 | + margin-left: 228px; | ||
377 | + margin-right: 80px; | ||
378 | + } | ||
379 | +} | ||
380 | +.bindsuccesswrapper { | ||
381 | + margin: 0 auto; | ||
382 | + width: 1150px; | ||
383 | + min-height: 450px; | ||
384 | + padding-top: 160px; | ||
385 | + .successwrapper { | ||
386 | + width: 320px; | ||
387 | + height: 29px; | ||
388 | + margin: 0 auto 16px; | ||
389 | + .successtag { | ||
390 | + display: inline-block; | ||
391 | + margin-right: 28px; | ||
392 | + float: left; | ||
393 | + width: 29px; | ||
394 | + height: 29px; | ||
395 | + background-image: url('../img/bindsuccess.png'); | ||
396 | + background-repeat: no-repeat; | ||
397 | + } | ||
398 | + .congratulation { | ||
399 | + display: inline-block; | ||
400 | + height: 29px; | ||
401 | + line-height: 29px; | ||
402 | + font-size: 22px; | ||
403 | + } | ||
404 | + } | ||
405 | + .info { | ||
406 | + text-align: center; | ||
407 | + font-size: 16px; | ||
408 | + margin-bottom: 48px; | ||
409 | + } | ||
410 | + .gobuynow { | ||
411 | + margin: 0 auto; | ||
412 | + } | ||
413 | +} | ||
414 | +.bindconfrimwrapper { | ||
415 | + width: 900px; | ||
416 | + height: 439px; | ||
417 | + margin: 153px auto; | ||
418 | + background-color: #fff; | ||
419 | + box-sizing: border-box; | ||
420 | + padding-top: 37px; | ||
421 | + .topwrapper { | ||
422 | + width: 281px; | ||
423 | + height: 90px; | ||
424 | + margin: 0 auto 32px; | ||
425 | + .userphoto { | ||
426 | + width: 90px; | ||
427 | + height: 90px; | ||
428 | + vertical-align: middle; | ||
429 | + border-radius: 50%; | ||
430 | + margin-right: 22px; | ||
431 | + } | ||
432 | + .username{ | ||
433 | + vertical-align: middle; | ||
434 | + } | ||
435 | + } | ||
436 | + .usertaginfo { | ||
437 | + text-align: center; | ||
438 | + font-size: 16px; | ||
439 | + color: #545454; | ||
440 | + margin-bottom: 10px; | ||
441 | + } | ||
442 | + .usertagremind { | ||
443 | + text-align: center; | ||
444 | + font-size: 14px; | ||
445 | + color: #000; | ||
446 | + margin-bottom: 47px; | ||
447 | + } | ||
448 | + .otherphone{ | ||
449 | + margin: 0 auto 64px; | ||
450 | + } | ||
451 | + .logindirectly { | ||
452 | + display: block; | ||
453 | + text-align: center; | ||
454 | + text-decoration: underline; | ||
455 | + color: #f02200; | ||
456 | + } | ||
457 | +} | ||
458 | +.yohobindbtn[disabled] { | ||
459 | + background-color: #e5e5e5; | ||
460 | + cursor: not-allowed; | ||
461 | +} | ||
462 | +.gobindwrapper { | ||
463 | + width: 100%; | ||
464 | + height: 45px; | ||
465 | + margin-bottom: 70px; | ||
466 | + &::after { | ||
467 | + display: block; | ||
468 | + content: ''; | ||
469 | + clear: both; | ||
470 | + } | ||
471 | + .myphone { | ||
472 | + float: left; | ||
473 | + margin-left: 20px; | ||
474 | + width: 193px; | ||
475 | + } | ||
476 | + .logindirectly { | ||
477 | + display: inline-block; | ||
478 | + } | ||
479 | + .validaterow { | ||
480 | + overflow: hidden; | ||
481 | + margin: 0 auto 22px; | ||
482 | + padding-left: 222px; | ||
483 | + float: left; | ||
484 | + .name { | ||
485 | + float: left; | ||
486 | + text-align: right; | ||
487 | + margin-right: 14px; | ||
488 | + width: 96px; | ||
489 | + } | ||
490 | + .areatag { | ||
491 | + height: 30px; | ||
492 | + line-height: 30px; | ||
493 | + } | ||
494 | + .phonetag { | ||
495 | + height: 47px; | ||
496 | + line-height: 47px; | ||
497 | + } | ||
498 | + .content { | ||
499 | + float: left; | ||
500 | + text-align: left; | ||
501 | + .validatacode { | ||
502 | + outline: none; | ||
503 | + box-sizing: border-box; | ||
504 | + float: left; | ||
505 | + height: 45px; | ||
506 | + width: 113px; | ||
507 | + line-height: 38px; | ||
508 | + padding-left: 8px; | ||
509 | + border: 1px solid #d9d9d9; | ||
510 | + color: #000; | ||
511 | + } | ||
512 | + } | ||
513 | + .validatewrapper { | ||
514 | + float: left; | ||
515 | + height: 45px; | ||
516 | + width: 133px; | ||
517 | + text-align: center; | ||
518 | + line-height: 45px; | ||
519 | + background-color: #d8d8d8; | ||
520 | + color: #000; | ||
521 | + font-size: 13px; | ||
522 | + margin-left: 18px; | ||
523 | + .yohobindbtn{ | ||
524 | + width: 133px; | ||
525 | + font-size: 13px; | ||
526 | + } | ||
527 | + | ||
528 | + } | ||
529 | +} | ||
530 | + | ||
531 | +} | ||
532 | +.gobindbottomwrapper { | ||
533 | + width: 100%; | ||
534 | + padding-left: 341px; | ||
535 | + .logindirectly { | ||
536 | + display: inline-block; | ||
537 | + float: left; | ||
538 | + margin-right: 36px; | ||
539 | + text-decoration: underline; | ||
540 | + color: #f02200; | ||
541 | + } | ||
542 | +} | ||
543 | +.pwd-tips { | ||
544 | + position: absolute; | ||
545 | + top: -10px; | ||
546 | + left: 285px; | ||
547 | + width: 158px !important; | ||
548 | + height: 70px; | ||
549 | + padding-top: 7px; | ||
550 | + font-size: 12px; | ||
551 | + background: url(http://6.url.cn/zc/chs/img/pwd_sprite.png?v=10069) no-repeat; | ||
552 | +} | ||
553 | +.pwd-tips { | ||
554 | + position: absolute; | ||
555 | + top: -10px; | ||
556 | + left: 285px; | ||
557 | + width: 158px !important; | ||
558 | + height: 70px; | ||
559 | + padding-top: 7px; | ||
560 | + font-size: 12px; | ||
561 | + background: url(http://6.url.cn/zc/chs/img/pwd_sprite.png?v=10069) no-repeat | ||
562 | +} | ||
563 | + | ||
564 | +.pwd-tips div { | ||
565 | + height: 22px; | ||
566 | + line-height: 22px; | ||
567 | + margin-left: 15px; | ||
568 | + padding-left: 18px; | ||
569 | +} | ||
570 | + | ||
571 | +.pwd-tips .default { | ||
572 | + background: url(http://6.url.cn/zc/chs/img/pwd_sprite.png?v=10069) 0 -215px no-repeat; | ||
573 | +} | ||
574 | + | ||
575 | +.pwd-tips .yes { | ||
576 | + background: url(http://6.url.cn/zc/chs/img/pwd_sprite.png?v=10069) 0 -247px no-repeat; | ||
577 | +} | ||
578 | + | ||
579 | +.pwd-tips .no { | ||
580 | + background: url(http://6.url.cn/zc/chs/img/pwd_sprite.png?v=10069) 0 -281px no-repeat; | ||
581 | +} | ||
582 | + | ||
583 | +.pwd-tips .red { | ||
584 | + color: red !important; | ||
585 | +} | ||
586 | + | ||
587 | +.msg-tip { | ||
588 | + position: absolute; | ||
589 | + top: 17px; | ||
590 | + left: 285px; | ||
591 | + white-space: nowrap; | ||
592 | +} | ||
593 | + | ||
594 | +.msg-tip img { | ||
595 | + height: 12px; | ||
596 | + width: 12px; | ||
597 | +} | ||
598 | +.backdrop { | ||
599 | + position: fixed; | ||
600 | + background: #000; | ||
601 | + width: 100%; | ||
602 | + height: 100%; | ||
603 | + left: 0 ; | ||
604 | + top: 0 ; | ||
605 | + bottom: 0; | ||
606 | + right: 0; | ||
607 | + opacity: .5; | ||
608 | + filter: alpha(opacity=50); | ||
609 | +} |
@@ -170,15 +170,19 @@ | @@ -170,15 +170,19 @@ | ||
170 | float: left; | 170 | float: left; |
171 | line-height: 30px; | 171 | line-height: 30px; |
172 | margin-right: 5px; | 172 | margin-right: 5px; |
173 | + cursor: pointer; | ||
173 | 174 | ||
174 | span { | 175 | span { |
175 | margin: 0 3px; | 176 | margin: 0 3px; |
176 | - cursor: pointer; | ||
177 | -moz-user-select: none; | 177 | -moz-user-select: none; |
178 | 178 | ||
179 | &:first-child { | 179 | &:first-child { |
180 | margin-left: 10px; | 180 | margin-left: 10px; |
181 | } | 181 | } |
182 | + | ||
183 | + &.hover { | ||
184 | + color: #f00; | ||
185 | + } | ||
182 | } | 186 | } |
183 | } | 187 | } |
184 | 188 | ||
@@ -314,12 +318,13 @@ | @@ -314,12 +318,13 @@ | ||
314 | .senior-sub { | 318 | .senior-sub { |
315 | box-sizing: border-box; | 319 | box-sizing: border-box; |
316 | position: absolute; | 320 | position: absolute; |
317 | - padding: 15px 0; | ||
318 | - left: 0; | ||
319 | - right: 0; | 321 | + padding: 15px 0 15px 91px; |
322 | + left: -91px; | ||
323 | + right: -1px; | ||
320 | top: 39px; | 324 | top: 39px; |
321 | background: #fff; | 325 | background: #fff; |
322 | - border: 1px solid #eaeceb; | 326 | + border: 1px solid #dfdfdf; |
327 | + border-top-color: #eaeceb; | ||
323 | z-index: 2; | 328 | z-index: 2; |
324 | 329 | ||
325 | ul { | 330 | ul { |
1 | .new-sale-page { | 1 | .new-sale-page { |
2 | + | ||
3 | + /*Modify by chenglong.wang at 2016/1/18 | ||
4 | + *sale列表页面轮播图 | ||
5 | + */ | ||
6 | + .sale-list-banner { | ||
7 | + width: 100%; | ||
8 | + position: relative; | ||
9 | + | ||
10 | + ul { | ||
11 | + overflow: hidden; | ||
12 | + width: 100%; | ||
13 | + position: relative; | ||
14 | + z-index: 1; | ||
15 | + | ||
16 | + li { | ||
17 | + width: 100%; | ||
18 | + height: 100%; | ||
19 | + display: block; | ||
20 | + float: left; | ||
21 | + position: absolute; | ||
22 | + top: 0; | ||
23 | + left: 0; | ||
24 | + } | ||
25 | + } | ||
26 | + | ||
27 | + .sale-list-pagation { | ||
28 | + z-index: 2; | ||
29 | + position: absolute; | ||
30 | + left: 0; | ||
31 | + bottom: 50px; | ||
32 | + width: 100%; | ||
33 | + height: 20px; | ||
34 | + text-align: center; | ||
35 | + | ||
36 | + div { | ||
37 | + display: inline-block; | ||
38 | + } | ||
39 | + | ||
40 | + span { | ||
41 | + display: block; | ||
42 | + width: 20px; | ||
43 | + height: 20px; | ||
44 | + background: image_url('product/default-normal.png'); | ||
45 | + float: left; | ||
46 | + margin: 0 10px; | ||
47 | + cursor: pointer; | ||
48 | + | ||
49 | + &.active { | ||
50 | + background: image_url('product/default-active.png'); | ||
51 | + } | ||
52 | + } | ||
53 | + } | ||
54 | + } | ||
55 | + | ||
2 | .header-title { | 56 | .header-title { |
3 | position: relative; | 57 | position: relative; |
4 | width: 100%; | 58 | width: 100%; |
@@ -339,35 +339,34 @@ class HomeModel | @@ -339,35 +339,34 @@ class HomeModel | ||
339 | } | 339 | } |
340 | 340 | ||
341 | $data = IndexData::channelData(); | 341 | $data = IndexData::channelData(); |
342 | - | ||
343 | if (!empty($data['data']['list'])) { | 342 | if (!empty($data['data']['list'])) { |
344 | $build = array(); | 343 | $build = array(); |
345 | foreach ($data['data']['list'] as $value) { | 344 | foreach ($data['data']['list'] as $value) { |
346 | $build = array(); | 345 | $build = array(); |
347 | switch (intval($value['channel_id'])) { | 346 | switch (intval($value['channel_id'])) { |
348 | case 1: | 347 | case 1: |
349 | - $build['href'] = '/boys'; | 348 | + $build['href'] = Helpers::getFilterUrl($value['url']); |
350 | $build['title'] = '男生'; | 349 | $build['title'] = '男生'; |
351 | $build['entitle'] = 'BOYS'; | 350 | $build['entitle'] = 'BOYS'; |
352 | break; | 351 | break; |
353 | case 2: | 352 | case 2: |
354 | - $build['href'] = '/girls'; | 353 | + $build['href'] = Helpers::getFilterUrl($value['url']); |
355 | $build['title'] = '女生'; | 354 | $build['title'] = '女生'; |
356 | $build['entitle'] = 'GIRLS'; | 355 | $build['entitle'] = 'GIRLS'; |
357 | break; | 356 | break; |
358 | case 3: | 357 | case 3: |
359 | - $build['href'] = '/kids'; | 358 | + $build['href'] = Helpers::getFilterUrl($value['url']); |
360 | $build['title'] = '潮童'; | 359 | $build['title'] = '潮童'; |
361 | $build['entitle'] = 'KIDS'; | 360 | $build['entitle'] = 'KIDS'; |
362 | break; | 361 | break; |
363 | case 4: | 362 | case 4: |
364 | - $build['href'] = '/lifestyle'; | 363 | + $build['href'] = Helpers::getFilterUrl($value['url']); |
365 | $build['title'] = '创意生活'; | 364 | $build['title'] = '创意生活'; |
366 | $build['entitle'] = 'LIFESTYLE'; | 365 | $build['entitle'] = 'LIFESTYLE'; |
367 | break; | 366 | break; |
368 | case 5: | 367 | case 5: |
369 | $result['showYohood'] = true; | 368 | $result['showYohood'] = true; |
370 | - $result['yohoodHref'] = 'http://yohood.cn'; | 369 | + $result['yohoodHref'] = Helpers::getFilterUrl($value['url']); |
371 | break; | 370 | break; |
372 | default: | 371 | default: |
373 | continue; | 372 | continue; |
@@ -238,6 +238,7 @@ class DetailModel | @@ -238,6 +238,7 @@ class DetailModel | ||
238 | $colorArr['colorNum'] = isset($colorStorageGroup[ $colorArr['skcId'] ][$sizeName]) ? $colorStorageGroup[ $colorArr['skcId'] ][$sizeName] : 0; | 238 | $colorArr['colorNum'] = isset($colorStorageGroup[ $colorArr['skcId'] ][$sizeName]) ? $colorStorageGroup[ $colorArr['skcId'] ][$sizeName] : 0; |
239 | $colorGroup[$i]['color'][] = $colorArr; | 239 | $colorGroup[$i]['color'][] = $colorArr; |
240 | } | 240 | } |
241 | + $colorGroup[$i]['sizeName'] = $sizeName; | ||
241 | 242 | ||
242 | ++ $i; | 243 | ++ $i; |
243 | } | 244 | } |
@@ -246,6 +247,7 @@ class DetailModel | @@ -246,6 +247,7 @@ class DetailModel | ||
246 | foreach ($colorList as $value) { | 247 | foreach ($colorList as $value) { |
247 | // 各个尺码的颜色,每行显示一个颜色的对应尺码 | 248 | // 各个尺码的颜色,每行显示一个颜色的对应尺码 |
248 | $sizeGroup[$i]['size'] = $sizeList[ $value['skcId'] ]; | 249 | $sizeGroup[$i]['size'] = $sizeList[ $value['skcId'] ]; |
250 | + $sizeGroup[$i]['colorId'] = $value['skcId']; | ||
249 | // 默认颜色 | 251 | // 默认颜色 |
250 | $colorGroup[0]['color'][] = $value; | 252 | $colorGroup[0]['color'][] = $value; |
251 | 253 |
@@ -38,20 +38,14 @@ class BrandsController extends WebAction | @@ -38,20 +38,14 @@ class BrandsController extends WebAction | ||
38 | */ | 38 | */ |
39 | public function brandinfoAction() | 39 | public function brandinfoAction() |
40 | { | 40 | { |
41 | - $result = array(); | ||
42 | - | ||
43 | do { | 41 | do { |
44 | /* 判断是不是AJAX请求 */ | 42 | /* 判断是不是AJAX请求 */ |
45 | if (!$this->isAjax()) { | 43 | if (!$this->isAjax()) { |
46 | break; | 44 | break; |
47 | } | 45 | } |
48 | - $brandId = $this->get('brandId',0); | ||
49 | - $uid=$this->getUid(false); | ||
50 | - $brandId=144; | ||
51 | - BrandsModel::getBrandInfo($brandId, $uid); | ||
52 | - | ||
53 | - | ||
54 | - | 46 | + $brandId = $this->get('brandId', 0); |
47 | + $uid = $this->getUid(false); | ||
48 | + $data = BrandsModel::getBrandInfo($brandId, $uid); | ||
55 | $result = array( | 49 | $result = array( |
56 | 'code' => 200, | 50 | 'code' => 200, |
57 | 'brand' => $data | 51 | 'brand' => $data |
@@ -62,9 +56,10 @@ class BrandsController extends WebAction | @@ -62,9 +56,10 @@ class BrandsController extends WebAction | ||
62 | $this->echoJson($result); | 56 | $this->echoJson($result); |
63 | } | 57 | } |
64 | 58 | ||
65 | - /** | ||
66 | - * 品牌一览 | 59 | + /* |
60 | + * 品牌list | ||
67 | */ | 61 | */ |
62 | + | ||
68 | public function indexAction() | 63 | public function indexAction() |
69 | { | 64 | { |
70 | $headerdata = array( | 65 | $headerdata = array( |
@@ -7,6 +7,7 @@ use Plugin\HelperSearch; | @@ -7,6 +7,7 @@ use Plugin\HelperSearch; | ||
7 | use LibModels\Web\Product\BrandData; | 7 | use LibModels\Web\Product\BrandData; |
8 | use Index\HomeModel; | 8 | use Index\HomeModel; |
9 | use Product\SearchModel; | 9 | use Product\SearchModel; |
10 | +use Plugin\Helpers; | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * 品牌首页模板数据模型 | 13 | * 品牌首页模板数据模型 |
@@ -80,7 +81,7 @@ class BrandsModel | @@ -80,7 +81,7 @@ class BrandsModel | ||
80 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); | 81 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); |
81 | 82 | ||
82 | // 组合搜索分类url | 83 | // 组合搜索分类url |
83 | - $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); | 84 | + $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['sortCondition']); |
84 | 85 | ||
85 | //组合搜索品牌url | 86 | //组合搜索品牌url |
86 | $urlList['brand'] = HelperSearch::getBrandUrl($customOptions); | 87 | $urlList['brand'] = HelperSearch::getBrandUrl($customOptions); |
@@ -108,32 +109,41 @@ class BrandsModel | @@ -108,32 +109,41 @@ class BrandsModel | ||
108 | { | 109 | { |
109 | $switchParams = self::switchBrandParams($channel); | 110 | $switchParams = self::switchBrandParams($channel); |
110 | $brandTop = array(); | 111 | $brandTop = array(); |
111 | - /* | ||
112 | - * $item1 = array( | ||
113 | - 'name' => '所有品牌', | ||
114 | - 'src' => $imgsrc, | ||
115 | - 'url' => '' | ||
116 | - ); | ||
117 | - */ | ||
118 | $brandAds = array(); | 112 | $brandAds = array(); |
119 | $brandList = array(); | 113 | $brandList = array(); |
120 | $res = BrandData::getTopBanner($switchParams['brandCode'], $switchParams['channelType']); | 114 | $res = BrandData::getTopBanner($switchParams['brandCode'], $switchParams['channelType']); |
115 | + //头部10个品牌图块 | ||
116 | + if (isset($res['brandTop'][1]['data']['list']) && $res['brandTop'][1]['data']['list']) { | ||
117 | + foreach ($res['brandTop'][1]['data']['list'] as $tbk => $tbv) { | ||
118 | + $imgUrlTmp = explode("?", $tbv['src']); | ||
119 | + $urlTmp = explode("?", $tbv['url']); | ||
120 | + $topBrandTmp = array( | ||
121 | + 'name' => $tbv['name'], | ||
122 | + 'src' => Helpers::getImageUrl($imgUrlTmp[0], 80, 50, 3), | ||
123 | + 'url' => str_replace('m.', '', $urlTmp[0]), | ||
124 | + ); | ||
125 | + $brandAds[$tbk] = $topBrandTmp; | ||
126 | + } | ||
127 | + } | ||
128 | + //头部品牌图块 | ||
121 | if (isset($res['brandTop'][0]['data']) && $res['brandTop'][0]['data']) { | 129 | if (isset($res['brandTop'][0]['data']) && $res['brandTop'][0]['data']) { |
122 | foreach ($res['brandTop'][0]['data'] as $tk => $tv) { | 130 | foreach ($res['brandTop'][0]['data'] as $tk => $tv) { |
123 | - $imgUrl = explode("?", $tv['src']); | 131 | + $imgUrlTmp = explode("?", $tv['src']); |
132 | + $urlTmp = explode("?", $tv['url']); | ||
124 | $topTmp = array( | 133 | $topTmp = array( |
125 | 'name' => $tv['title'], | 134 | 'name' => $tv['title'], |
126 | - 'src' => $imgUrl[0], | ||
127 | - 'url' => $tv['url'], | ||
128 | - 'items' => array() | 135 | + 'src' => $imgUrlTmp[0], |
136 | + 'url' => $urlTmp[0], | ||
137 | + 'items' => $brandAds | ||
129 | ); | 138 | ); |
130 | $brandTop[$tk] = $topTmp; | 139 | $brandTop[$tk] = $topTmp; |
131 | } | 140 | } |
132 | } | 141 | } |
142 | + //品牌list | ||
133 | if (isset($res['brandList']['brands']) && $res['brandList']['brands']) { | 143 | if (isset($res['brandList']['brands']) && $res['brandList']['brands']) { |
134 | foreach ($res['brandList']['brands'] as $lk => $lv) { | 144 | foreach ($res['brandList']['brands'] as $lk => $lv) { |
145 | + $listTmp = array(); | ||
135 | if (isset($lv) && $lv) { | 146 | if (isset($lv) && $lv) { |
136 | - $listTmp = array(); | ||
137 | foreach ($lv as $ltk => $ltv) { | 147 | foreach ($lv as $ltk => $ltv) { |
138 | $listTmp[$ltk] = array( | 148 | $listTmp[$ltk] = array( |
139 | 'name' => $ltv['brand_name'], | 149 | 'name' => $ltv['brand_name'], |
@@ -158,33 +168,20 @@ class BrandsModel | @@ -158,33 +168,20 @@ class BrandsModel | ||
158 | */ | 168 | */ |
159 | public static function getBrandInfo($brandId, $uid) | 169 | public static function getBrandInfo($brandId, $uid) |
160 | { | 170 | { |
161 | - $imgsrc = 'http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; | ||
162 | - $data = array( | ||
163 | - 'key' => '1000011', | ||
164 | - 'icon' => $imgsrc, | ||
165 | - 'title' => '优显led触控台灯', | ||
166 | - 'content' => '优显led触控台灯优显led触控台灯优显led触控台灯优显led触控台灯', | ||
167 | - 'subtitle' => 'AAAAAA', | ||
168 | - 'imgs' => array( | ||
169 | - array( | ||
170 | - 'src' => $imgsrc | ||
171 | - ), | ||
172 | - array( | ||
173 | - 'src' => $imgsrc | ||
174 | - ), | ||
175 | - array( | ||
176 | - 'src' => $imgsrc | ||
177 | - ) | ||
178 | - ) | ||
179 | - ); | 171 | + $data = array(); |
180 | $res = BrandData::getBrandIntro($brandId, $uid); | 172 | $res = BrandData::getBrandIntro($brandId, $uid); |
181 | -//if(isset($res['data']) && $res['data']){ | ||
182 | -// $data['key']=$brandId; | ||
183 | -// $data['icon']= | ||
184 | -//} | ||
185 | - var_dump($res); | ||
186 | - die(); | ||
187 | - | 173 | + if (isset($res['data']) && $res['data']) { |
174 | + $icoUrlTmp = explode("?", $res['data']['brand_ico']) ; | ||
175 | + $data = array( | ||
176 | + 'key' => $res['data']['brand_id'], | ||
177 | + 'icon' => $icoUrlTmp[0], | ||
178 | + 'title' => $res['data']['brand_name'], | ||
179 | + 'content' =>$res['data']['brand_intro'], | ||
180 | + 'subtitle' => 'FEATURED ITEMS', | ||
181 | + 'imgs' => array(), | ||
182 | + ); | ||
183 | + } | ||
184 | + return $data; | ||
188 | } | 185 | } |
189 | 186 | ||
190 | /* | 187 | /* |
@@ -2,10 +2,9 @@ | @@ -2,10 +2,9 @@ | ||
2 | namespace product; | 2 | namespace product; |
3 | 3 | ||
4 | use Plugin\Images; | 4 | use Plugin\Images; |
5 | -use Plugin\Helpers; | ||
6 | -use Plugin\Cache; | ||
7 | -use Configs\CacheConfig; | ||
8 | -use LibModels\Web\Home\IndexData; | 5 | +use Api\Yohobuy; |
6 | +//use Plugin\Helpers; | ||
7 | +//use LibModels\Web\Home\IndexData; | ||
9 | use \LibModels\Web\Product\HotrankData; | 8 | use \LibModels\Web\Product\HotrankData; |
10 | use \LibModels\Web\Product\SearchData; | 9 | use \LibModels\Web\Product\SearchData; |
11 | 10 | ||
@@ -14,14 +13,14 @@ class HotrankModel { | @@ -14,14 +13,14 @@ class HotrankModel { | ||
14 | /** | 13 | /** |
15 | * 人气单品 一周热卖 | 14 | * 人气单品 一周热卖 |
16 | */ | 15 | */ |
17 | - static public function getSearchData($condition, $options) | 16 | + static public function getSearchData($param,$page,$ajax) |
18 | { | 17 | { |
19 | // 调用接口查询商品数据 | 18 | // 调用接口查询商品数据 |
20 | - $result = SearchData::searchElasticByCondition($condition); | 19 | + $result = SearchData::searchElasticByCondition($param); |
21 | //print_r($result); | 20 | //print_r($result); |
22 | 21 | ||
23 | if(!empty($result)){ | 22 | if(!empty($result)){ |
24 | - $res = self::getProductList($result); | 23 | + $res = self::getProductList($result,$page,$ajax); |
25 | if(!empty($res['popular'])){ | 24 | if(!empty($res['popular'])){ |
26 | $data['popular'] = $res['popular']; | 25 | $data['popular'] = $res['popular']; |
27 | } | 26 | } |
@@ -37,18 +36,16 @@ class HotrankModel { | @@ -37,18 +36,16 @@ class HotrankModel { | ||
37 | /** | 36 | /** |
38 | * 获取分类标签 | 37 | * 获取分类标签 |
39 | */ | 38 | */ |
40 | - static public function getHotranktag($classes) | 39 | + static public function getHotranktag($client_type,$channel,$is_concurrent) |
41 | { | 40 | { |
42 | - $list = SearchData::getClassesData($classes); | ||
43 | - //print_r($list); | 41 | + $list = \LibModels\Web\Product\HotrankData::getHotranktag($client_type,$channel,$is_concurrent); |
44 | $nav = array(); | 42 | $nav = array(); |
45 | - if(!empty($list['data']['sort'])){ | ||
46 | - foreach($list['data']['sort'] as $li=>$lt){ | ||
47 | - $nav[$li]['sid'] = $lt['sort_id']; | ||
48 | - $nav[$li]['textCn'] = $lt['sort_name']; | 43 | + if(!empty($list['data']['list'])){ |
44 | + foreach($list['data']['list'] as $li=>$lt){ | ||
45 | + $nav[$li]['sid'] = $lt['id']; | ||
46 | + $nav[$li]['textCn'] = $lt['tag_name']; | ||
49 | } | 47 | } |
50 | } | 48 | } |
51 | - //print_r($nav); | ||
52 | return $nav; | 49 | return $nav; |
53 | } | 50 | } |
54 | 51 | ||
@@ -56,8 +53,10 @@ class HotrankModel { | @@ -56,8 +53,10 @@ class HotrankModel { | ||
56 | /** | 53 | /** |
57 | * 人气单品 一周热卖 数据处理 | 54 | * 人气单品 一周热卖 数据处理 |
58 | */ | 55 | */ |
59 | - static public function getProductList($result) | 56 | + static public function getProductList($result,$page,$ajax=0) |
60 | { | 57 | { |
58 | + // 调用发起请求 | ||
59 | + Yohobuy::yarConcurrentLoop(); | ||
61 | /*----product start---------*/ | 60 | /*----product start---------*/ |
62 | if(empty($result) || empty($result['data']) || empty($result['data']['product_list'])){ | 61 | if(empty($result) || empty($result['data']) || empty($result['data']['product_list'])){ |
63 | return; | 62 | return; |
@@ -83,26 +82,35 @@ class HotrankModel { | @@ -83,26 +82,35 @@ class HotrankModel { | ||
83 | $product_id = empty($val['product_id']) ? '' : $val['product_id']; | 82 | $product_id = empty($val['product_id']) ? '' : $val['product_id']; |
84 | $re['url'] = 'http://item.yohobuy.com/product/pro_'.$product_id.'_'.$defaultGoodsId.'.html'; | 83 | $re['url'] = 'http://item.yohobuy.com/product/pro_'.$product_id.'_'.$defaultGoodsId.'.html'; |
85 | 84 | ||
86 | - $re['marketPrice'] = (int)$val['market_price'] == (int)$val['sales_price'] ? '' : '¥'.$val['market_price']; | ||
87 | - $re['salePrice'] = empty($val['sales_price']) ? '' : '¥'.$val['sales_price']; | ||
88 | - $re['name'] = $val['product_name']; | ||
89 | - if($key <= 9){ | ||
90 | - $re['rank'] = $key + 1; | ||
91 | - if($key <= 5){ | ||
92 | - $re['img'] = empty($val['default_images']) ? '' : Images::getImageUrl($val['default_images'], 378, 504, 2); | ||
93 | - $popular['list'][] = $re; | ||
94 | - }else{ | ||
95 | - $re['img'] = empty($val['default_images']) ? '' : Images::getImageUrl($val['default_images'], 280, 373, 2); | ||
96 | - $popular['list'][] = $re; | ||
97 | - } | ||
98 | - }else{ | ||
99 | - $re['rank'] = ''; | ||
100 | - $re['thumb'] = empty($val['default_images']) ? '' : Images::getImageUrl($val['default_images'], 280, 373, 2); | ||
101 | - $hot[] = $re; | ||
102 | - } | 85 | + $re['name'] = $val['product_name']; |
86 | + if($key <= 9 && $page == 1 && $ajax == 0){ | ||
87 | + $re['rank'] = $key + 1; | ||
88 | + if($key <= 5){ | ||
89 | + $re['price'] = (int)$val['market_price'] == (int)$val['sales_price'] ? '' : '¥'.$val['market_price']; | ||
90 | + $re['sPrice'] = empty($val['sales_price']) ? '' : '¥'.$val['sales_price']; | ||
91 | + $re['img'] = empty($val['default_images']) ? '' : Images::getImageUrl($val['default_images'], 378, 504, 2); | ||
92 | + $popular['list'][] = $re; | ||
93 | + }else{ | ||
94 | + $re['price'] = (int)$val['market_price'] == (int)$val['sales_price'] ? '' : '¥'.$val['market_price']; | ||
95 | + $re['sPrice'] = empty($val['sales_price']) ? '' : '¥'.$val['sales_price']; | ||
96 | + $re['img'] = empty($val['default_images']) ? '' : Images::getImageUrl($val['default_images'], 280, 373, 2); | ||
97 | + $popular['list'][] = $re; | ||
98 | + } | ||
99 | + }else if ($ajax == 1){ | ||
100 | + $re['marketPrice'] = (int)$val['market_price'] == (int)$val['sales_price'] ? '' : '¥'.$val['market_price']; | ||
101 | + $re['salePrice'] = empty($val['sales_price']) ? '' : '¥'.$val['sales_price']; | ||
102 | + $re['rank'] = ''; | ||
103 | + $re['img'] = empty($val['default_images']) ? '' : Images::getImageUrl($val['default_images'], 280, 373, 2); | ||
104 | + $hot[] = $re; | ||
105 | + }else{ | ||
106 | + $re['marketPrice'] = (int)$val['market_price'] == (int)$val['sales_price'] ? '' : '¥'.$val['market_price']; | ||
107 | + $re['salePrice'] = empty($val['sales_price']) ? '' : '¥'.$val['sales_price']; | ||
108 | + $re['rank'] = ''; | ||
109 | + $re['thumb'] = empty($val['default_images']) ? '' : Images::getImageUrl($val['default_images'], 280, 373, 2); | ||
110 | + $hot[] = $re; | ||
111 | + } | ||
103 | } | 112 | } |
104 | $popular['name'] = '人气单品'; | 113 | $popular['name'] = '人气单品'; |
105 | - | ||
106 | $hotWeek = array( | 114 | $hotWeek = array( |
107 | 'name'=>'一周热卖', | 115 | 'name'=>'一周热卖', |
108 | 'list'=>$hot, | 116 | 'list'=>$hot, |
@@ -18,12 +18,11 @@ class IndexModel | @@ -18,12 +18,11 @@ class IndexModel | ||
18 | { | 18 | { |
19 | $urlList = array(); | 19 | $urlList = array(); |
20 | $searchCondition = SearchModel::searchCondition($customCondition, $customOptions); | 20 | $searchCondition = SearchModel::searchCondition($customCondition, $customOptions); |
21 | - | ||
22 | // 组合搜索商品url | 21 | // 组合搜索商品url |
23 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); | 22 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); |
24 | 23 | ||
25 | // 组合搜索分类url | 24 | // 组合搜索分类url |
26 | - $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); | 25 | + $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['sortCondition']); |
27 | 26 | ||
28 | //用户浏览记录 | 27 | //用户浏览记录 |
29 | //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); | 28 | //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); |
@@ -20,7 +20,7 @@ class NewModel | @@ -20,7 +20,7 @@ class NewModel | ||
20 | // 组合搜索商品url | 20 | // 组合搜索商品url |
21 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); | 21 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); |
22 | // 组合搜索分类url | 22 | // 组合搜索分类url |
23 | - $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); | 23 | + $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['sortCondition']); |
24 | // 组合搜索最新上架url | 24 | // 组合搜索最新上架url |
25 | $urlList['recent'] = HelperSearch::getRecentShelveUrl($searchCondition['condition']); | 25 | $urlList['recent'] = HelperSearch::getRecentShelveUrl($searchCondition['condition']); |
26 | //用户浏览记录 | 26 | //用户浏览记录 |
@@ -23,7 +23,7 @@ class SaleModel | @@ -23,7 +23,7 @@ class SaleModel | ||
23 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); | 23 | $urlList['product'] = HelperSearch::getProductUrl($searchCondition['condition']); |
24 | 24 | ||
25 | // 组合搜索分类url | 25 | // 组合搜索分类url |
26 | - $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); | 26 | + $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['sortCondition']); |
27 | 27 | ||
28 | //组合用户浏览记录url | 28 | //组合用户浏览记录url |
29 | //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); | 29 | //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); |
@@ -112,6 +112,7 @@ class LoginController extends WebAction | @@ -112,6 +112,7 @@ class LoginController extends WebAction | ||
112 | /* 设置登录有效时间30分钟, 防机器刷 */ | 112 | /* 设置登录有效时间30分钟, 防机器刷 */ |
113 | $expire = $this->getSession('_LOGIN_EXPIRE'); | 113 | $expire = $this->getSession('_LOGIN_EXPIRE'); |
114 | if (empty($expire) || $expire < time()) { | 114 | if (empty($expire) || $expire < time()) { |
115 | + $data = array('code' => 400, 'message' => '页面停留时间过长,请刷新页面', 'data' => ''); | ||
115 | break; | 116 | break; |
116 | } | 117 | } |
117 | 118 | ||
@@ -135,13 +136,13 @@ class LoginController extends WebAction | @@ -135,13 +136,13 @@ class LoginController extends WebAction | ||
135 | } | 136 | } |
136 | 137 | ||
137 | $refer = $this->getCookie('refer'); | 138 | $refer = $this->getCookie('refer'); |
138 | - if (empty($refer)) { | ||
139 | - $refer = SITE_MAIN . '/?go=1'; | 139 | + if (empty($refer) || strstr($refer, 'signin.html') || strstr($refer, 'passport/login/index')) { |
140 | + $refer = SITE_MAIN; | ||
140 | } | 141 | } |
141 | else { | 142 | else { |
142 | $refer = rawurldecode($refer); | 143 | $refer = rawurldecode($refer); |
143 | } | 144 | } |
144 | - $data['data']['session'] = Helpers::syncUserSession($data['data']['uid']); | 145 | + $data['data']['session'] = Helpers::syncUserSession($data['data']['uid'],$refer); |
145 | $data['data']['href'] = $refer; | 146 | $data['data']['href'] = $refer; |
146 | 147 | ||
147 | $token = Helpers::makeToken($data['data']['uid']); | 148 | $token = Helpers::makeToken($data['data']['uid']); |
@@ -231,4 +232,12 @@ class LoginController extends WebAction | @@ -231,4 +232,12 @@ class LoginController extends WebAction | ||
231 | return $str; | 232 | return $str; |
232 | } | 233 | } |
233 | 234 | ||
235 | + public function thirdPartyAction() { | ||
236 | + $data = array( | ||
237 | + 'thirdParty' => array( | ||
238 | + ) | ||
239 | + ); | ||
240 | + $this->_view->display('third-party', $data); | ||
241 | + } | ||
242 | + | ||
234 | } | 243 | } |
@@ -2,12 +2,16 @@ | @@ -2,12 +2,16 @@ | ||
2 | use Action\WebAction; | 2 | use Action\WebAction; |
3 | use LibModels\Web\Product\BrandData; | 3 | use LibModels\Web\Product\BrandData; |
4 | 4 | ||
5 | -use LibModels\Web\Product\HotrankData; | 5 | +use \LibModels\Web\Product\HotrankData; |
6 | use product\HotrankModel; | 6 | use product\HotrankModel; |
7 | use LibModels\Web\Home\IndexData; | 7 | use LibModels\Web\Home\IndexData; |
8 | 8 | ||
9 | class IndexController extends WebAction | 9 | class IndexController extends WebAction |
10 | { | 10 | { |
11 | + public $channel; | ||
12 | + public $gender; | ||
13 | + public $road;//频道 | ||
14 | + public $code; | ||
11 | /** | 15 | /** |
12 | * 品牌首页 | 16 | * 品牌首页 |
13 | */ | 17 | */ |
@@ -53,7 +57,7 @@ class IndexController extends WebAction | @@ -53,7 +57,7 @@ class IndexController extends WebAction | ||
53 | } | 57 | } |
54 | 58 | ||
55 | public function hotrankAction() { | 59 | public function hotrankAction() { |
56 | - $this->setWebNavHeader(\Index\HomeModel::COOKIE_NAME_LIFESTYLE); | 60 | + |
57 | $data = array( | 61 | $data = array( |
58 | 'hotrankPage' => true, | 62 | 'hotrankPage' => true, |
59 | 'hotrank' => array( | 63 | 'hotrank' => array( |
@@ -261,30 +265,124 @@ class IndexController extends WebAction | @@ -261,30 +265,124 @@ class IndexController extends WebAction | ||
261 | ) | 265 | ) |
262 | ) | 266 | ) |
263 | ); | 267 | ); |
268 | + | ||
269 | + | ||
270 | + $cookie = $this->getCookie('_Channel'); | ||
271 | + $cookie = 'lifestyle'; | ||
272 | + $this->channel = isset($cookie) ? $cookie : 'boys'; | ||
273 | + switch ($this->channel){ | ||
274 | + case 'boys' : | ||
275 | + $this->gender = '1,3'; | ||
276 | + $this->road = 1; | ||
277 | + $this->code = '80d772d8dff25300a2a2e4c97165330c'; | ||
278 | + break; | ||
279 | + case 'girls' : | ||
280 | + $this->gender = '2,3'; | ||
281 | + $this->road = 2; | ||
282 | + $this->code = '8df64e505e94edb9881fd1e7efb702e9'; | ||
283 | + break; | ||
284 | + case 'lifestyle' : | ||
285 | + $this->gender = ''; | ||
286 | + $this->road = 4; | ||
287 | + $this->code = 'd131aba83a84a6977eee3a7403a713de'; | ||
288 | + break; | ||
289 | + case 'kids' : | ||
290 | + $this->gender = ''; | ||
291 | + $this->road = 3; | ||
292 | + $this->code = 'bd6a06a08f8ca9b0db762f78e0bc5b68'; | ||
293 | + break; | ||
294 | + | ||
295 | + } | ||
296 | + $this->setWebNavHeader(\Index\HomeModel::$this->channel); | ||
264 | $data = array( 'hotrankPage' => true, | 297 | $data = array( 'hotrankPage' => true, |
265 | 'footerTop'=> true, | 298 | 'footerTop'=> true, |
266 | 'hotrank' => array() | 299 | 'hotrank' => array() |
267 | ); | 300 | ); |
268 | //焦点图 热门品牌 | 301 | //焦点图 热门品牌 |
269 | - $focus = \Index\HomeModel::getChannelResource('lifestyle', 'd131aba83a84a6977eee3a7403a713de'); | ||
270 | - //print_r($focus); | 302 | + $focus = \Index\HomeModel::getChannelResource($this->channel, $this->code); |
271 | $data['hotrank']['slide'] = $focus[0]['slide']; | 303 | $data['hotrank']['slide'] = $focus[0]['slide']; |
272 | $data['hotrank']['hotBrands'] = $focus[1]['hotBrands']; | 304 | $data['hotrank']['hotBrands'] = $focus[1]['hotBrands']; |
273 | 305 | ||
274 | //人气单品 一周热卖 | 306 | //人气单品 一周热卖 |
275 | - $page = 1; | ||
276 | - $param = array('order'=>'s_n_desc','viewNum'=>60,'page'=>1,'stocknumber'=>1,'status'=>1,'gender'=>'','attribute_not'=>2); | ||
277 | - $publiclist = \product\HotrankModel::getSearchData($param,$page); | 307 | + $page = $this->get('page',1); |
308 | + $sort_id = $this->get('sid',0); | ||
309 | + $viewNum = 60; | ||
310 | + $param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'stocknumber'=>1,'status'=>1,'gender'=>$this->gender,'attribute_not'=>2); | ||
311 | + if($sort_id != 0){ | ||
312 | + $param['sort'] = $sort_id; | ||
313 | + } | ||
314 | + if($this->road == 3){ | ||
315 | + $param['msort'] = 365; | ||
316 | + }elseif($this->road == 4){ | ||
317 | + $param['msort'] = 10; | ||
318 | + }else{ | ||
319 | + $param['not_maxSortId'] = '10,365'; | ||
320 | + } | ||
321 | + $publiclist = \product\HotrankModel::getSearchData($param,$page,0); | ||
278 | $data['hotrank']['popular'] = $publiclist['popular']; | 322 | $data['hotrank']['popular'] = $publiclist['popular']; |
279 | $data['hotrank']['hotWeek'] = $publiclist['hotWeek']; | 323 | $data['hotrank']['hotWeek'] = $publiclist['hotWeek']; |
280 | - //print_r($publiclist); | ||
281 | - | 324 | + |
282 | //分类标签 | 325 | //分类标签 |
283 | - $classes = array('gender' => 2); | ||
284 | - $nav = \product\HotrankModel::getHotranktag($classes); | ||
285 | - $data['hotrank']['hotWeek']['nav'] = $nav; | ||
286 | - //print_r($data); | 326 | + $nav = \product\HotrankModel::getHotranktag('web',$this->road,true); |
327 | + $data['hotrank']['hotWeek']['nav'] = $nav; | ||
287 | $this->_view->display('hotrank', $data); | 328 | $this->_view->display('hotrank', $data); |
288 | } | 329 | } |
330 | + | ||
331 | + /* | ||
332 | + * 一周热卖加载更多 | ||
333 | + */ | ||
334 | + public function getdataAction() | ||
335 | + { | ||
336 | + $page = $this->get('page',1); | ||
337 | + //加载到100个以后停止 | ||
338 | + if($page > 2) | ||
339 | + { | ||
340 | + echo json_encode(array('code'=>201,'data'=>'')); | ||
341 | + exit; | ||
342 | + } | ||
343 | + $sid = $this->get('sid',1); | ||
344 | + $sort = ''; | ||
345 | + //是否是默认标签 | ||
346 | + if($sid > 1) | ||
347 | + { | ||
348 | + //通过ID获取标签信息 | ||
349 | + $info = \LibModels\Web\Product\HotrankData::getTagById($sid, false); | ||
350 | + if(!empty($info['data'])) | ||
351 | + { | ||
352 | + $sort = $info['data']['category_id']; | ||
353 | + } | ||
354 | + } | ||
355 | + $viewNum = 60; | ||
356 | + //过滤掉赠品 | ||
357 | + $param = array('order'=>'s_n_desc','viewNum'=>$viewNum,'page'=>$page,'sort'=>$sort,'stocknumber'=>1,'status'=>1,'gender'=>$this->gender, | ||
358 | + 'attribute_not'=>2); | ||
359 | + if(empty($param['sort'])) | ||
360 | + { | ||
361 | + if($this->road == 3) | ||
362 | + { | ||
363 | + $param['msort'] = 365; | ||
364 | + }elseif($this->road == 4){ | ||
365 | + $param['msort'] = 10; | ||
366 | + }else{ | ||
367 | + $param['not_maxSortId'] = '10,365'; | ||
368 | + } | ||
369 | + } | ||
370 | + | ||
371 | + $list = \product\HotrankModel::getSearchData($param, $page, 1); | ||
372 | + $lister = $list['hotWeek']['list']; | ||
373 | + $lister = array_values($lister); | ||
374 | + if($sid == 1 && $page == 1) | ||
375 | + { | ||
376 | + $lister = array_slice($lister, 10, 50); | ||
377 | + }else{ | ||
378 | + $lister = array_slice($lister, 0, 50); | ||
379 | + } | ||
380 | + $data = array( | ||
381 | + 'code'=>200, | ||
382 | + 'data'=>$lister, | ||
383 | + ); | ||
384 | + echo json_encode($data); | ||
385 | + exit; | ||
386 | + } | ||
289 | } | 387 | } |
290 | ?> | 388 | ?> |
@@ -166,7 +166,32 @@ class Sale1Controller extends WebAction | @@ -166,7 +166,32 @@ class Sale1Controller extends WebAction | ||
166 | 'saleList' => array( | 166 | 'saleList' => array( |
167 | 'saleBanner' => array( | 167 | 'saleBanner' => array( |
168 | 'bannerHeight' => 350, | 168 | 'bannerHeight' => 350, |
169 | - 'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg' | 169 | + 'list' => array( |
170 | + array( | ||
171 | + 'bannerHeight' => 350, | ||
172 | + 'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg' | ||
173 | + ), | ||
174 | + array( | ||
175 | + 'bannerHeight' => 350, | ||
176 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg?imageView/1/w/1150/h/450' | ||
177 | + ), | ||
178 | + array( | ||
179 | + 'bannerHeight' => 350, | ||
180 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg?imageView/1/w/1150/h/450' | ||
181 | + ), | ||
182 | + array( | ||
183 | + 'bannerHeight' => 350, | ||
184 | + 'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg' | ||
185 | + ), | ||
186 | + array( | ||
187 | + 'bannerHeight' => 350, | ||
188 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg?imageView/1/w/1150/h/450' | ||
189 | + ), | ||
190 | + array( | ||
191 | + 'bannerHeight' => 350, | ||
192 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg?imageView/1/w/1150/h/450' | ||
193 | + ) | ||
194 | + ) | ||
170 | ), | 195 | ), |
171 | 'saleTitle' => array( | 196 | 'saleTitle' => array( |
172 | 'name' => '全部商品', | 197 | 'name' => '全部商品', |
-
Please register or login to post a comment