Authored by uedxwg

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -306,6 +306,9 @@ class AbstractAction extends Controller_Abstract @@ -306,6 +306,9 @@ class AbstractAction extends Controller_Abstract
306 if (isset($cookieList[1]) && is_numeric($cookieList[1])) { 306 if (isset($cookieList[1]) && is_numeric($cookieList[1])) {
307 if ($useSession) { 307 if ($useSession) {
308 $token = $this->getSession('_TOKEN'); 308 $token = $this->getSession('_TOKEN');
  309 + if (empty($token)) {
  310 + $token = $this->getCookie('_TOKEN');
  311 + }
309 if ($token === Helpers::makeToken($cookieList[1])) { 312 if ($token === Helpers::makeToken($cookieList[1])) {
310 $this->_uid = $cookieList[1]; 313 $this->_uid = $cookieList[1];
311 } 314 }
@@ -247,6 +247,9 @@ class ListProcess @@ -247,6 +247,9 @@ class ListProcess
247 247
248 private static function priceRange($data) 248 private static function priceRange($data)
249 { 249 {
  250 + // 首先对价格进行排序
  251 + ksort($data, SORT_NUMERIC);
  252 +
250 $result = array( 253 $result = array(
251 'title' => '价格', 254 'title' => '价格',
252 'name' => '所有价格', 255 'name' => '所有价格',
1 require 'compass/import-once/activate' 1 require 'compass/import-once/activate'
  2 +
  3 +# autoprefixer自动加浏览器前缀
  4 +# 需要先安装, gem install autoprefixer-rails
  5 +
  6 +# require 'autoprefixer-rails'
  7 +#
  8 +# on_stylesheet_saved do |file|
  9 +# css = File.read(file)
  10 +# map = file + '.map'
  11 +# browsers = ['> 1%', 'ie 8']
  12 +#
  13 +# if File.exists? map
  14 +# result = AutoprefixerRails.process(css,
  15 +# from: file,
  16 +# to: file,
  17 +# browsers: browsers,
  18 +# map: { prev: File.read(map), inline: false })
  19 +# File.open(file, 'w') { |io| io << result.css }
  20 +# File.open(map, 'w') { |io| io << result.map }
  21 +# else
  22 +# File.open(file, 'w') { |io| io << AutoprefixerRails.process(css, browsers) }
  23 +# end
  24 +# end
  25 +
2 # Require any additional compass plugins here. 26 # Require any additional compass plugins here.
3 27
4 # Set this to the root of your project when deployed: 28 # Set this to the root of your project when deployed:
@@ -25,4 +49,4 @@ line_comments = false @@ -25,4 +49,4 @@ line_comments = false
25 # preferred_syntax = :sass 49 # preferred_syntax = :sass
26 # and then run: 50 # and then run:
27 # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 51 # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
28 -Encoding.default_external = "utf-8"  
  52 +Encoding.default_external = "utf-8"
@@ -2028,8 +2028,8 @@ $('#search').on('touchend', function() { @@ -2028,8 +2028,8 @@ $('#search').on('touchend', function() {
2028 2028
2029 if (historys && historys.length > 0) { 2029 if (historys && historys.length > 0) {
2030 historys = historys.split(ranToken); 2030 historys = historys.split(ranToken);
2031 - for (i = 0; i < historys.length; i++) {  
2032 - history = historys[i]; 2031 + for (i = historys.length; i > 0; i--) {
  2032 + history = historys[i - 1];
2033 2033
2034 if (history === '') { 2034 if (history === '') {
2035 continue; 2035 continue;
@@ -4711,7 +4711,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'), @@ -4711,7 +4711,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
4711 goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl); 4711 goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
4712 4712
4713 var $cart = $('.cart-bar'); 4713 var $cart = $('.cart-bar');
4714 -var UA = navigator.userAgent.toLowerCase().toString(); 4714 +
4715 4715
4716 require("js/product/detail/desc"); 4716 require("js/product/detail/desc");
4717 require("js/product/detail/comments-consults"); 4717 require("js/product/detail/comments-consults");
@@ -4777,9 +4777,10 @@ $.ajax({ @@ -4777,9 +4777,10 @@ $.ajax({
4777 } 4777 }
4778 }); 4778 });
4779 4779
4780 -if (UA.indexOf('mqqbrowser') > -1) {  
4781 - $('.detail > div').removeClass('column').addClass('oldbox'); 4780 +if ($('.good-detail-page').length > 0) {
  4781 + $('#yoho-footer').css('border-top', '1px solid #e0e0e0');
4782 } 4782 }
  4783 +
4783 require("js/product/detail/like"); 4784 require("js/product/detail/like");
4784 4785
4785 }); 4786 });
@@ -4804,6 +4805,8 @@ var introUrl = $('#introUrl').val(), @@ -4804,6 +4805,8 @@ var introUrl = $('#introUrl').val(),
4804 var sizeSwiper, 4805 var sizeSwiper,
4805 refSwiper; 4806 refSwiper;
4806 4807
  4808 +var UA = navigator.userAgent.toLowerCase().toString();
  4809 +
4807 //判断是否要显示向左滑动提示 4810 //判断是否要显示向左滑动提示
4808 function hiddenTips($ele) { 4811 function hiddenTips($ele) {
4809 var offsetContainer, 4812 var offsetContainer,
@@ -4855,7 +4858,9 @@ function search() { @@ -4855,7 +4858,9 @@ function search() {
4855 4858
4856 hiddenTips($('#size-swiper-container')); 4859 hiddenTips($('#size-swiper-container'));
4857 hiddenTips($('#reference-swiper-container')); 4860 hiddenTips($('#reference-swiper-container'));
4858 - 4861 + if (UA.indexOf('mqqbrowser') > 0) {
  4862 + $('.detail > div').removeClass('column').addClass('oldbox');
  4863 + }
4859 searching = false; 4864 searching = false;
4860 end = true; 4865 end = true;
4861 loading.hideLoadingMask(); 4866 loading.hideLoadingMask();
@@ -4986,15 +4991,19 @@ var recommendSwiper, @@ -4986,15 +4991,19 @@ var recommendSwiper,
4986 4991
4987 if (preferenceUrl) { 4992 if (preferenceUrl) {
4988 $.get(preferenceUrl).then(function(html) { 4993 $.get(preferenceUrl).then(function(html) {
4989 - $recommendForYou.html(html).show();  
4990 - if ($('#swiper-recommend').length) {  
4991 - recommendSwiper = new Swiper('#swiper-recommend', {  
4992 - slidesPerView: 'auto',  
4993 - grabCursor: true,  
4994 - slideElement: 'a',  
4995 - lazyLoading: true,  
4996 - watchSlidesVisibility: true  
4997 - }); 4994 + if (html.length < 5) {
  4995 + $recommendForYou.css('display', 'none');
  4996 + } else {
  4997 + $recommendForYou.html(html).show();
  4998 + if ($('#swiper-recommend').length) {
  4999 + recommendSwiper = new Swiper('#swiper-recommend', {
  5000 + slidesPerView: 'auto',
  5001 + grabCursor: true,
  5002 + slideElement: 'a',
  5003 + lazyLoading: true,
  5004 + watchSlidesVisibility: true
  5005 + });
  5006 + }
4998 } 5007 }
4999 5008
5000 window.rePosFooter(); 5009 window.rePosFooter();
@@ -5784,7 +5793,6 @@ function loadData($parent, url, page) { @@ -5784,7 +5793,6 @@ function loadData($parent, url, page) {
5784 } else { 5793 } else {
5785 return; 5794 return;
5786 } 5795 }
5787 - window.rePosFooter();  
5788 5796
5789 //},1000); 5797 //},1000);
5790 } 5798 }
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -71,8 +71,8 @@ $('#search').on('touchend', function() { @@ -71,8 +71,8 @@ $('#search').on('touchend', function() {
71 71
72 if (historys && historys.length > 0) { 72 if (historys && historys.length > 0) {
73 historys = historys.split(ranToken); 73 historys = historys.split(ranToken);
74 - for (i = 0; i < historys.length; i++) {  
75 - history = historys[i]; 74 + for (i = historys.length; i > 0; i--) {
  75 + history = historys[i - 1];
76 76
77 if (history === '') { 77 if (history === '') {
78 continue; 78 continue;
@@ -112,7 +112,6 @@ function loadData($parent, url, page) { @@ -112,7 +112,6 @@ function loadData($parent, url, page) {
112 } else { 112 } else {
113 return; 113 return;
114 } 114 }
115 - window.rePosFooter();  
116 115
117 //},1000); 116 //},1000);
118 } 117 }
@@ -82,6 +82,8 @@ $.ajax({ @@ -82,6 +82,8 @@ $.ajax({
82 } 82 }
83 }); 83 });
84 84
85 - 85 +if ($('.good-detail-page').length > 0) {
  86 + $('#yoho-footer').css('border-top', '1px solid #e0e0e0');
  87 +}
86 88
87 require('./like'); 89 require('./like');
@@ -14,15 +14,19 @@ var recommendSwiper, @@ -14,15 +14,19 @@ var recommendSwiper,
14 14
15 if (preferenceUrl) { 15 if (preferenceUrl) {
16 $.get(preferenceUrl).then(function(html) { 16 $.get(preferenceUrl).then(function(html) {
17 - $recommendForYou.html(html).show();  
18 - if ($('#swiper-recommend').length) {  
19 - recommendSwiper = new Swiper('#swiper-recommend', {  
20 - slidesPerView: 'auto',  
21 - grabCursor: true,  
22 - slideElement: 'a',  
23 - lazyLoading: true,  
24 - watchSlidesVisibility: true  
25 - }); 17 + if (html.length < 5) {
  18 + $recommendForYou.css('display', 'none');
  19 + } else {
  20 + $recommendForYou.html(html).show();
  21 + if ($('#swiper-recommend').length) {
  22 + recommendSwiper = new Swiper('#swiper-recommend', {
  23 + slidesPerView: 'auto',
  24 + grabCursor: true,
  25 + slideElement: 'a',
  26 + lazyLoading: true,
  27 + watchSlidesVisibility: true
  28 + });
  29 + }
26 } 30 }
27 31
28 window.rePosFooter(); 32 window.rePosFooter();
@@ -45,4 +45,4 @@ @@ -45,4 +45,4 @@
45 } 45 }
46 } 46 }
47 } 47 }
48 -}  
  48 +}
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
35 35
36 .sum-cost { 36 .sum-cost {
37 color: #e01; 37 color: #e01;
  38 + margin-left: 5px;
38 } 39 }
39 40
40 .order-opt { 41 .order-opt {
@@ -31,6 +31,15 @@ $basicBtnC:#eb0313; @@ -31,6 +31,15 @@ $basicBtnC:#eb0313;
31 margin-bottom: pxToRem(20px); 31 margin-bottom: pxToRem(20px);
32 font-size: pxToRem(24px); 32 font-size: pxToRem(24px);
33 line-height: pxToRem(36px); 33 line-height: pxToRem(36px);
  34 +
  35 + b {
  36 + font-weight: bold;
  37 + }
  38 +
  39 + i {
  40 + font-style: italic;
  41 + }
  42 +
34 &.table { 43 &.table {
35 @include flexbox(( 44 @include flexbox((
36 display: box, 45 display: box,
@@ -208,18 +217,19 @@ $basicBtnC:#eb0313; @@ -208,18 +217,19 @@ $basicBtnC:#eb0313;
208 height: auto; 217 height: auto;
209 li { 218 li {
210 float: left; 219 float: left;
  220 + img {
  221 + height: auto;
  222 + }
211 } 223 }
212 } 224 }
213 } 225 }
214 .goodsName { 226 .goodsName {
215 box-sizing: border-box; 227 box-sizing: border-box;
216 width: 100%; 228 width: 100%;
217 - min-height: pxToRem(88px);  
218 font-size: pxToRem(28px); 229 font-size: pxToRem(28px);
219 color: #fff; 230 color: #fff;
220 - padding-left: pxToRem(28px);  
221 - padding-right: pxToRem(28px);  
222 - line-height: pxToRem(36px); 231 + padding: pxToRem(20px) pxToRem(28px);
  232 + line-height: pxToRem(48px);
223 background-color: #515150; 233 background-color: #515150;
224 } 234 }
225 .goodsSubtitle { 235 .goodsSubtitle {
@@ -278,14 +288,14 @@ $basicBtnC:#eb0313; @@ -278,14 +288,14 @@ $basicBtnC:#eb0313;
278 line-height: pxToRem(88px); 288 line-height: pxToRem(88px);
279 } 289 }
280 } 290 }
281 - .goodsName {  
282 - // width: 100%;  
283 - display: table;  
284 - span {  
285 - display: table-cell;  
286 - vertical-align: middle;  
287 - }  
288 - } 291 + // .goodsName {
  292 + // // width: 100%;
  293 + // display: table;
  294 + // span {
  295 + // display: table-cell;
  296 + // vertical-align: middle;
  297 + // }
  298 + // }
289 .vip-level { 299 .vip-level {
290 box-sizing: box-border; 300 box-sizing: box-border;
291 padding-left: pxToRem(28px); 301 padding-left: pxToRem(28px);
@@ -360,21 +370,28 @@ $basicBtnC:#eb0313; @@ -360,21 +370,28 @@ $basicBtnC:#eb0313;
360 } 370 }
361 } 371 }
362 .enter-store { 372 .enter-store {
363 - min-height: pxToRem(100px);  
364 - display: table; 373 + position: relative;
  374 + padding: 0 pxToRem(180px) 0 pxToRem(114px);
  375 + line-height: pxToRem(84px);
365 background-color: #fff; 376 background-color: #fff;
366 - a {  
367 - display: table-cell;  
368 - vertical-align: middle;  
369 - text-align: left;  
370 - } 377 + white-space: nowrap;
  378 + overflow: hidden;
  379 + text-overflow: ellipsis;
  380 +
371 .store-logo { 381 .store-logo {
372 - // padding-right: 35rem/$pxConvertRem; 382 + position: absolute;
  383 + left: 0;
  384 + top: 1px;
  385 + width: pxToRem(68px);
  386 + height: pxToRem(84px);
  387 + margin-left: pxToRem(30px);
  388 + font-size: 0;
  389 + text-align: center;
373 img { 390 img {
  391 + display: inline-block;
374 width: auto; 392 width: auto;
375 height: pxToRem(68px); 393 height: pxToRem(68px);
376 - margin-left: 0;  
377 - margin-right: pxToRem(-25px); 394 + vertical-align: middle;
378 } 395 }
379 } 396 }
380 .store-name { 397 .store-name {
@@ -382,6 +399,10 @@ $basicBtnC:#eb0313; @@ -382,6 +399,10 @@ $basicBtnC:#eb0313;
382 color: $mainFontC; 399 color: $mainFontC;
383 } 400 }
384 .store-link { 401 .store-link {
  402 + position: absolute;
  403 + right: 0;
  404 + top: 1px;
  405 + padding-right: pxToRem(30px);
385 font-size: pxToRem(28px); 406 font-size: pxToRem(28px);
386 color: $subFontC; 407 color: $subFontC;
387 text-align: right; 408 text-align: right;
@@ -402,6 +423,7 @@ $basicBtnC:#eb0313; @@ -402,6 +423,7 @@ $basicBtnC:#eb0313;
402 z-index: 2; 423 z-index: 2;
403 padding: pxToRem(20px) pxToRem(28px); 424 padding: pxToRem(20px) pxToRem(28px);
404 text-align: center; 425 text-align: center;
  426 + border-top: 1px solid $borderC;
405 a { 427 a {
406 display: inline-block; 428 display: inline-block;
407 &.num-incart { 429 &.num-incart {
@@ -423,7 +445,7 @@ $basicBtnC:#eb0313; @@ -423,7 +445,7 @@ $basicBtnC:#eb0313;
423 margin: 0 pxToRem(100px) 0 pxToRem(115px); 445 margin: 0 pxToRem(100px) 0 pxToRem(115px);
424 color: #fff; 446 color: #fff;
425 background-color: $basicBtnC; 447 background-color: $basicBtnC;
426 - font-size: pxToRem(40px); 448 + font-size: pxToRem(32px);
427 line-height: pxToRem(80px); 449 line-height: pxToRem(80px);
428 text-align: center; 450 text-align: center;
429 } 451 }
@@ -447,9 +469,9 @@ $basicBtnC:#eb0313; @@ -447,9 +469,9 @@ $basicBtnC:#eb0313;
447 } 469 }
448 } 470 }
449 } 471 }
450 - // .recommend-for-you {  
451 - // margin-bottom: pxToRem(30px);  
452 - // } 472 + .recommend-for-you{
  473 + border-bottom: none;
  474 + }
453 .yoho-tip{ 475 .yoho-tip{
454 top:40%; 476 top:40%;
455 } 477 }
@@ -38,8 +38,8 @@ @@ -38,8 +38,8 @@
38 <div class="price-date"> 38 <div class="price-date">
39 {{# goodsPrice}} 39 {{# goodsPrice}}
40 <div class="goodsPrice"> 40 <div class="goodsPrice">
41 - <h1 class="currentPrice">{{currentPrice}}</h1>  
42 - <h1 class="previousPrice">{{previousPrice}}</h1> 41 + <h1 class="currentPrice"{{currentPrice}}</h1>
  42 + <h1 class="previousPrice"{{previousPrice}}</h1>
43 </div> 43 </div>
44 {{/ goodsPrice}} 44 {{/ goodsPrice}}
45 45
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 <li class="icons-item {{#if currentLevel}}current-level{{/if}}"> 57 <li class="icons-item {{#if currentLevel}}current-level{{/if}}">
58 <span class="vip-img " style="background-size:contain;"> 58 <span class="vip-img " style="background-size:contain;">
59 </span> 59 </span>
60 - <span class="vip-price ">{{text}}</span> 60 + <span class="vip-price ">¥{{text}}</span>
61 </li> 61 </li>
62 {{/ list}} 62 {{/ list}}
63 </ul> 63 </ul>
@@ -805,7 +805,7 @@ class HomeController extends AbstractAction @@ -805,7 +805,7 @@ class HomeController extends AbstractAction
805 'payLink' => '', 805 'payLink' => '',
806 'appId' => 'weixin', 806 'appId' => 'weixin',
807 'app' => '微信支付', 807 'app' => '微信支付',
808 - 'hint' => '需安装微信客户端', 808 + 'hint' => '推荐使用',
809 'subHint' => '', 809 'subHint' => '',
810 ), 810 ),
811 ), 811 ),
@@ -79,7 +79,7 @@ class DetailModel @@ -79,7 +79,7 @@ class DetailModel
79 $result['goodsPrice'] = array(); 79 $result['goodsPrice'] = array();
80 $result['goodsPrice']['currentPrice'] = $baseInfo['productPriceBo']['formatSalesPrice']; 80 $result['goodsPrice']['currentPrice'] = $baseInfo['productPriceBo']['formatSalesPrice'];
81 if ($baseInfo['productPriceBo']['formatMarketPrice'] !== $baseInfo['productPriceBo']['formatSalesPrice']) { 81 if ($baseInfo['productPriceBo']['formatMarketPrice'] !== $baseInfo['productPriceBo']['formatSalesPrice']) {
82 - $result['goodsPrice']['previousPrice'] = $baseInfo['productPriceBo']['formatMarketPrice']; 82 + $result['goodsPrice']['previousPrice'] = strtr($baseInfo['productPriceBo']['formatMarketPrice'], array('¥' => ''));
83 } 83 }
84 } 84 }
85 // VIP商品价格 85 // VIP商品价格
@@ -87,7 +87,7 @@ class DetailModel @@ -87,7 +87,7 @@ class DetailModel
87 $build = array(); 87 $build = array();
88 foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) { 88 foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) {
89 $build['level'] = $value['vipLevel']; 89 $build['level'] = $value['vipLevel'];
90 - $build['text'] = $value['vipPrice']; 90 + $build['text'] = strtr($value['vipPrice'], array('¥' => ''));
91 $build['currentLevel'] = ($value['vipLevel'] == $vipLevel) ? true : false; 91 $build['currentLevel'] = ($value['vipLevel'] == $vipLevel) ? true : false;
92 $result['vipLevel']['list'][] = $build; 92 $result['vipLevel']['list'][] = $build;
93 } 93 }
@@ -419,7 +419,7 @@ class DetailModel @@ -419,7 +419,7 @@ class DetailModel
419 if (isset($sizeInfo['productIntroBo']['productIntro'])) { 419 if (isset($sizeInfo['productIntroBo']['productIntro'])) {
420 $productIntro = ''; 420 $productIntro = '';
421 if (!empty($sizeInfo['productDescBo']['phrase'])) { 421 if (!empty($sizeInfo['productDescBo']['phrase'])) {
422 - $productIntro .= $sizeInfo['productDescBo']['phrase']; 422 + $productIntro .= $sizeInfo['productDescBo']['phrase'] . '<br/>';
423 } 423 }
424 $productIntro .= $sizeInfo['productIntroBo']['productIntro']; 424 $productIntro .= $sizeInfo['productIntroBo']['productIntro'];
425 if ($productIntro) { 425 if ($productIntro) {
@@ -118,7 +118,7 @@ class LoginController extends AbstractAction @@ -118,7 +118,7 @@ class LoginController extends AbstractAction
118 } 118 }
119 119
120 /* 调用登录接口进行登录 */ 120 /* 调用登录接口进行登录 */
121 - $data = LoginData::signin($area, $profile, $password); 121 + $data = LoginData::signin($area, $profile, $password);
122 if ($data['code'] != 200 || !isset($data['data']['uid'])) { 122 if ($data['code'] != 200 || !isset($data['data']['uid'])) {
123 break; 123 break;
124 } 124 }
@@ -187,8 +187,8 @@ class LoginController extends AbstractAction @@ -187,8 +187,8 @@ class LoginController extends AbstractAction
187 $refer = rawurldecode($refer); 187 $refer = rawurldecode($refer);
188 } 188 }
189 189
190 - if ($result['code'] == 200 && !empty($result['data']['uid'])) {  
191 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 190 + if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
  191 + $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
192 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 192 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
193 } else { 193 } else {
194 $this->go($refer); 194 $this->go($refer);
@@ -204,7 +204,7 @@ class LoginController extends AbstractAction @@ -204,7 +204,7 @@ class LoginController extends AbstractAction
204 $access = $qqconnect->getAccessToken(); 204 $access = $qqconnect->getAccessToken();
205 /* 获取QQ腾讯用户的详细信息 */ 205 /* 获取QQ腾讯用户的详细信息 */
206 $partnerInfo = $qqconnect->getUserInfo($access); 206 $partnerInfo = $qqconnect->getUserInfo($access);
207 - 207 +
208 $result = array(); 208 $result = array();
209 if ($partnerInfo && is_array($partnerInfo)) { 209 if ($partnerInfo && is_array($partnerInfo)) {
210 $result = LoginData::signinByOpenID($partnerInfo['nickname'], $access['openid'], 'qq'); 210 $result = LoginData::signinByOpenID($partnerInfo['nickname'], $access['openid'], 'qq');
@@ -217,8 +217,8 @@ class LoginController extends AbstractAction @@ -217,8 +217,8 @@ class LoginController extends AbstractAction
217 $refer = rawurldecode($refer); 217 $refer = rawurldecode($refer);
218 } 218 }
219 219
220 - if ($result['code'] == 200 && !empty($result['data']['uid'])) {  
221 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 220 + if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
  221 + $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
222 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 222 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
223 } else { 223 } else {
224 $this->go($refer); 224 $this->go($refer);
@@ -247,8 +247,8 @@ class LoginController extends AbstractAction @@ -247,8 +247,8 @@ class LoginController extends AbstractAction
247 $refer = rawurldecode($refer); 247 $refer = rawurldecode($refer);
248 } 248 }
249 249
250 - if ($result['code'] == 200 && !empty($result['data']['uid'])) {  
251 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 250 + if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
  251 + $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
252 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 252 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
253 } else { 253 } else {
254 $this->go($refer); 254 $this->go($refer);
@@ -177,7 +177,7 @@ class NewsaleController extends AbstractAction @@ -177,7 +177,7 @@ class NewsaleController extends AbstractAction
177 $color = $this->get('color', null); 177 $color = $this->get('color', null);
178 $size = $this->get('size', null); 178 $size = $this->get('size', null);
179 $price = $this->get('price', null); 179 $price = $this->get('price', null);
180 - $p_d = $this->get('discount', null); 180 + $p_d = '0.1,0.3';
181 $dayLimit = $this->get('dayLimit', null); 181 $dayLimit = $this->get('dayLimit', null);
182 $limit = $this->get('limit', 60); 182 $limit = $this->get('limit', 60);
183 $page = $this->get('page', 1); 183 $page = $this->get('page', 1);