Authored by xuqi

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

@@ -231,10 +231,19 @@ class IndexController extends WebAction @@ -231,10 +231,19 @@ class IndexController extends WebAction
231 if (empty($orderEnsure)) { 231 if (empty($orderEnsure)) {
232 $this->go(Helpers::url('/shopping/cart')); 232 $this->go(Helpers::url('/shopping/cart'));
233 } 233 }
234 - 234 +
  235 + $productListArr = array();
  236 + foreach ($orderEnsure['orderProducts'] as $orderProducts) {
  237 + $productListArr[] = $orderProducts['id'] . ',' . $orderProducts['productNum'];
  238 + }
  239 +
235 $this->_view->display('order-ensure', array( 240 $this->_view->display('order-ensure', array(
236 'orderEnsurePage' => true, 241 'orderEnsurePage' => true,
237 'orderEnsure' => $orderEnsure, 242 'orderEnsure' => $orderEnsure,
  243 + 'pinyou' => array(
  244 + 'money' => $orderEnsure['lastOrderAmount'],
  245 + 'productList' => implode(';', $productListArr)
  246 + )
238 )); 247 ));
239 } 248 }
240 249
@@ -11,13 +11,25 @@ class SearchController extends WebAction @@ -11,13 +11,25 @@ class SearchController extends WebAction
11 11
12 $this->setWebNavHeader(); 12 $this->setWebNavHeader();
13 13
  14 + $list = SearchModel::searchData(array(), array(
  15 + 'controller' => 'Search',
  16 + 'action' => 'index',
  17 + 'reviewNum' => 7, //浏览记录数
  18 + ));
  19 +
  20 + //统计前三个商品
  21 + $skn=array();
  22 + if (isset($list['goods']) && !empty($list['goods'])) {
  23 + $arr = array_slice($list['goods'],0,3);
  24 + foreach ($arr as $key=>$value) {
  25 + $skn[] = $value['skn'];
  26 + }
  27 + }
  28 +
14 $data = array( 29 $data = array(
15 'productListPage' => true, //初始化js 30 'productListPage' => true, //初始化js
16 - 'list' => SearchModel::searchData(array(), array(  
17 - 'controller' => 'Search',  
18 - 'action' => 'index',  
19 - 'reviewNum' => 7, //浏览记录数  
20 - )) 31 + 'list' => $list,
  32 + 'skn' => $skn
21 ); 33 );
22 $data['list']['searchPage'] = true; //设置搜素页面标识,区分列表页-->特有的搜索页导航样式 34 $data['list']['searchPage'] = true; //设置搜素页面标识,区分列表页-->特有的搜索页导航样式
23 if (isset($data['list']['goods']) && empty($data['list']['goods'])) { 35 if (isset($data['list']['goods']) && empty($data['list']['goods'])) {