Authored by Lynnic

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

... ... @@ -9,6 +9,8 @@ var $userAvatar = $('.user-avatar'),
var myImage = new Image();
require('../product/recommend-for-you.js');
require('../product/suspend-cart.js');
myImage.src = $userAvatar.attr('src');
myImage.onerror = function() {
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
... ...
... ... @@ -28,7 +28,12 @@
}
.username {
float: left;
padding: 0 pxToRem(16px);
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width: pxToRem(290px);
}
.vip-icon {
... ...
... ... @@ -102,5 +102,8 @@
</div>
{{> product/recommend-for-you}}
{{> product/suspend-cart}}
</div>
{{> layout/download_app}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -125,11 +125,11 @@
{{#if numInCart}}
<span class="num-tag">{{numInCart}}</span>
{{/if}}
<a href="" class="num-incart iconfont">&#xe62c;</a>
<a href="/shoppingCart" class="num-incart iconfont">&#xe62c;</a>
{{#if goodsInstore}}
<a href="" class="addto-cart ">加入购物车</a>
<a href="/shoppingCart" class="addto-cart ">加入购物车</a>
{{else}}
<a href="" class="sold-out">已售罄</a>
<a href="javascript:;" class="sold-out">已售罄</a>
{{/if}}
<a href="#" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
... ...
... ... @@ -216,6 +216,7 @@
{{#if myIndexPage}}
<script>
seajs.use('js/me/index');
seajs.use('js/index/footer');
</script>
{{/if}}
{{#if orderPage}}
... ...
... ... @@ -51,6 +51,7 @@ class HomeController extends AbstractAction
$data = array(
'myIndexPage' => true,
'showDownloadApp' => true,
'pageFooter' => true
);
$uid = $this->getUid();
... ... @@ -323,7 +324,7 @@ class HomeController extends AbstractAction
$this->_view->display('online-service', array(
'onlineServicePage' => true,
// 'pageFooter' => true,
'pageFooter' => true,
'service' => $service
));
}
... ...
<?php
namespace Home;
use LibModels\Wap\Home\OnlineData;
use Plugin\Helpers;
/**
* 在线客服相关数据处理
*/
class OnlineModel
{
/*
* 获取在线帮助分类
* $clientType客户端类型
*/
public static function getOnlineServiceInfo($clientType = 'iphone')
{
//调用接口获取数据
$res = OnlineData::getOnlineServiceInfo($clientType);
$cateInfo = $res['data'];
$question = array();
$tab = array();
if ($cateInfo)
{
foreach ($cateInfo as $key => $value)
{
//强制截成3个tab
if ($key > 2)
{
break;
}
$tab[$key]['tabid'] = 'tab' . $value['id'];
$tab[$key]['tabname'] = $value['category_name'];
$tab[$key]['iscut'] = true;
$tab[$key]['current'] = (!$key) ? TRUE : FALSE;
$question[$key]['name'] = 'tab' . $value['id'];
$question[$key]['current'] = (!$key) ? TRUE : FALSE;
$sub = $value['sub'];
$qTmp = array();
if ($sub)
{
foreach ($sub as $sk => $sv)
{
$qTmp[$sk]['title'] = $sv['category_name'];
$qTmp[$sk]['link'] = Helpers::url('/home/onlineservicedetail',array('cateId'=>$sv['id'],'cateName'=>$sv['category_name']));
}
}
$question[$key]['list'] = $qTmp;
}
$question[0]['current'] = true;
$tab[count($tab) - 1]['iscut'] = false;
}
//处理返回信息
$result = array(
'header' => array('title' => '在线客服'),
'tab' => $tab,
'question' => $question
);
return $result;
}
/*
* 加载分类下的问题和解决方法
* cateId问题分类ID
* clientType客户端
*/
public static function getOnlineServiceDetail($cateId, $clinetType = 'iphone')
{
$result = array();
if (!$cateId)
{
return $result;
}
$res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);
$questionInfo = $res['data'];
if ($questionInfo)
{
$list = array();
if ($questionInfo)
{
foreach ($questionInfo as $qk => $qv)
{
$list[$qk]['q'] = $qv['title'];
$list[$qk]['a'] = $qv['content'];
}
}
//处理返回信息
$result = array(
'header' => array('title' => '在线客服'),
'list' => $list
);
}
return $result;
}
}
<?php
namespace Home;
use LibModels\Wap\Home\OnlineData;
use Plugin\Helpers;
/**
* 在线客服相关数据处理
*/
class OnlineModel
{
/*
* 获取在线帮助分类
* $clientType客户端类型
*/
public static function getOnlineServiceInfo($clientType = 'iphone')
{
//调用接口获取数据
$res = OnlineData::getOnlineServiceInfo($clientType);
$cateInfo = $res['data'];
$question = array();
$tab = array();
if ($cateInfo)
{
foreach ($cateInfo as $key => $value)
{
//强制截成3个tab
if ($key > 2)
{
break;
}
$tab[$key]['tabid'] = 'tab' . $value['id'];
$tab[$key]['tabname'] = $value['category_name'];
$tab[$key]['iscut'] = true;
$tab[$key]['current'] = (!$key) ? TRUE : FALSE;
$question[$key]['name'] = 'tab' . $value['id'];
$question[$key]['current'] = (!$key) ? TRUE : FALSE;
$sub = $value['sub'];
$qTmp = array();
if ($sub)
{
foreach ($sub as $sk => $sv)
{
$qTmp[$sk]['title'] = $sv['category_name'];
$qTmp[$sk]['link'] = Helpers::url('/home/onlineservicedetail',array('cateId'=>$sv['id'],'cateName'=>$sv['category_name']));
}
}
$question[$key]['list'] = $qTmp;
}
$question[0]['current'] = true;
$tab[count($tab) - 1]['iscut'] = false;
}
//处理返回信息
$result = array(
'header' => array('title' => '在线客服'),
'tab' => $tab,
'question' => $question
);
return $result;
}
/*
* 加载分类下的问题和解决方法
* cateId问题分类ID
* clientType客户端
*/
public static function getOnlineServiceDetail($cateId, $clinetType = 'iphone')
{
$result = array();
if (!$cateId)
{
return $result;
}
$res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);
$questionInfo = $res['data'];
if ($questionInfo)
{
$list = array();
if ($questionInfo)
{
foreach ($questionInfo as $qk => $qv)
{
$list[$qk]['q'] = $qv['title'];
$list[$qk]['a'] = $qv['content'];
}
}
//处理返回信息
$result = array(
'header' => array('title' => '在线客服'),
'list' => $list
);
}
return $result;
}
}
... ...