Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
16 changed files
with
118 additions
and
177 deletions
@@ -1250,13 +1250,23 @@ | @@ -1250,13 +1250,23 @@ | ||
1250 | ### 支付中心 | 1250 | ### 支付中心 |
1251 | 1251 | ||
1252 | { | 1252 | { |
1253 | - 'payAppInfo' : { | ||
1254 | - 'appIcon' : 'http://static.yohobuy.com/images/icon.png', | ||
1255 | - 'payLink' : '/weixin/pay/' | ||
1256 | - 'app' : '微信支付', | ||
1257 | - 'hint' : '需下载微信客户端', | ||
1258 | - 'subHint' : '推荐使用' | ||
1259 | - } | 1253 | + 'payAppInfo' : [ |
1254 | + { | ||
1255 | + 'appIcon' : 'http://static.yohobuy.com/images/icon.png', | ||
1256 | + 'payLink' : '/weixin/pay/', | ||
1257 | + 'appId': 'weixin', | ||
1258 | + 'app' : '微信支付', | ||
1259 | + 'hint' : '需下载微信客户端', | ||
1260 | + 'subHint' : '推荐使用' | ||
1261 | + },{ | ||
1262 | + 'appIcon' : 'http://static.yohobuy.com/images/icon.png', | ||
1263 | + 'payLink' : '/weixin/pay/', | ||
1264 | + 'appId': 'baidu', | ||
1265 | + 'app' : '百度支付', | ||
1266 | + 'hint' : '需下载微信客户端', | ||
1267 | + 'subHint' : '推荐使用' | ||
1268 | + } | ||
1269 | + ] | ||
1260 | } | 1270 | } |
1261 | 1271 | ||
1262 | ### 物流详情 | 1272 | ### 物流详情 |
@@ -1266,9 +1276,14 @@ | @@ -1266,9 +1276,14 @@ | ||
1266 | 'logisticUrl' : 'http://www.shunfeng.com', | 1276 | 'logisticUrl' : 'http://www.shunfeng.com', |
1267 | 'logisticCompany' : '顺丰', | 1277 | 'logisticCompany' : '顺丰', |
1268 | 'logisticNumber' : '1231231231', | 1278 | 'logisticNumber' : '1231231231', |
1269 | - 'logisticDetail' : { | ||
1270 | - 'status' : '南京市 派送中', | ||
1271 | - 'date' : '2015-12-03' | ||
1272 | - } | 1279 | + 'logisticDetail' : [ |
1280 | + { | ||
1281 | + 'status' : '南京市 派送中', | ||
1282 | + 'date' : '2015-12-03' | ||
1283 | + }, { | ||
1284 | + 'status' : '南京市 准备中', | ||
1285 | + 'date' : '2015-12-03' | ||
1286 | + } | ||
1287 | + ] | ||
1273 | } | 1288 | } |
1274 | 1289 |
@@ -139,7 +139,7 @@ class Yohobuy | @@ -139,7 +139,7 @@ class Yohobuy | ||
139 | if (!empty($data)) { | 139 | if (!empty($data)) { |
140 | $url = self::httpBuildQuery($url, $data); | 140 | $url = self::httpBuildQuery($url, $data); |
141 | } | 141 | } |
142 | - var_dump($url); | 142 | + |
143 | /* 开启缓存的情况 */ | 143 | /* 开启缓存的情况 */ |
144 | if ($cache && USE_CACHE) { | 144 | if ($cache && USE_CACHE) { |
145 | // 先尝试获取一级缓存(master), 有数据则直接返回. | 145 | // 先尝试获取一级缓存(master), 有数据则直接返回. |
@@ -76,33 +76,17 @@ class LoginData | @@ -76,33 +76,17 @@ class LoginData | ||
76 | } | 76 | } |
77 | 77 | ||
78 | /** | 78 | /** |
79 | - * 写入SESSION会话 | 79 | + * 登出SESSION会话 |
80 | * | 80 | * |
81 | * @param int $uid 用户ID | 81 | * @param int $uid 用户ID |
82 | * @return array | 82 | * @return array |
83 | */ | 83 | */ |
84 | - public static function signinSession($uid) | 84 | + public static function signoutSession($token) |
85 | { | 85 | { |
86 | $param = array(); | 86 | $param = array(); |
87 | - $param['uid'] = $uid; | ||
88 | - $param['token'] = md5($uid . '#@!@#'); | ||
89 | - | ||
90 | - return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/index', $param); | ||
91 | - } | ||
92 | - | ||
93 | - /** | ||
94 | - * 写入SESSION会话 | ||
95 | - * | ||
96 | - * @param int $uid 用户ID | ||
97 | - * @return array | ||
98 | - */ | ||
99 | - public static function checkSession($uid) | ||
100 | - { | ||
101 | - $param = array(); | ||
102 | - $param['uid'] = $uid; | ||
103 | - $param['token'] = md5($uid . '#@!@#'); | 87 | + $param['token'] = $token; |
104 | 88 | ||
105 | - return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/val', $param); | 89 | + return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/logout', $param); |
106 | } | 90 | } |
107 | 91 | ||
108 | } | 92 | } |
@@ -77,7 +77,7 @@ class Call extends Factory | @@ -77,7 +77,7 @@ class Call extends Factory | ||
77 | 77 | ||
78 | if (is_array($token) && isset($token['uid'])) | 78 | if (is_array($token) && isset($token['uid'])) |
79 | { | 79 | { |
80 | - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); | 80 | + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); |
81 | 81 | ||
82 | $userInfo = $this->client->show_user_by_id($token['uid']); | 82 | $userInfo = $this->client->show_user_by_id($token['uid']); |
83 | 83 | ||
@@ -108,7 +108,7 @@ class Call extends Factory | @@ -108,7 +108,7 @@ class Call extends Factory | ||
108 | 108 | ||
109 | if (is_array($token) && isset($token['access_token'])) | 109 | if (is_array($token) && isset($token['access_token'])) |
110 | { | 110 | { |
111 | - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); | 111 | + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); |
112 | 112 | ||
113 | $result = $this->client->friends_by_id($params['uid'], $params['cursor'], $params['count']); | 113 | $result = $this->client->friends_by_id($params['uid'], $params['cursor'], $params['count']); |
114 | 114 | ||
@@ -133,7 +133,7 @@ class Call extends Factory | @@ -133,7 +133,7 @@ class Call extends Factory | ||
133 | 133 | ||
134 | if (is_array($token) && isset($token['access_token'])) | 134 | if (is_array($token) && isset($token['access_token'])) |
135 | { | 135 | { |
136 | - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); | 136 | + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); |
137 | 137 | ||
138 | $result = $this->client->bilateral($params['uid'], $params['page'], $params['count']); | 138 | $result = $this->client->bilateral($params['uid'], $params['page'], $params['count']); |
139 | 139 | ||
@@ -163,7 +163,7 @@ class Call extends Factory | @@ -163,7 +163,7 @@ class Call extends Factory | ||
163 | { | 163 | { |
164 | $content .= $link; | 164 | $content .= $link; |
165 | 165 | ||
166 | - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); | 166 | + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); |
167 | 167 | ||
168 | $response = $this->client->upload($content, $image); | 168 | $response = $this->client->upload($content, $image); |
169 | 169 | ||
@@ -190,7 +190,7 @@ class Call extends Factory | @@ -190,7 +190,7 @@ class Call extends Factory | ||
190 | 190 | ||
191 | if (is_array($token) && isset($token['access_token'])) | 191 | if (is_array($token) && isset($token['access_token'])) |
192 | { | 192 | { |
193 | - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); | 193 | + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); |
194 | 194 | ||
195 | if ($uid !== null) | 195 | if ($uid !== null) |
196 | { | 196 | { |
@@ -218,7 +218,7 @@ class Call extends Factory | @@ -218,7 +218,7 @@ class Call extends Factory | ||
218 | 218 | ||
219 | if (is_array($token) && isset($token['access_token']) && is_string($content)) | 219 | if (is_array($token) && isset($token['access_token']) && is_string($content)) |
220 | { | 220 | { |
221 | - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); | 221 | + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); |
222 | 222 | ||
223 | $this->client->update($content); | 223 | $this->client->update($content); |
224 | } | 224 | } |
@@ -238,7 +238,7 @@ class Call extends Factory | @@ -238,7 +238,7 @@ class Call extends Factory | ||
238 | { | 238 | { |
239 | if (is_array($token) && isset($token['access_token']) && isset($uid)) | 239 | if (is_array($token) && isset($token['access_token']) && isset($uid)) |
240 | { | 240 | { |
241 | - $this->client = new SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); | 241 | + $this->client = new \SaeTClientV2($this->apiConfig['appId'], $this->apiConfig['appKey'], $token['access_token']); |
242 | $this->client->send_dm_by_id($uid, $content, $id); | 242 | $this->client->send_dm_by_id($uid, $content, $id); |
243 | } | 243 | } |
244 | } | 244 | } |
@@ -18,13 +18,14 @@ var introUrl = $('#introUrl').val(), | @@ -18,13 +18,14 @@ var introUrl = $('#introUrl').val(), | ||
18 | var sizeSwiper, | 18 | var sizeSwiper, |
19 | refSwiper; | 19 | refSwiper; |
20 | 20 | ||
21 | -require('../recommend-for-you.js'); | ||
22 | - | ||
23 | //判断是否要显示向左滑动提示 | 21 | //判断是否要显示向左滑动提示 |
24 | function hiddenTips($ele) { | 22 | function hiddenTips($ele) { |
23 | + var offsetContainer, | ||
24 | + offsetLastColumn; | ||
25 | + | ||
25 | if ($ele.length > 0) { | 26 | if ($ele.length > 0) { |
26 | - var offsetContainer = $ele[0].getBoundingClientRect().right; | ||
27 | - var offsetLastColumn = $ele.find('.swiper-slide:last-child')[0].getBoundingClientRect().right; | 27 | + offsetContainer = $ele[0].getBoundingClientRect().right; |
28 | + offsetLastColumn = $ele.find('.swiper-slide:last-child')[0].getBoundingClientRect().right; | ||
28 | 29 | ||
29 | 30 | ||
30 | if (offsetLastColumn - offsetContainer < 0) { | 31 | if (offsetLastColumn - offsetContainer < 0) { |
@@ -17,6 +17,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'), | @@ -17,6 +17,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'), | ||
17 | 17 | ||
18 | require('./desc'); | 18 | require('./desc'); |
19 | require('./comments-consults'); | 19 | require('./comments-consults'); |
20 | +require('../recommend-for-you-product-desc'); | ||
20 | 21 | ||
21 | //add extra marign-bottom for footer to show the yoho copyright | 22 | //add extra marign-bottom for footer to show the yoho copyright |
22 | function showFooter() { | 23 | function showFooter() { |
static/js/product/detail/loadmore.js
deleted
100644 → 0
1 | -/** | ||
2 | - * 商品详情 --滚动页面加载 | ||
3 | - * @author: Lynnic | ||
4 | - * @date: 2015/11/25 | ||
5 | - */ | ||
6 | - | ||
7 | -// var $ = require('jquery'), | ||
8 | -// loading = require('../../plugin/loading'), | ||
9 | -// tip = require('../../plugin/tip'); | ||
10 | - | ||
11 | -// var loadMoreUrl = $('#loadMoreUrl').val(), | ||
12 | -// $commentsDiv = $('#goods-comments'), | ||
13 | -// $consultsDiv = $('#goods-consults'), | ||
14 | -// winH = $(window).height(), | ||
15 | -// searching = false, | ||
16 | -// end = false; | ||
17 | - | ||
18 | -// var jsonObj; | ||
19 | - | ||
20 | -// //插入评论列表底部 | ||
21 | -// function insertCommentsDiv(json) { | ||
22 | -// var html = ''; | ||
23 | -// var i; | ||
24 | - | ||
25 | - | ||
26 | -// for (i = 0; i < json.length; i++) { | ||
27 | -// html += '<div class="comment-item">'; | ||
28 | -// html += '<span class="user-name">' + json[i].userName + '</span>'; | ||
29 | -// html += '<span class="goods-spec">' + json[i].desc + '</span>'; | ||
30 | -// html += '<span class="goods-spec">' + json[i].content + '</span>'; | ||
31 | -// html += '<span class="goods-spec">' + json[i].time + '</span>'; | ||
32 | -// } | ||
33 | -// $commentsDiv.append(html); | ||
34 | -// } | ||
35 | - | ||
36 | -// //插入咨询列表底部 | ||
37 | -// function insertConsultsDiv(json) { | ||
38 | -// var html = ''; | ||
39 | -// var i; | ||
40 | - | ||
41 | - | ||
42 | -// for (i = 0; i < json.length; i++) { | ||
43 | -// html += '<div class="consult-item"> '; | ||
44 | -// html += '<div class="question"> '; | ||
45 | -// html += '<span class="iconfont"></span> '; | ||
46 | -// html += '<p> '; | ||
47 | -// html += json[i].question + '<br> '; | ||
48 | -// html += '<span class="time">' + json[i].time + '</span> '; | ||
49 | -// html += '</p> '; | ||
50 | -// html += '</div> '; | ||
51 | - | ||
52 | -// html += '<div class="answer"> '; | ||
53 | -// html += '<span class="iconfont"></span> '; | ||
54 | -// html += '<p>' + json[i].answer + '</p> '; | ||
55 | -// html += '</div> '; | ||
56 | -// html += '</div> '; | ||
57 | -// } | ||
58 | -// $consultsDiv.append(html); | ||
59 | -// } | ||
60 | - | ||
61 | -// function search() { | ||
62 | -// if (searching || end) { | ||
63 | -// return; | ||
64 | -// } | ||
65 | -// searching = true; | ||
66 | - | ||
67 | -// loading.showLoadingMask(); | ||
68 | - | ||
69 | -// $.ajax({ | ||
70 | -// type: 'GET', | ||
71 | -// url: loadMoreUrl, | ||
72 | -// success: function(data) { | ||
73 | -// if (data.length > 0) { | ||
74 | -// jsonObj = JSON.parse(data); | ||
75 | -// if ($commentsDiv.length > 0) { | ||
76 | -// insertCommentsDiv(jsonObj); | ||
77 | -// } else if ($consultsDiv.length > 0) { | ||
78 | -// insertConsultsDiv(jsonObj); | ||
79 | -// } | ||
80 | -// } | ||
81 | -// searching = false; | ||
82 | -// end = true; | ||
83 | -// loading.hideLoadingMask(); | ||
84 | -// }, | ||
85 | -// error: function() { | ||
86 | -// tip.show('网络断开连接了~'); | ||
87 | -// searching = false; | ||
88 | -// loading.hideLoadingMask(); | ||
89 | -// } | ||
90 | -// }); | ||
91 | -// } | ||
92 | - | ||
93 | - | ||
94 | -// function scrollHandler() { | ||
95 | -// if (!end || $(window).scrollTop() + winH >= $(document).height() - 50) { | ||
96 | -// search(); | ||
97 | -// } | ||
98 | -// } | ||
99 | - | ||
100 | -// //srcoll to load more | ||
101 | -// $(window).scroll(function() { | ||
102 | -// window.requestAnimationFrame(scrollHandler); | ||
103 | -// }); |
@@ -8,6 +8,6 @@ require('./newsale/newarrival'); | @@ -8,6 +8,6 @@ require('./newsale/newarrival'); | ||
8 | require('./newsale/discount'); | 8 | require('./newsale/discount'); |
9 | require('./list'); | 9 | require('./list'); |
10 | require('./detail/detail'); | 10 | require('./detail/detail'); |
11 | -require('./detail/loadmore'); | ||
12 | require('./detail/consultform'); | 11 | require('./detail/consultform'); |
13 | -require('./newsale/hot-rank'); | ||
12 | +require('./newsale/hot-rank'); | ||
13 | + |
1 | +/** | ||
2 | + * 为您优选 | ||
3 | + * @author: liangzhifeng<zhifeng.liang@yoho.cn> | ||
4 | + * @date: 2015/11/16 | ||
5 | + */ | ||
6 | + | ||
7 | + | ||
8 | +var Swiper = require('yoho.iswiper'), | ||
9 | + $ = require('jquery'); | ||
10 | + | ||
11 | +var recommendSwiper, | ||
12 | + $recommendForYou = $('.recommend-for-you'), | ||
13 | + preferenceUrl = $('#preferenceUrl').val(); | ||
14 | + | ||
15 | +if (preferenceUrl) { | ||
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 | + }); | ||
26 | + } | ||
27 | + }).fail(function() { | ||
28 | + $recommendForYou.hide(); | ||
29 | + }); | ||
30 | +} |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | width: pxToRem(126px); | 24 | width: pxToRem(126px); |
25 | height: pxToRem(126px); | 25 | height: pxToRem(126px); |
26 | border-radius: 50%; | 26 | border-radius: 50%; |
27 | - border: pxToRem(6px) solid #a7a8a9; | 27 | + border: pxToRem(6px) solid #a7a8a9; |
28 | background-image: image-url("me/index/user-avatar.png"); | 28 | background-image: image-url("me/index/user-avatar.png"); |
29 | background-size: 100%; | 29 | background-size: 100%; |
30 | } | 30 | } |
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | } | 46 | } |
47 | 47 | ||
48 | .vip-3 { | 48 | .vip-3 { |
49 | - @include rem-sprite($vip, vip-3); | 49 | + @include rem-sprite($vip, vip-3); |
50 | } | 50 | } |
51 | 51 | ||
52 | .vip-2 { | 52 | .vip-2 { |
@@ -91,7 +91,7 @@ | @@ -91,7 +91,7 @@ | ||
91 | font-size: pxToRem(22px); | 91 | font-size: pxToRem(22px); |
92 | line-height: pxToRem(38px); | 92 | line-height: pxToRem(38px); |
93 | width: pxToRem(213px); | 93 | width: pxToRem(213px); |
94 | - | 94 | + |
95 | &:after { | 95 | &:after { |
96 | content: ''; | 96 | content: ''; |
97 | position: absolute; | 97 | position: absolute; |
@@ -153,16 +153,17 @@ | @@ -153,16 +153,17 @@ | ||
153 | 153 | ||
154 | .num { | 154 | .num { |
155 | position: absolute; | 155 | position: absolute; |
156 | - padding: 0 pxToRem(8px); | ||
157 | - top: 0; | ||
158 | - right: pxToRem(40px); | ||
159 | - min-width: pxToRem(16px); | ||
160 | - font-size: pxToRem(24px); | ||
161 | - line-height: pxToRem(32px); | 156 | + top: pxToRem(-24px); |
157 | + right: pxToRem(36px); | ||
158 | + width: pxToRem(72px); | ||
159 | + height: pxToRem(72px); | ||
160 | + font-size: pxToRem(40px); | ||
161 | + line-height: pxToRem(72px); | ||
162 | color: #fff; | 162 | color: #fff; |
163 | - background: #F03D35; | 163 | + background: #f03d35; |
164 | text-align: center; | 164 | text-align: center; |
165 | - border-radius: pxToRem(20px); | 165 | + border-radius: 50%; |
166 | + @include transform(scale(0.5)); | ||
166 | } | 167 | } |
167 | } | 168 | } |
168 | 169 | ||
@@ -184,7 +185,7 @@ | @@ -184,7 +185,7 @@ | ||
184 | padding: 0 pxToRem(30px); | 185 | padding: 0 pxToRem(30px); |
185 | font-size: pxToRem(32px); | 186 | font-size: pxToRem(32px); |
186 | line-height: pxToRem(88px); | 187 | line-height: pxToRem(88px); |
187 | - | 188 | + |
188 | &.highlight { | 189 | &.highlight { |
189 | background: #eee; | 190 | background: #eee; |
190 | } | 191 | } |
@@ -214,4 +215,4 @@ | @@ -214,4 +215,4 @@ | ||
214 | float: right; | 215 | float: right; |
215 | } | 216 | } |
216 | } | 217 | } |
217 | -} | ||
218 | +} |
@@ -44,22 +44,22 @@ | @@ -44,22 +44,22 @@ | ||
44 | <a class="type-item" href="/home/order?type=2"> | 44 | <a class="type-item" href="/home/order?type=2"> |
45 | <span class="iconfont"></span> | 45 | <span class="iconfont"></span> |
46 | <br>待付款 | 46 | <br>待付款 |
47 | - {{#if pendingPaymentCount}} | ||
48 | - <span class="num">{{pendingPaymentCount}}</span> | 47 | + {{#if wait_pay_num}} |
48 | + <span class="num">{{wait_pay_num}}</span> | ||
49 | {{/if}} | 49 | {{/if}} |
50 | </a> | 50 | </a> |
51 | <a class="type-item" href="/home/order?type=3"> | 51 | <a class="type-item" href="/home/order?type=3"> |
52 | <span class="iconfont"></span> | 52 | <span class="iconfont"></span> |
53 | <br>待发货 | 53 | <br>待发货 |
54 | - {{#if dueOutGoodsCount}} | ||
55 | - <span class="num">{{dueOutGoodsCount}}</span> | 54 | + {{#if wait_cargo_num}} |
55 | + <span class="num">{{wait_cargo_num}}</span> | ||
56 | {{/if}} | 56 | {{/if}} |
57 | </a> | 57 | </a> |
58 | <a class="type-item" href="/home/order?type=4"> | 58 | <a class="type-item" href="/home/order?type=4"> |
59 | <span class="iconfont"></span> | 59 | <span class="iconfont"></span> |
60 | <br>待收货 | 60 | <br>待收货 |
61 | - {{#if dueInGoodsCount}} | ||
62 | - <span class="num">{{dueInGoodsCount}}</span> | 61 | + {{#if send_cargo_num}} |
62 | + <span class="num">{{send_cargo_num}}</span> | ||
63 | {{/if}} | 63 | {{/if}} |
64 | </a> | 64 | </a> |
65 | </div> | 65 | </div> |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | {{# is_discount}} | 12 | {{# is_discount}} |
13 | <p class="good-tag sale-tag">SALE</p> | 13 | <p class="good-tag sale-tag">SALE</p> |
14 | {{/ is_discount}} | 14 | {{/ is_discount}} |
15 | - {{# is_yohoood}} | 15 | + {{# is_yohood}} |
16 | <div class="good-tag yohood-tag">新品节</div> | 16 | <div class="good-tag yohood-tag">新品节</div> |
17 | {{/ is_yohoood}} | 17 | {{/ is_yohoood}} |
18 | {{# is_limited}} | 18 | {{# is_limited}} |
@@ -136,6 +136,9 @@ | @@ -136,6 +136,9 @@ | ||
136 | {{#if id}} | 136 | {{#if id}} |
137 | <input id="productId" type="hidden" value="{{id}}"> | 137 | <input id="productId" type="hidden" value="{{id}}"> |
138 | {{/if}} | 138 | {{/if}} |
139 | - | 139 | + {{#if preferenceUrl}} |
140 | + <input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}"> | ||
141 | + {{/if}} | ||
142 | + | ||
140 | </div> | 143 | </div> |
141 | {{> layout/footer}} | 144 | {{> layout/footer}} |
@@ -46,7 +46,8 @@ class HomeController extends AbstractAction | @@ -46,7 +46,8 @@ class HomeController extends AbstractAction | ||
46 | $data = array( | 46 | $data = array( |
47 | 'myIndexPage' => true, | 47 | 'myIndexPage' => true, |
48 | 'showDownloadApp' => true, | 48 | 'showDownloadApp' => true, |
49 | - 'pageFooter' => true | 49 | + 'pageFooter' => true, |
50 | + 'cartUrl' => Helpers::url('/cart/index/index', null), | ||
50 | ); | 51 | ); |
51 | $uid = $this->getUid(true); | 52 | $uid = $this->getUid(true); |
52 | if ($uid) { | 53 | if ($uid) { |
@@ -62,10 +62,9 @@ class UserModel | @@ -62,10 +62,9 @@ class UserModel | ||
62 | 'brand_favorite_total', | 62 | 'brand_favorite_total', |
63 | 'product_favorite_total', | 63 | 'product_favorite_total', |
64 | 'product_browse', | 64 | 'product_browse', |
65 | - 'dueInGoodsCount', | ||
66 | - 'dueOutGoodsCount', | ||
67 | - 'pendingPaymentCount', | ||
68 | - 'refundGoodsCount' | 65 | + 'send_cargo_num', |
66 | + 'wait_cargo_num', | ||
67 | + 'wait_pay_num', | ||
69 | ); | 68 | ); |
70 | foreach ($infoNumData['data'] as $key => &$val) { | 69 | foreach ($infoNumData['data'] as $key => &$val) { |
71 | 70 |
@@ -16,7 +16,7 @@ class LoginController extends AbstractAction | @@ -16,7 +16,7 @@ class LoginController extends AbstractAction | ||
16 | * 登录页 | 16 | * 登录页 |
17 | */ | 17 | */ |
18 | public function indexAction() | 18 | public function indexAction() |
19 | - { | 19 | + { |
20 | $this->setTitle('登录'); | 20 | $this->setTitle('登录'); |
21 | 21 | ||
22 | $refer = $this->get('refer'); | 22 | $refer = $this->get('refer'); |
@@ -67,14 +67,15 @@ class LoginController extends AbstractAction | @@ -67,14 +67,15 @@ class LoginController extends AbstractAction | ||
67 | 67 | ||
68 | /** | 68 | /** |
69 | * 退出 | 69 | * 退出 |
70 | - * | ||
71 | - * @todo | ||
72 | */ | 70 | */ |
73 | public function outAction() | 71 | public function outAction() |
74 | { | 72 | { |
75 | $this->setCookie('_UID', ''); | 73 | $this->setCookie('_UID', ''); |
76 | 74 | ||
77 | $refer = $this->server('HTTP_REFERER', SITE_MAIN); | 75 | $refer = $this->server('HTTP_REFERER', SITE_MAIN); |
76 | + $token = $this->get('token'); | ||
77 | + | ||
78 | + LoginData::signoutSession($token); | ||
78 | 79 | ||
79 | $this->go($refer); | 80 | $this->go($refer); |
80 | } | 81 | } |
@@ -126,6 +127,7 @@ class LoginController extends AbstractAction | @@ -126,6 +127,7 @@ class LoginController extends AbstractAction | ||
126 | } | 127 | } |
127 | $data['data']['session'] = Helpers::syncUserSession($data['data']['uid']); | 128 | $data['data']['session'] = Helpers::syncUserSession($data['data']['uid']); |
128 | $data['data']['href'] = $refer; | 129 | $data['data']['href'] = $refer; |
130 | + | ||
129 | } while (false); | 131 | } while (false); |
130 | 132 | ||
131 | $this->echoJson($data); | 133 | $this->echoJson($data); |
@@ -40,6 +40,13 @@ routes.interational.route.module = Passport | @@ -40,6 +40,13 @@ routes.interational.route.module = Passport | ||
40 | routes.interational.route.controller = Login | 40 | routes.interational.route.controller = Login |
41 | routes.interational.route.action = International | 41 | routes.interational.route.action = International |
42 | 42 | ||
43 | +; 登录页 | ||
44 | +routes.logout.type = "rewrite" | ||
45 | +routes.logout.match = "/passport/signout/index" | ||
46 | +routes.logout.route.module = Passport | ||
47 | +routes.logout.route.controller = Login | ||
48 | +routes.logout.route.action = out | ||
49 | + | ||
43 | ; 找回密码(手机号) | 50 | ; 找回密码(手机号) |
44 | routes.phoneback.type = "rewrite" | 51 | routes.phoneback.type = "rewrite" |
45 | routes.phoneback.match = "/phoneback.html" | 52 | routes.phoneback.match = "/phoneback.html" |
-
Please register or login to post a comment