|
@@ -126,7 +126,7 @@ class DetailModel |
|
@@ -126,7 +126,7 @@ class DetailModel |
126
|
|
126
|
|
127
|
// 商品咨询
|
127
|
// 商品咨询
|
128
|
$result['feedbacks']['consultsNum'] = 0;
|
128
|
$result['feedbacks']['consultsNum'] = 0;
|
129
|
- if (!empty($baseInfo['consultBoWrapper'])) {
|
129
|
+ if (!empty($baseInfo['consultBoWrapper']) && $baseInfo['consultBoWrapper']['consultTotal'] !== 0) {
|
130
|
$result['feedbacks']['consultsNum'] = $baseInfo['consultBoWrapper']['consultTotal'];
|
130
|
$result['feedbacks']['consultsNum'] = $baseInfo['consultBoWrapper']['consultTotal'];
|
131
|
$result['feedbacks']['consults'] = array();
|
131
|
$result['feedbacks']['consults'] = array();
|
132
|
$build = array();
|
132
|
$build = array();
|
|
@@ -139,7 +139,12 @@ class DetailModel |
|
@@ -139,7 +139,12 @@ class DetailModel |
139
|
$result['feedbacks']['consultsUrl'] = Helpers::url('/product/detail/consults', array('product_id' => $productId, 'total' => $result['feedbacks']['consultsNum']));
|
139
|
$result['feedbacks']['consultsUrl'] = Helpers::url('/product/detail/consults', array('product_id' => $productId, 'total' => $result['feedbacks']['consultsNum']));
|
140
|
} // 暂无咨询
|
140
|
} // 暂无咨询
|
141
|
else {
|
141
|
else {
|
142
|
- $result['feedbacks']['consultsUrl'] = Helpers::url('/product/detail/consultform', array('product_id' => $productId));
|
142
|
+ // tar modified 201606141155 常見問題恢復
|
|
|
143
|
+ $result['feedbacks']['consults'] = array_slice(self::getCommonConsults()['commonConsults'], 0, 2);
|
|
|
144
|
+ $result['feedbacks']['consultsNum'] = 2; // 数字无意义,兼容原来的前端模板代码使用,不能为 0
|
|
|
145
|
+ $result['feedbacks']['commonConsults'] = true; // 用来标记是否是常见问题的
|
|
|
146
|
+ $result['feedbacks']['consultsUrl'] = Helpers::url('/product/detail/consults', array('product_id' => $productId, 'total' => $result['feedbacks']['consultsNum']));
|
|
|
147
|
+// $result['feedbacks']['consultsUrl'] = Helpers::url('/product/detail/consultform', array('product_id' => $productId));
|
143
|
}
|
148
|
}
|
144
|
|
149
|
|
145
|
// 商品评价
|
150
|
// 商品评价
|