1修复频道一览页面banner被遮挡问题, 2购买咨询页面加入常见问题
Showing
5 changed files
with
20 additions
and
34 deletions
@@ -71,23 +71,26 @@ | @@ -71,23 +71,26 @@ | ||
71 | color: $subFontC; | 71 | color: $subFontC; |
72 | } | 72 | } |
73 | } | 73 | } |
74 | - .goods-consults { | ||
75 | - margin-top: 5.25rem; | ||
76 | - overflow: hidden; | 74 | + .goods-consults.customer-consults { |
77 | .consult-item:nth-child(1) { | 75 | .consult-item:nth-child(1) { |
78 | display: block; | 76 | display: block; |
79 | } | 77 | } |
80 | .consult-item:nth-child(2) { | 78 | .consult-item:nth-child(2) { |
81 | display: block; | 79 | display: block; |
82 | } | 80 | } |
83 | - | 81 | + .consult-item { |
82 | + display: none; | ||
83 | + } | ||
84 | + } | ||
85 | + .goods-consults { | ||
86 | + margin-top: 5.25rem; | ||
87 | + overflow: hidden; | ||
84 | .consult-item { | 88 | .consult-item { |
85 | margin-top: pxToRem(30px); | 89 | margin-top: pxToRem(30px); |
86 | padding: pxToRem(20px) pxToRem(28px); | 90 | padding: pxToRem(20px) pxToRem(28px); |
87 | background-color: #fff; | 91 | background-color: #fff; |
88 | border-bottom: 1px solid $borderC; | 92 | border-bottom: 1px solid $borderC; |
89 | border-top: 1px solid $borderC; | 93 | border-top: 1px solid $borderC; |
90 | - display:none; | ||
91 | .question { | 94 | .question { |
92 | font-size: pxToRem(24px); | 95 | font-size: pxToRem(24px); |
93 | color: $mainFontC; | 96 | color: $mainFontC; |
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <a href="{{link}}" class="iconfont enter-consult-page"></a> | 6 | <a href="{{link}}" class="iconfont enter-consult-page"></a> |
7 | </div> | 7 | </div> |
8 | {{# consults}} | 8 | {{# consults}} |
9 | - <div class="goods-consults" id="goods-consults"> | 9 | + <div class="goods-consults customer-consults" id="goods-consults"> |
10 | {{#list}} | 10 | {{#list}} |
11 | <div class="consult-item" data-id="{{id}}"> | 11 | <div class="consult-item" data-id="{{id}}"> |
12 | <div class="question"> | 12 | <div class="question"> |
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | 55 | ||
56 | {{#faq}} | 56 | {{#faq}} |
57 | <div class="goods-consults" style="margin-top:0"> | 57 | <div class="goods-consults" style="margin-top:0"> |
58 | - {{#list}} | 58 | + {{#commonConsults}} |
59 | <div class="faq-item"> | 59 | <div class="faq-item"> |
60 | <div class="question"> | 60 | <div class="question"> |
61 | <span class="iconfont"></span> | 61 | <span class="iconfont"></span> |
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | <p>{{answer}}</p> | 69 | <p>{{answer}}</p> |
70 | </div> | 70 | </div> |
71 | </div> | 71 | </div> |
72 | - {{/list}} | 72 | + {{/commonConsults}} |
73 | </div> | 73 | </div> |
74 | {{/faq}} | 74 | {{/faq}} |
75 | 75 |
@@ -7,7 +7,7 @@ use Plugin\Helpers; | @@ -7,7 +7,7 @@ use Plugin\Helpers; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * 商品详情页模板相关的数据模型 | 9 | * 商品详情页模板相关的数据模型 |
10 | - * | 10 | + * |
11 | * @name DetailModel | 11 | * @name DetailModel |
12 | * @package Product | 12 | * @package Product |
13 | * @copyright yoho.inc | 13 | * @copyright yoho.inc |
@@ -19,7 +19,7 @@ class DetailModel | @@ -19,7 +19,7 @@ class DetailModel | ||
19 | 19 | ||
20 | /** | 20 | /** |
21 | * 商品基本信息 | 21 | * 商品基本信息 |
22 | - * | 22 | + * |
23 | * @param int $productId 商品ID SKN 和 ID 只需要传一个 | 23 | * @param int $productId 商品ID SKN 和 ID 只需要传一个 |
24 | * @param int $goodsId 某个颜色的商品 | 24 | * @param int $goodsId 某个颜色的商品 |
25 | * @param int $uid 当前登录用户ID, 未登录为0 | 25 | * @param int $uid 当前登录用户ID, 未登录为0 |
@@ -309,7 +309,7 @@ class DetailModel | @@ -309,7 +309,7 @@ class DetailModel | ||
309 | 309 | ||
310 | /** | 310 | /** |
311 | * 商品尺码信息 | 311 | * 商品尺码信息 |
312 | - * | 312 | + * |
313 | * @param int $productSkn | 313 | * @param int $productSkn |
314 | * @return array | 314 | * @return array |
315 | */ | 315 | */ |
@@ -520,7 +520,7 @@ class DetailModel | @@ -520,7 +520,7 @@ class DetailModel | ||
520 | 520 | ||
521 | /** | 521 | /** |
522 | * 获取评价列表 | 522 | * 获取评价列表 |
523 | - * | 523 | + * |
524 | * @param int $productId 产品ID | 524 | * @param int $productId 产品ID |
525 | * @param int $pageNum 页码数 | 525 | * @param int $pageNum 页码数 |
526 | * @param int $pageSize 每页显示个数 | 526 | * @param int $pageSize 每页显示个数 |
@@ -571,9 +571,9 @@ class DetailModel | @@ -571,9 +571,9 @@ class DetailModel | ||
571 | $build['answer'] = $value['answer']; | 571 | $build['answer'] = $value['answer']; |
572 | $build['id'] = $value['id']; | 572 | $build['id'] = $value['id']; |
573 | $build['isLike'] = $value['is_like'] === 'Y'; | 573 | $build['isLike'] = $value['is_like'] === 'Y'; |
574 | - $build['like'] = $value['like']; | 574 | + $build['like'] = intval($value['like']); |
575 | $build['isUseful'] = $value['is_useful'] === 'Y'; | 575 | $build['isUseful'] = $value['is_useful'] === 'Y'; |
576 | - $build['useful'] = $value['useful']; | 576 | + $build['useful'] = intval($value['useful']); |
577 | $result[] = $build; | 577 | $result[] = $build; |
578 | } | 578 | } |
579 | } | 579 | } |
@@ -667,7 +667,7 @@ class DetailModel | @@ -667,7 +667,7 @@ class DetailModel | ||
667 | 667 | ||
668 | /** | 668 | /** |
669 | * 获取为你优选的商品 | 669 | * 获取为你优选的商品 |
670 | - * | 670 | + * |
671 | * @param int $productSkn 商品SKN | 671 | * @param int $productSkn 商品SKN |
672 | * @return array | 672 | * @return array |
673 | */ | 673 | */ |
@@ -158,6 +158,7 @@ class DetailController extends AbstractAction | @@ -158,6 +158,7 @@ class DetailController extends AbstractAction | ||
158 | 'consults' => array( | 158 | 'consults' => array( |
159 | 'list' => $consults | 159 | 'list' => $consults |
160 | ), | 160 | ), |
161 | + 'faq' => \Product\DetailModel::getCommonConsults(), | ||
161 | 'showReadMore' => count($consults) > 2, | 162 | 'showReadMore' => count($consults) > 2, |
162 | 'link' => Helpers::url('/product/detail/consultform', array('product_id' => $productId)), | 163 | 'link' => Helpers::url('/product/detail/consultform', array('product_id' => $productId)), |
163 | ); | 164 | ); |
@@ -166,24 +167,6 @@ class DetailController extends AbstractAction | @@ -166,24 +167,6 @@ class DetailController extends AbstractAction | ||
166 | $this->_view->display('consults', $data); | 167 | $this->_view->display('consults', $data); |
167 | } | 168 | } |
168 | 169 | ||
169 | - /* | ||
170 | - * 异步获取咨询常见问题 | ||
171 | - */ | ||
172 | - public function commonconsultsAction() | ||
173 | - { | ||
174 | - $result = array(); | ||
175 | - | ||
176 | - if ($this->isAjax()) { | ||
177 | - $result = \Product\DetailModel::getCommonConsults(); | ||
178 | - } | ||
179 | - | ||
180 | - if (empty($result)) { | ||
181 | - echo ' '; | ||
182 | - } else { | ||
183 | - print_r($result); | ||
184 | - $this->_view->display('common-consults', $result); | ||
185 | - } | ||
186 | - } | ||
187 | 170 | ||
188 | /* | 171 | /* |
189 | * 咨询点赞 | 172 | * 咨询点赞 |
-
Please register or login to post a comment