Authored by ccbikai

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

@@ -388,4 +388,5 @@ $basicBtnC:#eb0313; @@ -388,4 +388,5 @@ $basicBtnC:#eb0313;
388 } 388 }
389 } 389 }
390 @import "comments-consults"; 390 @import "comments-consults";
391 -@import "product-description";  
  391 +@import "product-description";
  392 +
1 .good-detail-page{ 1 .good-detail-page{
2 .goods-desc { 2 .goods-desc {
3 .service { 3 .service {
4 - width: pxToRem(489px); 4 + width: pxToRem(494px);
5 height: pxToRem(28px); 5 height: pxToRem(28px);
6 margin-top: pxToRem(22px); 6 margin-top: pxToRem(22px);
  7 + margin-left: pxToRem(40px);
  8 + background: image-url('product/service.png') no-repeat;
  9 + background-size: cover;
7 } 10 }
8 .detail{ 11 .detail{
9 background-color: $tableCellC; 12 background-color: $tableCellC;
1 {{#goodsDescription}} 1 {{#goodsDescription}}
2 <div class="goods-desc page-block"> 2 <div class="goods-desc page-block">
3 - <img class="service lazy" data-original="http://static.dev.yohobuy.com/img/product/service.png" alt=""> 3 + <div class="service"></div>
4 <h1 class="title"> 4 <h1 class="title">
5 {{title}} 5 {{title}}
6 <span class="en-title">{{enTitle}}</span> 6 <span class="en-title">{{enTitle}}</span>
@@ -323,7 +323,7 @@ class HomeController extends AbstractAction @@ -323,7 +323,7 @@ class HomeController extends AbstractAction
323 323
324 $this->_view->display('online-service', array( 324 $this->_view->display('online-service', array(
325 'onlineServicePage' => true, 325 'onlineServicePage' => true,
326 - // 'pageFooter' => true, 326 + 'pageFooter' => true,
327 'service' => $service 327 'service' => $service
328 )); 328 ));
329 } 329 }
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 +}