Authored by 毕凯

Merge branch 'master' into release/4.5

@@ -25,6 +25,7 @@ class PayData @@ -25,6 +25,7 @@ class PayData
25 { 25 {
26 $param = Yohobuy::param(); 26 $param = Yohobuy::param();
27 $param['client_type'] = 'web'; 27 $param['client_type'] = 'web';
  28 + $param['uid'] = intval($uid);
28 $param['private_key'] = Yohobuy::$privateKeyList['web']; 29 $param['private_key'] = Yohobuy::$privateKeyList['web'];
29 $param['method'] = 'web.SpaceOrders.getOrderCountByUid'; 30 $param['method'] = 'web.SpaceOrders.getOrderCountByUid';
30 31
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 </li> 45 </li>
46 <li> 46 <li>
47 <i class="tell-icon iconfont">&#xe61c;</i> 47 <i class="tell-icon iconfont">&#xe61c;</i>
48 - <span>400-9889-9646</span> 48 + <span>400-8899-646</span>
49 </li> 49 </li>
50 {{/ tool}} 50 {{/ tool}}
51 </ul> 51 </ul>

48.3 KB | W: | H:

48.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

8.64 KB | W: | H:

8.64 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 { 1 {
2 "name": "web-yohobuy", 2 "name": "web-yohobuy",
3 - "version": "0.0.26", 3 + "version": "0.0.27",
4 "description": "web yohobuy static", 4 "description": "web yohobuy static",
5 "keywords": [], 5 "keywords": [],
6 "homepage": "", 6 "homepage": "",
@@ -199,13 +199,19 @@ class ItemModel @@ -199,13 +199,19 @@ class ItemModel
199 199
200 if (!empty($banner['brandId'])) { 200 if (!empty($banner['brandId'])) {
201 $domainBrand = BrandsModel::getBrandByDomain($banner['brandDomain']); 201 $domainBrand = BrandsModel::getBrandByDomain($banner['brandDomain']);
202 - if (empty($domainBrand['type']) || $domainBrand['type'] !== 2) {  
203 - //多品店不显示  
204 - $banner = array();  
205 - } else {  
206 - $basisData = ShopModel::basisTemplate($domainBrand['shopId']);  
207 - $banner['bgImg'] = empty($basisData['shopTopBanner']['banner']) ?  
208 - $banner['bgImg'] : $basisData['shopTopBanner']['banner']; 202 + if (!empty($domainBrand['type']) && !empty($domainBrand['shopId'])) {
  203 + switch (intval($domainBrand['type'])) {
  204 + case 1:
  205 + //多品店不显示
  206 + $banner = array();
  207 + break;
  208 + case 2:
  209 + //单品店显示新版的店铺banner
  210 + $basisData = ShopModel::basisTemplate($domainBrand['shopId']);
  211 + $banner['bgImg'] = empty($basisData['shopTopBanner']['banner']) ?
  212 + $banner['bgImg'] : $basisData['shopTopBanner']['banner'];
  213 + break;
  214 + }
209 } 215 }
210 } 216 }
211 217
@@ -426,7 +426,10 @@ class ShopModel @@ -426,7 +426,10 @@ class ShopModel
426 } 426 }
427 } 427 }
428 428
429 - return $result; 429 + return array(
  430 + 'title' => empty($result[0]['title']) ? '' : $result[0]['title'],
  431 + 'list'=> $result
  432 + );
430 } 433 }
431 434
432 /** 435 /**
@@ -571,13 +574,8 @@ class ShopModel @@ -571,13 +574,8 @@ class ShopModel
571 $list = self::$fun(self::getResourceData($list), $parameters); 574 $list = self::$fun(self::getResourceData($list), $parameters);
572 switch ($fun) { 575 switch ($fun) {
573 case 'shopTopBanner': 576 case 'shopTopBanner':
574 - $data[$fun] = $list;  
575 - break;  
576 case 'signboard': 577 case 'signboard':
577 - $data[$fun] = array(  
578 - 'title' => isset($list[0]['title']) ? $list[0]['title'] : '',  
579 - 'list'=> $list  
580 - ); 578 + $data[$fun] = $list;
581 break; 579 break;
582 } 580 }
583 } 581 }
@@ -169,9 +169,10 @@ class PayModel @@ -169,9 +169,10 @@ class PayModel
169 $orderCount = 0; 169 $orderCount = 0;
170 $orders = PayData::getOrderCountByUid($uid); 170 $orders = PayData::getOrderCountByUid($uid);
171 171
172 - if (isset($orders['data']) && !empty($orders['data'])) {  
173 - $orderCount = $orders['data']['total']; 172 + if (!empty($orders['data']['count'])) {
  173 + $orderCount = $orders['data']['count'];
174 } 174 }
  175 +
175 $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false; 176 $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false;
176 // 订单数(用于订单统计) 177 // 订单数(用于订单统计)
177 $result['orderCount'] = $orderCount; 178 $result['orderCount'] = $orderCount;
@@ -173,9 +173,10 @@ class PaymentModel @@ -173,9 +173,10 @@ class PaymentModel
173 //查询用户订单数接口 173 //查询用户订单数接口
174 $orders = PayData::getOrderCountByUid($uid); 174 $orders = PayData::getOrderCountByUid($uid);
175 175
176 - if (isset($orders['data']) && !empty($orders['data'])) {  
177 - $orderCount = $orders['data']['total']; 176 + if (!empty($orders['data']['count'])) {
  177 + $orderCount = $orders['data']['count'];
178 } 178 }
  179 +
179 $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false; 180 $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false;
180 // 订单数(用于订单统计) 181 // 订单数(用于订单统计)
181 $result['orderCount'] = $orderCount; 182 $result['orderCount'] = $orderCount;
@@ -7,7 +7,7 @@ use WebPlugin\UdpLog; @@ -7,7 +7,7 @@ use WebPlugin\UdpLog;
7 7
8 /** 8 /**
9 * 购物车相关的控制器 9 * 购物车相关的控制器
10 - * 10 + *
11 * @name IndexController 11 * @name IndexController
12 * @package Cart 12 * @package Cart
13 * @copyright yoho.inc 13 * @copyright yoho.inc
@@ -24,13 +24,13 @@ class IndexController extends WebAction @@ -24,13 +24,13 @@ class IndexController extends WebAction
24 { 24 {
25 $uid = $this->getUid(false); 25 $uid = $this->getUid(false);
26 $shoppingKey = Helpers::getShoppingKeyByCookie(); 26 $shoppingKey = Helpers::getShoppingKeyByCookie();
27 - 27 +
28 // 显示一次并清除已删除的COOKIE记录 28 // 显示一次并清除已删除的COOKIE记录
29 $cartDelList = $this->getCookie('cart-del-list'); 29 $cartDelList = $this->getCookie('cart-del-list');
30 if (!empty($cartDelList)) { 30 if (!empty($cartDelList)) {
31 $this->setCookie('cart-del-list', ''); 31 $this->setCookie('cart-del-list', '');
32 } 32 }
33 - 33 +
34 $this->setTitle('购物车', true, ' | '); 34 $this->setTitle('购物车', true, ' | ');
35 $this->setSimpleHeader(); 35 $this->setSimpleHeader();
36 $this->_view->display('cart', array( 36 $this->_view->display('cart', array(
@@ -39,10 +39,10 @@ class IndexController extends WebAction @@ -39,10 +39,10 @@ class IndexController extends WebAction
39 'uid' => $uid ? $uid : '', 39 'uid' => $uid ? $uid : '',
40 )); 40 ));
41 } 41 }
42 - 42 +
43 /** 43 /**
44 * 购物车商品选择与取消 44 * 购物车商品选择与取消
45 - * 45 + *
46 * @param string skuList 商品sku列表,json格式,如{"744403":1,"777777":3} 46 * @param string skuList 商品sku列表,json格式,如{"744403":1,"777777":3}
47 * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 47 * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口
48 * @return json 48 * @return json
@@ -61,10 +61,10 @@ class IndexController extends WebAction @@ -61,10 +61,10 @@ class IndexController extends WebAction
61 61
62 $this->echoJson($result); 62 $this->echoJson($result);
63 } 63 }
64 - 64 +
65 /** 65 /**
66 * 修改购物车商品数量 66 * 修改购物车商品数量
67 - * 67 + *
68 * @param int sku 商品到尺码的编吗 68 * @param int sku 商品到尺码的编吗
69 * @param int increaseNum 增加1 69 * @param int increaseNum 增加1
70 * @param int decreaseNum 减少1 70 * @param int decreaseNum 减少1
@@ -76,12 +76,12 @@ class IndexController extends WebAction @@ -76,12 +76,12 @@ class IndexController extends WebAction
76 76
77 if ($this->isAjax()) { 77 if ($this->isAjax()) {
78 $shoppingKey = Helpers::getShoppingKeyByCookie(); 78 $shoppingKey = Helpers::getShoppingKeyByCookie();
79 - 79 +
80 $uid = $this->getUid(false); 80 $uid = $this->getUid(false);
81 $sku = $this->post('sku', 0); 81 $sku = $this->post('sku', 0);
82 $increaseNum = $this->post('increaseNum', null); 82 $increaseNum = $this->post('increaseNum', null);
83 $decreaseNum = $this->post('decreaseNum', null); 83 $decreaseNum = $this->post('decreaseNum', null);
84 - 84 +
85 $result = CartModel::modifyProductNum($uid, $sku, $increaseNum, $decreaseNum, $shoppingKey); 85 $result = CartModel::modifyProductNum($uid, $sku, $increaseNum, $decreaseNum, $shoppingKey);
86 if (!empty($result['code']) && $result['code'] == 200) { 86 if (!empty($result['code']) && $result['code'] == 200) {
87 $this->setShoppingCookie($uid); 87 $this->setShoppingCookie($uid);
@@ -90,10 +90,10 @@ class IndexController extends WebAction @@ -90,10 +90,10 @@ class IndexController extends WebAction
90 90
91 $this->echoJson($result); 91 $this->echoJson($result);
92 } 92 }
93 - 93 +
94 /** 94 /**
95 * 移出购物车 95 * 移出购物车
96 - * 96 + *
97 * @param string skuList 商品sku列表,json格式,如[{"product_sku":1047193,"buy_number":1,"promotion_id":0}] 97 * @param string skuList 商品sku列表,json格式,如[{"product_sku":1047193,"buy_number":1,"promotion_id":0}]
98 * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 98 * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口
99 * @return json 99 * @return json
@@ -112,15 +112,15 @@ class IndexController extends WebAction @@ -112,15 +112,15 @@ class IndexController extends WebAction
112 $this->setShoppingCookie($uid); 112 $this->setShoppingCookie($uid);
113 } 113 }
114 } 114 }
115 - 115 +
116 $this->echoJson($result); 116 $this->echoJson($result);
117 } 117 }
118 118
119 /** 119 /**
120 * 移入收藏夹 120 * 移入收藏夹
121 - * 121 + *
122 * 支持批量移入收藏夹 122 * 支持批量移入收藏夹
123 - * 123 + *
124 * @param string 商品sku列表,json格式,如{"744403":1,"777777":3} 124 * @param string 商品sku列表,json格式,如{"744403":1,"777777":3}
125 * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 125 * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口
126 * @return json 126 * @return json
@@ -141,32 +141,32 @@ class IndexController extends WebAction @@ -141,32 +141,32 @@ class IndexController extends WebAction
141 141
142 $this->echoJson($result); 142 $this->echoJson($result);
143 } 143 }
144 - 144 +
145 /** 145 /**
146 * 检查是否收藏 146 * 检查是否收藏
147 - * 147 + *
148 * @param string sknList 商品productId列表,如["123123","123412"] 148 * @param string sknList 商品productId列表,如["123123","123412"]
149 */ 149 */
150 public function checkFavAction() 150 public function checkFavAction()
151 { 151 {
152 $result = array('code' => 200, 'message' => '是否收藏', 'data' => array()); 152 $result = array('code' => 200, 'message' => '是否收藏', 'data' => array());
153 - 153 +
154 if ($this->isAjax()) { 154 if ($this->isAjax()) {
155 $uid = $this->getUid(false); 155 $uid = $this->getUid(false);
156 $pidList = $this->post('pidList', ''); 156 $pidList = $this->post('pidList', '');
157 $result['data'] = CartModel::checkUserIsFav($uid, $pidList); 157 $result['data'] = CartModel::checkUserIsFav($uid, $pidList);
158 } 158 }
159 - 159 +
160 $this->echoJson($result); 160 $this->echoJson($result);
161 } 161 }
162 - 162 +
163 /** 163 /**
164 * 凑单商品异步请求 164 * 凑单商品异步请求
165 */ 165 */
166 public function getTogetherProductAction() 166 public function getTogetherProductAction()
167 { 167 {
168 - $result = array('code' => 200, 'data' => array(), 'message' => '凑单商品');  
169 - 168 + $result = array('code' => 200, 'data' => array(), 'message' => '凑单商品');
  169 +
170 if ($this->isAjax()) { 170 if ($this->isAjax()) {
171 $page = $this->get('page', 1); 171 $page = $this->get('page', 1);
172 $result = CartModel::getTogetherProduct($page); 172 $result = CartModel::getTogetherProduct($page);
@@ -181,15 +181,15 @@ class IndexController extends WebAction @@ -181,15 +181,15 @@ class IndexController extends WebAction
181 public function getHistroyProductAction() 181 public function getHistroyProductAction()
182 { 182 {
183 $result = array('code' => 200, 'data' => array(), 'message' => '浏览记录'); 183 $result = array('code' => 200, 'data' => array(), 'message' => '浏览记录');
184 - 184 +
185 // 按照产品把明扬的指示,去掉最近浏览记录 185 // 按照产品把明扬的指示,去掉最近浏览记录
186 $this->echoJson($result); exit(); 186 $this->echoJson($result); exit();
187 - 187 +
188 do { 188 do {
189 if (!$this->isAjax()) { 189 if (!$this->isAjax()) {
190 break; 190 break;
191 } 191 }
192 - 192 +
193 $page = $this->get('page', 1); 193 $page = $this->get('page', 1);
194 // $uid = $this->getUid(false); 194 // $uid = $this->getUid(false);
195 // if ($uid) { 195 // if ($uid) {
@@ -197,7 +197,7 @@ class IndexController extends WebAction @@ -197,7 +197,7 @@ class IndexController extends WebAction
197 // $result = CartModel::getBrowseProduct($uid, $udid, $page); 197 // $result = CartModel::getBrowseProduct($uid, $udid, $page);
198 // break; 198 // break;
199 // } 199 // }
200 - 200 +
201 $sknList = $this->getCookie('_browseskn'); 201 $sknList = $this->getCookie('_browseskn');
202 if (empty($sknList)) { 202 if (empty($sknList)) {
203 break; 203 break;
@@ -209,7 +209,7 @@ class IndexController extends WebAction @@ -209,7 +209,7 @@ class IndexController extends WebAction
209 209
210 $this->echoJson($result); 210 $this->echoJson($result);
211 } 211 }
212 - 212 +
213 /** 213 /**
214 * 确认订单 214 * 确认订单
215 */ 215 */
@@ -217,67 +217,67 @@ class IndexController extends WebAction @@ -217,67 +217,67 @@ class IndexController extends WebAction
217 { 217 {
218 $type = $this->get('type', 1); 218 $type = $this->get('type', 1);
219 $refer = Helpers::url('/cart/index/orderEnsure', array('type' => $type)); 219 $refer = Helpers::url('/cart/index/orderEnsure', array('type' => $type));
220 - 220 +
221 // 审判用户是否已登录 221 // 审判用户是否已登录
222 $this->auditJumpLogin(false, $refer); 222 $this->auditJumpLogin(false, $refer);
223 - 223 +
224 $this->setTitle('填写订单', true, ' | '); 224 $this->setTitle('填写订单', true, ' | ');
225 $this->setSimpleHeader(); 225 $this->setSimpleHeader();
226 - 226 +
227 $cartType = ($type == 2) ? 'advance' : 'ordinary'; 227 $cartType = ($type == 2) ? 'advance' : 'ordinary';
228 $isAdvanceCart = ($type == 2) ? true : false; 228 $isAdvanceCart = ($type == 2) ? true : false;
229 $uid = $this->getUid(false); 229 $uid = $this->getUid(false);
230 - 230 +
231 $orderEnsure = CartModel::cartPay($uid, $cartType, $isAdvanceCart); 231 $orderEnsure = CartModel::cartPay($uid, $cartType, $isAdvanceCart);
232 if (empty($orderEnsure)) { 232 if (empty($orderEnsure)) {
233 $this->go(Helpers::url('/shopping/cart')); 233 $this->go(Helpers::url('/shopping/cart'));
234 } 234 }
235 235
236 $this->_view->display('order-ensure', array( 236 $this->_view->display('order-ensure', array(
237 - 'orderEnsurePage' => true, 237 + 'orderEnsurePage' => true,
238 'orderEnsure' => $orderEnsure, 238 'orderEnsure' => $orderEnsure,
239 )); 239 ));
240 } 240 }
241 - 241 +
242 /** 242 /**
243 * 异步获取地址信息 243 * 异步获取地址信息
244 - * 244 + *
245 * @return json 245 * @return json
246 */ 246 */
247 public function getAddressAction() 247 public function getAddressAction()
248 { 248 {
249 $result = array('code' => 200, 'data' => array(), 'message' => '地址信息'); 249 $result = array('code' => 200, 'data' => array(), 'message' => '地址信息');
250 - 250 +
251 if ($this->isAjax()) { 251 if ($this->isAjax()) {
252 $uid = $this->getUid(false); 252 $uid = $this->getUid(false);
253 $result['data'] = CartModel::userAddressList($uid); 253 $result['data'] = CartModel::userAddressList($uid);
254 } 254 }
255 - 255 +
256 $this->echoJson($result); 256 $this->echoJson($result);
257 } 257 }
258 - 258 +
259 /** 259 /**
260 * 设置为默认的地址 260 * 设置为默认的地址
261 - * 261 + *
262 * @param int id 地址ID 262 * @param int id 地址ID
263 * @return json 263 * @return json
264 */ 264 */
265 public function setDefaultAddressAction() 265 public function setDefaultAddressAction()
266 { 266 {
267 $result = array(); 267 $result = array();
268 - 268 +
269 if ($this->isAjax()) { 269 if ($this->isAjax()) {
270 $uid = $this->getUid(false); 270 $uid = $this->getUid(false);
271 $addressId = $this->post('id'); 271 $addressId = $this->post('id');
272 $result = CartModel::setDefaultAddress($uid, $addressId); 272 $result = CartModel::setDefaultAddress($uid, $addressId);
273 } 273 }
274 - 274 +
275 $this->echoJson($result); 275 $this->echoJson($result);
276 } 276 }
277 - 277 +
278 /** 278 /**
279 * 保存地址信息 279 * 保存地址信息
280 - * 280 + *
281 * @param int $id 地址ID ,当修改操作的时候需要传,添加时候不需要传 281 * @param int $id 地址ID ,当修改操作的时候需要传,添加时候不需要传
282 * @param string $address 地址信息 282 * @param string $address 地址信息
283 * @param int $areaCode 城市码 283 * @param int $areaCode 城市码
@@ -292,7 +292,7 @@ class IndexController extends WebAction @@ -292,7 +292,7 @@ class IndexController extends WebAction
292 public function saveAddressAction() 292 public function saveAddressAction()
293 { 293 {
294 $result = array(); 294 $result = array();
295 - 295 +
296 if ($this->isAjax()) { 296 if ($this->isAjax()) {
297 $uid = $this->getUid(false); 297 $uid = $this->getUid(false);
298 $id = $this->post('id', null); 298 $id = $this->post('id', null);
@@ -312,38 +312,38 @@ class IndexController extends WebAction @@ -312,38 +312,38 @@ class IndexController extends WebAction
312 } 312 }
313 } 313 }
314 } 314 }
315 - 315 +
316 $this->echoJson($result); 316 $this->echoJson($result);
317 } 317 }
318 - 318 +
319 /** 319 /**
320 * 删除地址 320 * 删除地址
321 - * 321 + *
322 * @param int id 地址ID 322 * @param int id 地址ID
323 */ 323 */
324 public function delAddressAction() 324 public function delAddressAction()
325 { 325 {
326 $result = array(); 326 $result = array();
327 - 327 +
328 if ($this->isAjax()) { 328 if ($this->isAjax()) {
329 $uid = $this->getUid(false); 329 $uid = $this->getUid(false);
330 $addressId = $this->post('id'); 330 $addressId = $this->post('id');
331 $result = CartModel::delAddress($uid, $addressId); 331 $result = CartModel::delAddress($uid, $addressId);
332 } 332 }
333 - 333 +
334 $this->echoJson($result); 334 $this->echoJson($result);
335 } 335 }
336 - 336 +
337 /** 337 /**
338 * 获取省市区县信息列表 338 * 获取省市区县信息列表
339 - * 339 + *
340 * @param int id 340 * @param int id
341 * @return json 341 * @return json
342 */ 342 */
343 public function getAreaListAction() 343 public function getAreaListAction()
344 { 344 {
345 $result = array('code' => 200, 'message' => '地区信息', 'data' => array()); 345 $result = array('code' => 200, 'message' => '地区信息', 'data' => array());
346 - 346 +
347 if ($this->isAjax()) { 347 if ($this->isAjax()) {
348 $id = $this->get('id', 0); 348 $id = $this->get('id', 0);
349 $result['data'] = CartModel::getAreaList($id); 349 $result['data'] = CartModel::getAreaList($id);
@@ -351,16 +351,16 @@ class IndexController extends WebAction @@ -351,16 +351,16 @@ class IndexController extends WebAction
351 351
352 $this->echoJson($result); 352 $this->echoJson($result);
353 } 353 }
354 - 354 +
355 /** 355 /**
356 * 获取优惠券列表 356 * 获取优惠券列表
357 - * 357 + *
358 * @return json 358 * @return json
359 */ 359 */
360 public function getCouponListAction() 360 public function getCouponListAction()
361 { 361 {
362 $result = array('code' => 200, 'message' => '优惠券信息', 'data' => array()); 362 $result = array('code' => 200, 'message' => '优惠券信息', 'data' => array());
363 - 363 +
364 if ($this->isAjax()) { 364 if ($this->isAjax()) {
365 $uid = $this->getUid(false); 365 $uid = $this->getUid(false);
366 $result['data'] = CartModel::getCouponList($uid); 366 $result['data'] = CartModel::getCouponList($uid);
@@ -368,10 +368,10 @@ class IndexController extends WebAction @@ -368,10 +368,10 @@ class IndexController extends WebAction
368 368
369 $this->echoJson($result); 369 $this->echoJson($result);
370 } 370 }
371 - 371 +
372 /** 372 /**
373 * 购物车选择改变字段,重新运算订单数据 373 * 购物车选择改变字段,重新运算订单数据
374 - * 374 + *
375 * @param string $cartType 购物车类型,ordinary表示普通, advance表示预售 375 * @param string $cartType 购物车类型,ordinary表示普通, advance表示预售
376 * @param int $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运 376 * @param int $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运
377 * @param int $paymentType 支付方式,1表示在线支付,2表示货到付款 377 * @param int $paymentType 支付方式,1表示在线支付,2表示货到付款
@@ -390,17 +390,18 @@ class IndexController extends WebAction @@ -390,17 +390,18 @@ class IndexController extends WebAction
390 $paymentType = $this->post('paymentType', 1); 390 $paymentType = $this->post('paymentType', 1);
391 $couponCode = $this->post('couponCode', null); 391 $couponCode = $this->post('couponCode', null);
392 $yohoCoin = $this->post('yohoCoin', null); 392 $yohoCoin = $this->post('yohoCoin', null);
  393 + $promotionCode = $this->post('promotionCode', null);
393 $redEnvelopes = $this->post('redEnvelopes', null); 394 $redEnvelopes = $this->post('redEnvelopes', null);
394 $uid = $this->getUid(false); 395 $uid = $this->getUid(false);
395 - $result = CartModel::orderCompute($uid, $cartType, $deliveryWay, $paymentType, $couponCode, $yohoCoin, $redEnvelopes); 396 + $result = CartModel::orderCompute($uid, $cartType, $deliveryWay, $paymentType, $couponCode, $promotionCode, $yohoCoin, $redEnvelopes);
396 } 397 }
397 398
398 $this->echoJson($result); 399 $this->echoJson($result);
399 } 400 }
400 - 401 +
401 /** 402 /**
402 * 确认结算订单 403 * 确认结算订单
403 - * 404 + *
404 * @param int $addressId 地址ID 405 * @param int $addressId 地址ID
405 * @param int $cartType 购物车类型ID 406 * @param int $cartType 购物车类型ID
406 * @param int $deliveryTimeId 寄送时间ID 407 * @param int $deliveryTimeId 寄送时间ID
@@ -426,43 +427,44 @@ class IndexController extends WebAction @@ -426,43 +427,44 @@ class IndexController extends WebAction
426 if (!$this->isAjax()) { 427 if (!$this->isAjax()) {
427 break; 428 break;
428 } 429 }
429 - 430 +
430 // 判断用户是否登录 431 // 判断用户是否登录
431 $uid = $this->getUid(false); 432 $uid = $this->getUid(false);
432 if (!$uid) { 433 if (!$uid) {
433 $result['message'] = '请先登录'; 434 $result['message'] = '请先登录';
434 break; 435 break;
435 } 436 }
436 - 437 +
437 $addressId = $this->post('addressId', null); 438 $addressId = $this->post('addressId', null);
438 $cartType = $this->post('cartType', 'ordinary'); // 默认普通购物车 439 $cartType = $this->post('cartType', 'ordinary'); // 默认普通购物车
439 $deliveryTimeId = $this->post('deliveryTimeId', 1); // 默认只工作日配送 440 $deliveryTimeId = $this->post('deliveryTimeId', 1); // 默认只工作日配送
440 $deliveryWayId = $this->post('deliveryWayId', 1); // 默认普通快递 441 $deliveryWayId = $this->post('deliveryWayId', 1); // 默认普通快递
441 $invoiceTitle = $this->post('invoiceTitle', null); // 发票抬头 442 $invoiceTitle = $this->post('invoiceTitle', null); // 发票抬头
442 - $invoiceId = $this->post('invoiceId', null); // 发票类型 443 + $invoiceId = $this->post('invoiceId', null); // 发票类型
443 $paymentId = $this->post('paymentId', 15); // 支付ID 444 $paymentId = $this->post('paymentId', 15); // 支付ID
444 $paymentType = $this->post('paymentType', 1); // 默认在线支付 445 $paymentType = $this->post('paymentType', 1); // 默认在线支付
445 $remark = $this->post('remark', ''); // 备注信息 446 $remark = $this->post('remark', ''); // 备注信息
446 - $couponCode = $this->post('couponCode', null); // 优惠码 447 + $couponCode = $this->post('couponCode', null); // 优惠券
  448 + $promotionCode = $this->post('promotionCode', null); // 优惠码
447 $yohoCoin = $this->post('yohoCoin', 1); // YOHO币 449 $yohoCoin = $this->post('yohoCoin', 1); // YOHO币
448 $isPreContact = $this->post('isPreContact', false); // 送货前是否联系 450 $isPreContact = $this->post('isPreContact', false); // 送货前是否联系
449 $isPrintPrice = $this->post('isPrintPrice', true); // 是否打印价格 451 $isPrintPrice = $this->post('isPrintPrice', true); // 是否打印价格
450 $redEnvelopes = $this->post('redEnvelopes', null); 452 $redEnvelopes = $this->post('redEnvelopes', null);
451 - 453 +
452 // 调用下单接口 454 // 调用下单接口
453 - $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId,  
454 - $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes); 455 + $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId,
  456 + $paymentId, $paymentType, $remark, $couponCode, $promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes);
455 // 判断是否下单成功 457 // 判断是否下单成功
456 if (empty($result['data']['order_code'])) { 458 if (empty($result['data']['order_code'])) {
457 UdpLog::info('【结算信息】判断是否下单成功','order_code'.$result['data']['order_code']); 459 UdpLog::info('【结算信息】判断是否下单成功','order_code'.$result['data']['order_code']);
458 break; 460 break;
459 } 461 }
460 - 462 +
461 // 跳转到支付的URL链接 463 // 跳转到支付的URL链接
462 $result['data']['payUrl'] = Helpers::url('/shopping/pay', array('ordercode' => $result['data']['order_code'])); 464 $result['data']['payUrl'] = Helpers::url('/shopping/pay', array('ordercode' => $result['data']['order_code']));
463 } 465 }
464 while (false); 466 while (false);
465 - 467 +
466 // $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin); 468 // $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin);
467 // 469 //
468 // 记录下单异常的数据 470 // 记录下单异常的数据
@@ -487,10 +489,10 @@ class IndexController extends WebAction @@ -487,10 +489,10 @@ class IndexController extends WebAction
487 // // do nothing 489 // // do nothing
488 // } 490 // }
489 // } 491 // }
490 - 492 +
491 $this->echoJson($result); 493 $this->echoJson($result);
492 } 494 }
493 - 495 +
494 /** 496 /**
495 * 加入购物车 497 * 加入购物车
496 * 498 *
@@ -534,12 +536,12 @@ class IndexController extends WebAction @@ -534,12 +536,12 @@ class IndexController extends WebAction
534 536
535 $this->echoJson($result); 537 $this->echoJson($result);
536 } 538 }
537 - 539 +
538 /** 540 /**
539 * 获取商品信息 541 * 获取商品信息
540 */ 542 */
541 public function getProductInfoAction() 543 public function getProductInfoAction()
542 - { 544 + {
543 $productId = $this->get('productId'); 545 $productId = $this->get('productId');
544 $uid = $this->getUid(); 546 $uid = $this->getUid();
545 $vipLevel = -1; 547 $vipLevel = -1;
@@ -552,10 +554,10 @@ class IndexController extends WebAction @@ -552,10 +554,10 @@ class IndexController extends WebAction
552 } 554 }
553 $this->_view->display('goods-detail', $data); 555 $this->_view->display('goods-detail', $data);
554 } 556 }
555 - 557 +
556 /** 558 /**
557 * 获取购物车商品总数 559 * 获取购物车商品总数
558 - * 560 + *
559 * @return jsonp 561 * @return jsonp
560 */ 562 */
561 public function countAction() 563 public function countAction()
@@ -564,10 +566,10 @@ class IndexController extends WebAction @@ -564,10 +566,10 @@ class IndexController extends WebAction
564 $uid = $this->getUid(false); 566 $uid = $this->getUid(false);
565 $shoppingKey = Helpers::getShoppingKeyByCookie(); 567 $shoppingKey = Helpers::getShoppingKeyByCookie();
566 $result = CartModel::getCartCount($uid, $shoppingKey); 568 $result = CartModel::getCartCount($uid, $shoppingKey);
567 - 569 +
568 $this->helpJsonCallbackResult($callback, 200, '总数', $result); 570 $this->helpJsonCallbackResult($callback, 200, '总数', $result);
569 } 571 }
570 - 572 +
571 /** 573 /**
572 * 设置购物车COOKIE信息 574 * 设置购物车COOKIE信息
573 */ 575 */
@@ -585,5 +587,5 @@ class IndexController extends WebAction @@ -585,5 +587,5 @@ class IndexController extends WebAction
585 ))); 587 )));
586 } 588 }
587 } 589 }
588 -  
589 -}  
  590 +
  591 +}
@@ -5,7 +5,7 @@ use Shopping\PayModel; @@ -5,7 +5,7 @@ use Shopping\PayModel;
5 use WebPlugin\Pay\PayFactory; 5 use WebPlugin\Pay\PayFactory;
6 use WebPlugin\Pay\Rspparams; 6 use WebPlugin\Pay\Rspparams;
7 use WebPlugin\Pay\weixin\PayNotifyCallBack; 7 use WebPlugin\Pay\weixin\PayNotifyCallBack;
8 - 8 +use WebPlugin\UdpLog;
9 /** 9 /**
10 * 支付Notice 10 * 支付Notice
11 */ 11 */
@@ -24,6 +24,7 @@ class NoticeController extends WebAction @@ -24,6 +24,7 @@ class NoticeController extends WebAction
24 public function alipaynoticeAction() 24 public function alipaynoticeAction()
25 { 25 {
26 $res = $this->getParseResponse($_POST, 2); 26 $res = $this->getParseResponse($_POST, 2);
  27 + UdpLog::info("【支付宝异步】,function:alipaynoticeAction,参数", array('pars' => $_POST, 'res' => $res));
27 if ($res->payResult != -1) { 28 if ($res->payResult != -1) {
28 $this->payResultProc($res, 2); 29 $this->payResultProc($res, 2);
29 echo "success"; 30 echo "success";
@@ -37,6 +38,7 @@ class NoticeController extends WebAction @@ -37,6 +38,7 @@ class NoticeController extends WebAction
37 public function alipayreturnAction() 38 public function alipayreturnAction()
38 { 39 {
39 $res = $this->getParseResponse($_GET, 2); 40 $res = $this->getParseResponse($_GET, 2);
  41 + UdpLog::info("【支付宝同步】,function:alipayreturnAction,参数", array('pars' => $_GET, 'res' => $res));
40 $dealResult = $this->payResultProc($res, 2); 42 $dealResult = $this->payResultProc($res, 2);
41 $dealResult['payData'] = array('payWay' => '支付宝'); 43 $dealResult['payData'] = array('payWay' => '支付宝');
42 $this->commonShowResult($dealResult); 44 $this->commonShowResult($dealResult);
@@ -48,6 +50,7 @@ class NoticeController extends WebAction @@ -48,6 +50,7 @@ class NoticeController extends WebAction
48 public function alibarcodenoticeAction() 50 public function alibarcodenoticeAction()
49 { 51 {
50 $res = $this->getParseResponse($_POST, 17); 52 $res = $this->getParseResponse($_POST, 17);
  53 + UdpLog::info("【支付宝二维码支付异步】,function:alibarcodenoticeAction,参数", array('pars' => $_POST, 'res' => $res));
51 if ($res->payResult != -1) { 54 if ($res->payResult != -1) {
52 $this->payResultProc($res, 17); 55 $this->payResultProc($res, 17);
53 echo "success"; 56 echo "success";
@@ -61,6 +64,7 @@ class NoticeController extends WebAction @@ -61,6 +64,7 @@ class NoticeController extends WebAction
61 public function alibarcodereturnAction() 64 public function alibarcodereturnAction()
62 { 65 {
63 $res = $this->getParseResponse($_GET, 17); 66 $res = $this->getParseResponse($_GET, 17);
  67 + UdpLog::info("【支付宝二维码支付同步】,function:alibarcodereturnAction,参数", array('pars' => $_GET, 'res' => $res));
64 $dealResult = $this->payResultProc($res, 17); 68 $dealResult = $this->payResultProc($res, 17);
65 $dealResult['payData'] = array('payWay' => '支付宝'); 69 $dealResult['payData'] = array('payWay' => '支付宝');
66 $this->commonShowResult($dealResult); 70 $this->commonShowResult($dealResult);
@@ -225,6 +229,7 @@ class NoticeController extends WebAction @@ -225,6 +229,7 @@ class NoticeController extends WebAction
225 $uid = $this->getSession(self::SESSION_UID_KEY); 229 $uid = $this->getSession(self::SESSION_UID_KEY);
226 $this->setSession(self::SESSION_UID_KEY, null); 230 $this->setSession(self::SESSION_UID_KEY, null);
227 } 231 }
  232 + UdpLog::info("【微信扫码支付结果商户通知地址】,function:wechatqrcodenotifyAction");
228 $notify = new PayNotifyCallBack($uid); 233 $notify = new PayNotifyCallBack($uid);
229 $notify->handle(false); 234 $notify->handle(false);
230 } 235 }
@@ -248,6 +253,7 @@ class NoticeController extends WebAction @@ -248,6 +253,7 @@ class NoticeController extends WebAction
248 $payment = PayModel::getPaymentById(21); 253 $payment = PayModel::getPaymentById(21);
249 $payService = PayFactory::factory($payment); 254 $payService = PayFactory::factory($payment);
250 $res = $payService->parseResponse(array('orderCode' => $orderCode)); 255 $res = $payService->parseResponse(array('orderCode' => $orderCode));
  256 + UdpLog::info("【微信扫码支付返回】,function:wechatqrcodereturnAction,参数", array('pars' => $_GET, 'res' => $res));
251 $dealResult = $this->payResultProc($res, 21); 257 $dealResult = $this->payResultProc($res, 21);
252 $dealResult['payData'] = array('payWay' => '微信扫码支付'); 258 $dealResult['payData'] = array('payWay' => '微信扫码支付');
253 } while (false); 259 } while (false);
@@ -95,7 +95,7 @@ class IndexController extends WebAction @@ -95,7 +95,7 @@ class IndexController extends WebAction
95 95
96 //调用模型获得品牌页数据 96 //调用模型获得品牌页数据
97 $data = BrandsModel::getBrandSearchData($condition, $options); 97 $data = BrandsModel::getBrandSearchData($condition, $options);
98 - 98 + $data['signboard'] = isset($result['signboard']) ? $result['signboard'] : '';//水牌
99 //统计前三个商品 99 //统计前三个商品
100 $skn=array(); 100 $skn=array();
101 $arr=array(); 101 $arr=array();
@@ -315,7 +315,6 @@ class IndexController extends WebAction @@ -315,7 +315,6 @@ class IndexController extends WebAction
315 */ 315 */
316 public function shopHome($shopId) 316 public function shopHome($shopId)
317 { 317 {
318 - $domain = $this->param('named');  
319 // 设置头部数据 318 // 设置头部数据
320 $this->setWebNavHeader(); 319 $this->setWebNavHeader();
321 $misort = $this->get('misort'); 320 $misort = $this->get('misort');
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets/web" 50 application.assets.path = ROOT_PATH "/assets/web"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.26" 53 +application.version = "0.0.27"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" 56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets/web" 50 application.assets.path = ROOT_PATH "/assets/web"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.26" 53 +application.version = "0.0.27"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" 56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets/web" 50 application.assets.path = ROOT_PATH "/assets/web"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.26" 53 +application.version = "0.0.27"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" 56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets/web" 50 application.assets.path = ROOT_PATH "/assets/web"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.26" 53 +application.version = "0.0.27"
54 54
55 ; 网站SEO信息 55 ; 网站SEO信息
56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" 56 application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"