Merge branch 'develop' into test
Showing
17 changed files
with
134 additions
and
73 deletions
@@ -1096,13 +1096,13 @@ | @@ -1096,13 +1096,13 @@ | ||
1096 | 'vipLevel' : { | 1096 | 'vipLevel' : { |
1097 | 'list' : [ | 1097 | 'list' : [ |
1098 | { | 1098 | { |
1099 | - 'text' : '¥284.00' | 1099 | + 'text' : '¥284.00', |
1100 | + 'currentLevel':true | ||
1100 | }, | 1101 | }, |
1101 | ... | 1102 | ... |
1102 | ] | 1103 | ] |
1103 | }, | 1104 | }, |
1104 | 'goodsDiscount' : { | 1105 | 'goodsDiscount' : { |
1105 | - 'listLength' : 2, | ||
1106 | 'list' : [ | 1106 | 'list' : [ |
1107 | { | 1107 | { |
1108 | 'text' : '【BACK TO SCHOOL】满¥499赠送Paul Franke帽子一个,多买多送!' | 1108 | 'text' : '【BACK TO SCHOOL】满¥499赠送Paul Franke帽子一个,多买多送!' |
@@ -1234,12 +1234,29 @@ | @@ -1234,12 +1234,29 @@ | ||
1234 | }, | 1234 | }, |
1235 | 1235 | ||
1236 | 'cartInfo' : { | 1236 | 'cartInfo' : { |
1237 | - 'numInCart' : 3, | ||
1238 | - 'goodsInstore' : 0, | ||
1239 | - 'isCollect':true// | 1237 | + 'cartUrl':'购物车url', |
1238 | + 'addToCartUrl':'添加购物车url', | ||
1239 | + 'soldOut':'已售罄', | ||
1240 | + 'notForSale':'非卖品' | ||
1241 | + }, | ||
1242 | + 'introUrl' : '', | ||
1243 | + 'id' : '', | ||
1244 | + 'preferenceUrl' :'' | ||
1245 | + } | ||
1246 | +### 咨询列表页面 | ||
1247 | + { | ||
1248 | + 'link' : '咨询表单跳转url', | ||
1249 | + 'consults':{ | ||
1250 | + 'list' : [ | ||
1251 | + { | ||
1252 | + 'question':'', | ||
1253 | + 'time':'', | ||
1254 | + 'answer':'' | ||
1255 | + } | ||
1256 | + ... | ||
1257 | + ] | ||
1240 | } | 1258 | } |
1241 | } | 1259 | } |
1242 | - | ||
1243 | ### 支付中心 | 1260 | ### 支付中心 |
1244 | 1261 | ||
1245 | { | 1262 | { |
@@ -284,7 +284,7 @@ class AbstractAction extends Controller_Abstract | @@ -284,7 +284,7 @@ class AbstractAction extends Controller_Abstract | ||
284 | protected function getUid($useSession = false) | 284 | protected function getUid($useSession = false) |
285 | { | 285 | { |
286 | // @todo | 286 | // @todo |
287 | - $useSession = false; | 287 | + // $useSession = false; |
288 | 288 | ||
289 | if (!$this->_uid) { | 289 | if (!$this->_uid) { |
290 | $cookie = $this->getCookie('_UID'); | 290 | $cookie = $this->getCookie('_UID'); |
@@ -76,15 +76,4 @@ class LoginData | @@ -76,15 +76,4 @@ class LoginData | ||
76 | return Yohobuy::get(Yohobuy::API_URL, $param); | 76 | return Yohobuy::get(Yohobuy::API_URL, $param); |
77 | } | 77 | } |
78 | 78 | ||
79 | - /** | ||
80 | - * 登出SESSION会话 | ||
81 | - * | ||
82 | - * @param string $token 会话 | ||
83 | - * @return array | ||
84 | - */ | ||
85 | - public static function signoutSession($token) | ||
86 | - { | ||
87 | - return Yohobuy::get( Helpers::logoutSession($token) ); | ||
88 | - } | ||
89 | - | ||
90 | } | 79 | } |
@@ -42,7 +42,7 @@ class ListProcess | @@ -42,7 +42,7 @@ class ListProcess | ||
42 | $products = array(); | 42 | $products = array(); |
43 | 43 | ||
44 | foreach ($data as $value) { | 44 | foreach ($data as $value) { |
45 | - $products[] = Helpers::formatProduct($value, true, true, true); | 45 | + $products[] = Helpers::formatProduct($value, true, true, true, 235, 314); |
46 | } | 46 | } |
47 | 47 | ||
48 | return $products; | 48 | return $products; |
@@ -607,7 +607,7 @@ class Helpers | @@ -607,7 +607,7 @@ class Helpers | ||
607 | public static function syncUserSession($uid, $refer = '', $callback = 'call') | 607 | public static function syncUserSession($uid, $refer = '', $callback = 'call') |
608 | { | 608 | { |
609 | return 'http://mapi.yohobuy.com/Passport/session/index?callback=' . $callback | 609 | return 'http://mapi.yohobuy.com/Passport/session/index?callback=' . $callback |
610 | - . '&sign=' . md5($uid . 'Js8Yn0!EwPM45-ws') . '&uid=' . $uid . '&go=' . $refer; | 610 | + . '&sign=' . md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer; |
611 | } | 611 | } |
612 | 612 | ||
613 | /** | 613 | /** |
@@ -620,10 +620,10 @@ class Helpers | @@ -620,10 +620,10 @@ class Helpers | ||
620 | * @param string $callback 回调方法名 | 620 | * @param string $callback 回调方法名 |
621 | * @return string | 621 | * @return string |
622 | */ | 622 | */ |
623 | - public static function logoutSession($token, $callback = 'call') | 623 | + public static function logoutSession($token, $refer = '', $callback = 'call') |
624 | { | 624 | { |
625 | return 'http://mapi.yohobuy.com/Passport/session/logout?callback=' . $callback | 625 | return 'http://mapi.yohobuy.com/Passport/session/logout?callback=' . $callback |
626 | - . '&sign=' . md5('Js8Yn0!EwPM45-ws') . '&token=' . $token; | 626 | + . '&sign=' . md5(md5('Js8Yn0!EwPM45-ws')) . '&token=' . $token . '&go=' . $refer; |
627 | } | 627 | } |
628 | 628 | ||
629 | } | 629 | } |
@@ -92,7 +92,7 @@ function callpay(orderCode) { | @@ -92,7 +92,7 @@ function callpay(orderCode) { | ||
92 | function isWXOpen() { | 92 | function isWXOpen() { |
93 | var ua = window.navigator.userAgent.toLowerCase(); | 93 | var ua = window.navigator.userAgent.toLowerCase(); |
94 | 94 | ||
95 | - if (ua.match(/MicroMessenger/i) === 'micromessenger') { | 95 | + if (ua.match(/MicroMessenger/i).toString() === 'micromessenger') { |
96 | return true; | 96 | return true; |
97 | } else { | 97 | } else { |
98 | return false; | 98 | return false; |
@@ -15,7 +15,11 @@ var $loading, | @@ -15,7 +15,11 @@ var $loading, | ||
15 | 15 | ||
16 | // 初始化 | 16 | // 初始化 |
17 | function init($container) { | 17 | function init($container) { |
18 | - var html = '<div class="loading-mask hide"><div class="loading"></div></div>'; | 18 | + var html = '<div class="loading-mask hide">' + |
19 | + '<div class="loading">' + | ||
20 | + '<div></div><div></div><div></div>' + | ||
21 | + '</div>' + | ||
22 | + '</div>'; | ||
19 | 23 | ||
20 | hasInit = true; | 24 | hasInit = true; |
21 | if ($container === undefined) { | 25 | if ($container === undefined) { |
@@ -16,6 +16,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'), | @@ -16,6 +16,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'), | ||
16 | goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl); | 16 | goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl); |
17 | 17 | ||
18 | var $cart = $('.cart-bar'); | 18 | var $cart = $('.cart-bar'); |
19 | +var UA = navigator.userAgent.toLowerCase().toString(); | ||
19 | 20 | ||
20 | require('./desc'); | 21 | require('./desc'); |
21 | require('./comments-consults'); | 22 | require('./comments-consults'); |
@@ -81,4 +82,7 @@ $.ajax({ | @@ -81,4 +82,7 @@ $.ajax({ | ||
81 | } | 82 | } |
82 | }); | 83 | }); |
83 | 84 | ||
85 | +if (UA.indexOf('mqqbrowser') > -1) { | ||
86 | + $('.detail > div').removeClass('column').addClass('oldbox'); | ||
87 | +} | ||
84 | require('./like'); | 88 | require('./like'); |
@@ -6,15 +6,72 @@ | @@ -6,15 +6,72 @@ | ||
6 | right: 0; | 6 | right: 0; |
7 | left: 0; | 7 | left: 0; |
8 | 8 | ||
9 | + @-webkit-keyframes scale { | ||
10 | + 0% { | ||
11 | + -webkit-transform: scale(1); | ||
12 | + transform: scale(1); | ||
13 | + opacity: 1; | ||
14 | + } | ||
15 | + | ||
16 | + 45% { | ||
17 | + -webkit-transform: scale(0.1); | ||
18 | + transform: scale(0.1); | ||
19 | + opacity: 0.7; | ||
20 | + } | ||
21 | + | ||
22 | + 80% { | ||
23 | + -webkit-transform: scale(1); | ||
24 | + transform: scale(1); | ||
25 | + opacity: 1; | ||
26 | + } | ||
27 | + } | ||
28 | + | ||
29 | + @keyframes scale { | ||
30 | + 0% { | ||
31 | + -webkit-transform: scale(1); | ||
32 | + transform: scale(1); | ||
33 | + opacity: 1; | ||
34 | + } | ||
35 | + | ||
36 | + 45% { | ||
37 | + -webkit-transform: scale(0.1); | ||
38 | + transform: scale(0.1); | ||
39 | + opacity: 0.7; | ||
40 | + } | ||
41 | + | ||
42 | + 80% { | ||
43 | + -webkit-transform: scale(1); | ||
44 | + transform: scale(1); | ||
45 | + opacity: 1; | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
9 | .loading { | 49 | .loading { |
10 | position: absolute; | 50 | position: absolute; |
11 | - width: 100rem / $pxConvertRem; | ||
12 | - height: 40rem / $pxConvertRem; | ||
13 | - background: image-url('loading.gif') no-repeat; | ||
14 | - background-size: 100% 100%; | 51 | + width: 60px; |
52 | + height: 20px; | ||
15 | top: 50%; | 53 | top: 50%; |
16 | left: 50%; | 54 | left: 50%; |
17 | - margin-left: -50rem / $pxConvertRem; | ||
18 | - margin-top: -20rem / $pxConvertRem; | 55 | + margin-top: -10px; |
56 | + margin-left: -30px; | ||
57 | + | ||
58 | + > div { | ||
59 | + display: inline-block; | ||
60 | + background: #fff; | ||
61 | + width: 15px; | ||
62 | + height: 15px; | ||
63 | + @include border-radius(100%); | ||
64 | + margin: 2px; | ||
65 | + | ||
66 | + $init: 0.12; | ||
67 | + @for $i from 1 through 3 { | ||
68 | + &:nth-child(#{$i}) { | ||
69 | + -webkit-animation: scale .75s #{$init}s infinite cubic-bezier(.2,.68,.18,1.08); | ||
70 | + animation: scale .75s #{$init}s infinite cubic-bezier(.2,.68,.18,1.08); | ||
71 | + } | ||
72 | + | ||
73 | + $init: ($i + 1) * 0.12; | ||
74 | + } | ||
75 | + } | ||
19 | } | 76 | } |
20 | } | 77 | } |
@@ -290,7 +290,7 @@ | @@ -290,7 +290,7 @@ | ||
290 | line-height: pxToRem(88px); | 290 | line-height: pxToRem(88px); |
291 | font-size: pxToRem(28px); | 291 | font-size: pxToRem(28px); |
292 | a { | 292 | a { |
293 | - color: #e0e0e0; | 293 | + color: #b0b0b0; |
294 | .iconfont { | 294 | .iconfont { |
295 | font-size: inherit; | 295 | font-size: inherit; |
296 | } | 296 | } |
@@ -46,7 +46,7 @@ $basicBtnC:#eb0313; | @@ -46,7 +46,7 @@ $basicBtnC:#eb0313; | ||
46 | .column { | 46 | .column { |
47 | box-sizing: border-box; | 47 | box-sizing: border-box; |
48 | //padding: pxToRem(20px) pxToRem(12px); | 48 | //padding: pxToRem(20px) pxToRem(12px); |
49 | - padding: 4% 3%; | 49 | + padding: pxToRem(6px) 3%; |
50 | width: 49.9%; | 50 | width: 49.9%; |
51 | border-bottom: pxToRem(4px) solid #fff; | 51 | border-bottom: pxToRem(4px) solid #fff; |
52 | border-right: pxToRem(4px) solid #fff; | 52 | border-right: pxToRem(4px) solid #fff; |
@@ -64,6 +64,20 @@ $basicBtnC:#eb0313; | @@ -64,6 +64,20 @@ $basicBtnC:#eb0313; | ||
64 | flex-basis: 49.9% | 64 | flex-basis: 49.9% |
65 | )) | 65 | )) |
66 | } | 66 | } |
67 | + .oldbox{ | ||
68 | + padding: pxToRem(6px) 3%; | ||
69 | + width: 49.9%; | ||
70 | + background-color: $tableCellC; | ||
71 | + box-sizing: border-box; | ||
72 | + border-bottom: 1px solid #fff; | ||
73 | + border-right: 1px solid #fff; | ||
74 | + width: 49.9%; | ||
75 | + height: 100%; | ||
76 | + float: left; | ||
77 | + text-overflow:ellipsis; | ||
78 | + white-space:nowrap; | ||
79 | + overflow:hidden; | ||
80 | + } | ||
67 | } | 81 | } |
68 | } | 82 | } |
69 | } | 83 | } |
@@ -202,7 +216,7 @@ $basicBtnC:#eb0313; | @@ -202,7 +216,7 @@ $basicBtnC:#eb0313; | ||
202 | .goodsName { | 216 | .goodsName { |
203 | box-sizing: border-box; | 217 | box-sizing: border-box; |
204 | width: 100%; | 218 | width: 100%; |
205 | - min-height: pxToRem(83px); | 219 | + min-height: pxToRem(88px); |
206 | font-size: pxToRem(28px); | 220 | font-size: pxToRem(28px); |
207 | color: #fff; | 221 | color: #fff; |
208 | padding-left: pxToRem(28px); | 222 | padding-left: pxToRem(28px); |
@@ -236,7 +250,7 @@ $basicBtnC:#eb0313; | @@ -236,7 +250,7 @@ $basicBtnC:#eb0313; | ||
236 | .price-date { | 250 | .price-date { |
237 | // width: 100%; | 251 | // width: 100%; |
238 | color: $subFontC; | 252 | color: $subFontC; |
239 | - min-height: pxToRem(88px); | 253 | + height: pxToRem(88px); |
240 | padding-left: pxToRem(28px); | 254 | padding-left: pxToRem(28px); |
241 | padding-right: pxToRem(28px); | 255 | padding-right: pxToRem(28px); |
242 | background-color: #fff; | 256 | background-color: #fff; |
@@ -11,10 +11,6 @@ | @@ -11,10 +11,6 @@ | ||
11 | background-size: cover; | 11 | background-size: cover; |
12 | } | 12 | } |
13 | .detail{ | 13 | .detail{ |
14 | - // background-color: $tableCellC; | ||
15 | - // &.table .inner-container{ | ||
16 | - // background-color: $tableCellC; | ||
17 | - // } | ||
18 | margin-bottom: 1px; | 14 | margin-bottom: 1px; |
19 | } | 15 | } |
20 | .desc-text { | 16 | .desc-text { |
@@ -42,30 +38,21 @@ | @@ -42,30 +38,21 @@ | ||
42 | .detail { | 38 | .detail { |
43 | .material-item{ | 39 | .material-item{ |
44 | margin: pxToRem(10px) 0; | 40 | margin: pxToRem(10px) 0; |
45 | - @include flexbox(( | ||
46 | - display: box, | ||
47 | - box-align: center | ||
48 | - ), $version: 1); | ||
49 | - @include flexbox(( | ||
50 | - display: flex, | ||
51 | - align-items: center | ||
52 | - )); | 41 | + width: 100%; |
42 | + height: auto; | ||
43 | + overflow: hidden; | ||
44 | + display: block; | ||
45 | + position: relative; | ||
53 | 46 | ||
54 | img { | 47 | img { |
55 | margin: 0; | 48 | margin: 0; |
56 | } | 49 | } |
57 | .material-image { | 50 | .material-image { |
58 | width: 23%; | 51 | width: 23%; |
59 | - @include flexbox(( | ||
60 | - box-flex: 1.0, | ||
61 | - display: box, | ||
62 | - box-pack: center | ||
63 | - ), $version: 1); | ||
64 | - @include flexbox(( | ||
65 | - display: flex, | ||
66 | - flex-basis: 23%, | ||
67 | - justify-content: center | ||
68 | - )); | 52 | + position: absolute; |
53 | + left: 0; | ||
54 | + top: 50%; | ||
55 | + @include transform(translateY(-50%)) | ||
69 | } | 56 | } |
70 | .material-desc { | 57 | .material-desc { |
71 | font-size: pxToRem(24px); | 58 | font-size: pxToRem(24px); |
@@ -76,15 +63,8 @@ | @@ -76,15 +63,8 @@ | ||
76 | line-height: pxToRem(38px); | 63 | line-height: pxToRem(38px); |
77 | color: #4b4b4b; | 64 | color: #4b4b4b; |
78 | word-wrap: break-word; | 65 | word-wrap: break-word; |
79 | - width: 76.9; | ||
80 | - @include flexbox(( | ||
81 | - box-flex: 1.0, | ||
82 | - display: box | ||
83 | - ), $version: 1); | ||
84 | - @include flexbox(( | ||
85 | - display: flex, | ||
86 | - flex-basis: 76.9% | ||
87 | - )); | 66 | + width: 76.9%; |
67 | + float: right; | ||
88 | } | 68 | } |
89 | &:last-child{ | 69 | &:last-child{ |
90 | border-bottom: none; | 70 | border-bottom: none; |
@@ -22,13 +22,9 @@ | @@ -22,13 +22,9 @@ | ||
22 | <p>{{answer}}</p> | 22 | <p>{{answer}}</p> |
23 | </div> | 23 | </div> |
24 | </div> | 24 | </div> |
25 | - | ||
26 | {{/list}} | 25 | {{/list}} |
27 | </div> | 26 | </div> |
28 | {{/ consults}} | 27 | {{/ consults}} |
29 | 28 | ||
30 | - {{#if loadmore}} | ||
31 | - <input id="loadMoreUrl" type="hidden" value="{{loadMoreUrl}}"> | ||
32 | - {{/if}} | ||
33 | </div> | 29 | </div> |
34 | {{> layout/footer}} | 30 | {{> layout/footer}} |
@@ -201,7 +201,7 @@ class UserModel | @@ -201,7 +201,7 @@ class UserModel | ||
201 | $datas[] = $product; | 201 | $datas[] = $product; |
202 | } | 202 | } |
203 | !empty($datas) && $result['hasFavProduct'] = $datas; | 203 | !empty($datas) && $result['hasFavProduct'] = $datas; |
204 | - } else if ($page > 1 && isset($favProduct['code']) && $favProduct['code'] === 500) { | 204 | + } else if ($page > 1 && (!$favProduct || (isset($favProduct['code']) && $favProduct['code'] === 500))) { |
205 | $result['end'] = true; | 205 | $result['end'] = true; |
206 | } | 206 | } |
207 | 207 | ||
@@ -259,7 +259,7 @@ class UserModel | @@ -259,7 +259,7 @@ class UserModel | ||
259 | $datas[] = $brand; | 259 | $datas[] = $brand; |
260 | } | 260 | } |
261 | !empty($datas) && $result['hasFavBrand'] = $datas; | 261 | !empty($datas) && $result['hasFavBrand'] = $datas; |
262 | - } else if ($page > 1 && isset($favBrand['code']) && $favBrand['code'] === 500) { | 262 | + } else if ($page > 1 && (!$favBrand || (isset($favBrand['code']) && $favBrand['code'] === 500))) { |
263 | $result['end'] = true; | 263 | $result['end'] = true; |
264 | } | 264 | } |
265 | 265 |
@@ -78,7 +78,7 @@ class LoginController extends AbstractAction | @@ -78,7 +78,7 @@ class LoginController extends AbstractAction | ||
78 | $refer = $this->server('HTTP_REFERER', SITE_MAIN); | 78 | $refer = $this->server('HTTP_REFERER', SITE_MAIN); |
79 | $token = $this->get('token'); | 79 | $token = $this->get('token'); |
80 | if (!empty($token)) { | 80 | if (!empty($token)) { |
81 | - LoginData::signoutSession($token); | 81 | + $this->go( Helpers::logoutSession($token, $refer) ); |
82 | } | 82 | } |
83 | 83 | ||
84 | $this->go($refer); | 84 | $this->go($refer); |
@@ -217,7 +217,7 @@ class IndexController extends AbstractAction | @@ -217,7 +217,7 @@ class IndexController extends AbstractAction | ||
217 | 217 | ||
218 | // 右下角的购物车链接 | 218 | // 右下角的购物车链接 |
219 | $data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null); | 219 | $data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null); |
220 | - //$data['goodList'] += $condition; | 220 | + $data['goodList'] += $condition; |
221 | $data['pageFooter'] = true; | 221 | $data['pageFooter'] = true; |
222 | 222 | ||
223 | if ($title === '') { | 223 | if ($title === '') { |
-
Please register or login to post a comment