1修复频道一览页面banner被遮挡问题, 2购买咨询页面加入常见问题
Showing
5 changed files
with
15 additions
and
29 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 |
@@ -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 | } |
@@ -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