Authored by Lynnic

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

@@ -9,6 +9,8 @@ var $userAvatar = $('.user-avatar'), @@ -9,6 +9,8 @@ var $userAvatar = $('.user-avatar'),
9 var myImage = new Image(); 9 var myImage = new Image();
10 10
11 require('../product/recommend-for-you.js'); 11 require('../product/recommend-for-you.js');
  12 +require('../product/suspend-cart.js');
  13 +
12 myImage.src = $userAvatar.attr('src'); 14 myImage.src = $userAvatar.attr('src');
13 myImage.onerror = function() { 15 myImage.onerror = function() {
14 $userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png'); 16 $userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
@@ -28,7 +28,12 @@ @@ -28,7 +28,12 @@
28 } 28 }
29 29
30 .username { 30 .username {
  31 + float: left;
31 padding: 0 pxToRem(16px); 32 padding: 0 pxToRem(16px);
  33 + text-overflow: ellipsis;
  34 + overflow: hidden;
  35 + white-space: nowrap;
  36 + max-width: pxToRem(290px);
32 } 37 }
33 38
34 .vip-icon { 39 .vip-icon {
@@ -102,5 +102,8 @@ @@ -102,5 +102,8 @@
102 </div> 102 </div>
103 103
104 {{> product/recommend-for-you}} 104 {{> product/recommend-for-you}}
  105 + {{> product/suspend-cart}}
105 </div> 106 </div>
  107 +
  108 +{{> layout/download_app}}
106 {{> layout/footer}} 109 {{> layout/footer}}
@@ -125,11 +125,11 @@ @@ -125,11 +125,11 @@
125 {{#if numInCart}} 125 {{#if numInCart}}
126 <span class="num-tag">{{numInCart}}</span> 126 <span class="num-tag">{{numInCart}}</span>
127 {{/if}} 127 {{/if}}
128 - <a href="" class="num-incart iconfont">&#xe62c;</a> 128 + <a href="/shoppingCart" class="num-incart iconfont">&#xe62c;</a>
129 {{#if goodsInstore}} 129 {{#if goodsInstore}}
130 - <a href="" class="addto-cart ">加入购物车</a> 130 + <a href="/shoppingCart" class="addto-cart ">加入购物车</a>
131 {{else}} 131 {{else}}
132 - <a href="" class="sold-out">已售罄</a> 132 + <a href="javascript:;" class="sold-out">已售罄</a>
133 {{/if}} 133 {{/if}}
134 134
135 <a href="#" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a> 135 <a href="#" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
@@ -216,6 +216,7 @@ @@ -216,6 +216,7 @@
216 {{#if myIndexPage}} 216 {{#if myIndexPage}}
217 <script> 217 <script>
218 seajs.use('js/me/index'); 218 seajs.use('js/me/index');
  219 + seajs.use('js/index/footer');
219 </script> 220 </script>
220 {{/if}} 221 {{/if}}
221 {{#if orderPage}} 222 {{#if orderPage}}
@@ -51,6 +51,7 @@ class HomeController extends AbstractAction @@ -51,6 +51,7 @@ class HomeController extends AbstractAction
51 51
52 $data = array( 52 $data = array(
53 'myIndexPage' => true, 53 'myIndexPage' => true,
  54 + 'showDownloadApp' => true,
54 'pageFooter' => true 55 'pageFooter' => true
55 ); 56 );
56 $uid = $this->getUid(); 57 $uid = $this->getUid();
@@ -323,7 +324,7 @@ class HomeController extends AbstractAction @@ -323,7 +324,7 @@ class HomeController extends AbstractAction
323 324
324 $this->_view->display('online-service', array( 325 $this->_view->display('online-service', array(
325 'onlineServicePage' => true, 326 'onlineServicePage' => true,
326 - // 'pageFooter' => true, 327 + 'pageFooter' => true,
327 'service' => $service 328 'service' => $service
328 )); 329 ));
329 } 330 }
1 -<?php  
2 -  
3 -namespace Home;  
4 -  
5 -use LibModels\Wap\Home\OnlineData;  
6 -use Plugin\Helpers;  
7 -  
8 -/**  
9 - * 在线客服相关数据处理  
10 - */  
11 -class OnlineModel  
12 -{  
13 -  
14 - /*  
15 - * 获取在线帮助分类  
16 - * $clientType客户端类型  
17 - */  
18 - public static function getOnlineServiceInfo($clientType = 'iphone')  
19 - {  
20 - //调用接口获取数据  
21 - $res = OnlineData::getOnlineServiceInfo($clientType);  
22 - $cateInfo = $res['data'];  
23 - $question = array();  
24 - $tab = array();  
25 - if ($cateInfo)  
26 - {  
27 - foreach ($cateInfo as $key => $value)  
28 - {  
29 - //强制截成3个tab  
30 - if ($key > 2)  
31 - {  
32 - break;  
33 - }  
34 - $tab[$key]['tabid'] = 'tab' . $value['id'];  
35 - $tab[$key]['tabname'] = $value['category_name'];  
36 - $tab[$key]['iscut'] = true;  
37 - $tab[$key]['current'] = (!$key) ? TRUE : FALSE;  
38 - $question[$key]['name'] = 'tab' . $value['id'];  
39 - $question[$key]['current'] = (!$key) ? TRUE : FALSE;  
40 - $sub = $value['sub'];  
41 - $qTmp = array();  
42 - if ($sub)  
43 - {  
44 - foreach ($sub as $sk => $sv)  
45 - {  
46 - $qTmp[$sk]['title'] = $sv['category_name'];  
47 - $qTmp[$sk]['link'] = Helpers::url('/home/onlineservicedetail',array('cateId'=>$sv['id'],'cateName'=>$sv['category_name']));  
48 - }  
49 - }  
50 - $question[$key]['list'] = $qTmp;  
51 - }  
52 - $question[0]['current'] = true;  
53 - $tab[count($tab) - 1]['iscut'] = false;  
54 - }  
55 - //处理返回信息  
56 - $result = array(  
57 - 'header' => array('title' => '在线客服'),  
58 - 'tab' => $tab,  
59 - 'question' => $question  
60 - );  
61 -  
62 - return $result;  
63 - }  
64 -  
65 - /*  
66 - * 加载分类下的问题和解决方法  
67 - * cateId问题分类ID  
68 - * clientType客户端  
69 - */  
70 - public static function getOnlineServiceDetail($cateId, $clinetType = 'iphone')  
71 - {  
72 - $result = array();  
73 - if (!$cateId)  
74 - {  
75 - return $result;  
76 - }  
77 - $res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);  
78 - $questionInfo = $res['data'];  
79 - if ($questionInfo)  
80 - {  
81 - $list = array();  
82 - if ($questionInfo)  
83 - {  
84 - foreach ($questionInfo as $qk => $qv)  
85 - {  
86 - $list[$qk]['q'] = $qv['title'];  
87 - $list[$qk]['a'] = $qv['content'];  
88 - }  
89 - }  
90 - //处理返回信息  
91 - $result = array(  
92 - 'header' => array('title' => '在线客服'),  
93 - 'list' => $list  
94 - );  
95 - }  
96 - return $result;  
97 - }  
98 -  
99 -} 1 +<?php
  2 +
  3 +namespace Home;
  4 +
  5 +use LibModels\Wap\Home\OnlineData;
  6 +use Plugin\Helpers;
  7 +
  8 +/**
  9 + * 在线客服相关数据处理
  10 + */
  11 +class OnlineModel
  12 +{
  13 +
  14 + /*
  15 + * 获取在线帮助分类
  16 + * $clientType客户端类型
  17 + */
  18 + public static function getOnlineServiceInfo($clientType = 'iphone')
  19 + {
  20 + //调用接口获取数据
  21 + $res = OnlineData::getOnlineServiceInfo($clientType);
  22 + $cateInfo = $res['data'];
  23 + $question = array();
  24 + $tab = array();
  25 + if ($cateInfo)
  26 + {
  27 + foreach ($cateInfo as $key => $value)
  28 + {
  29 + //强制截成3个tab
  30 + if ($key > 2)
  31 + {
  32 + break;
  33 + }
  34 + $tab[$key]['tabid'] = 'tab' . $value['id'];
  35 + $tab[$key]['tabname'] = $value['category_name'];
  36 + $tab[$key]['iscut'] = true;
  37 + $tab[$key]['current'] = (!$key) ? TRUE : FALSE;
  38 + $question[$key]['name'] = 'tab' . $value['id'];
  39 + $question[$key]['current'] = (!$key) ? TRUE : FALSE;
  40 + $sub = $value['sub'];
  41 + $qTmp = array();
  42 + if ($sub)
  43 + {
  44 + foreach ($sub as $sk => $sv)
  45 + {
  46 + $qTmp[$sk]['title'] = $sv['category_name'];
  47 + $qTmp[$sk]['link'] = Helpers::url('/home/onlineservicedetail',array('cateId'=>$sv['id'],'cateName'=>$sv['category_name']));
  48 + }
  49 + }
  50 + $question[$key]['list'] = $qTmp;
  51 + }
  52 + $question[0]['current'] = true;
  53 + $tab[count($tab) - 1]['iscut'] = false;
  54 + }
  55 + //处理返回信息
  56 + $result = array(
  57 + 'header' => array('title' => '在线客服'),
  58 + 'tab' => $tab,
  59 + 'question' => $question
  60 + );
  61 +
  62 + return $result;
  63 + }
  64 +
  65 + /*
  66 + * 加载分类下的问题和解决方法
  67 + * cateId问题分类ID
  68 + * clientType客户端
  69 + */
  70 + public static function getOnlineServiceDetail($cateId, $clinetType = 'iphone')
  71 + {
  72 + $result = array();
  73 + if (!$cateId)
  74 + {
  75 + return $result;
  76 + }
  77 + $res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);
  78 + $questionInfo = $res['data'];
  79 + if ($questionInfo)
  80 + {
  81 + $list = array();
  82 + if ($questionInfo)
  83 + {
  84 + foreach ($questionInfo as $qk => $qv)
  85 + {
  86 + $list[$qk]['q'] = $qv['title'];
  87 + $list[$qk]['a'] = $qv['content'];
  88 + }
  89 + }
  90 + //处理返回信息
  91 + $result = array(
  92 + 'header' => array('title' => '在线客服'),
  93 + 'list' => $list
  94 + );
  95 + }
  96 + return $result;
  97 + }
  98 +
  99 +}