...
|
...
|
@@ -561,16 +561,17 @@ class DetailModel |
|
|
|
|
|
if (is_numeric($productId) && is_numeric($pageNum) && is_numeric($pageSize)) {
|
|
|
$consultList = DetailData::consultList($productId, $pageNum, $pageSize);
|
|
|
if (!empty($consultList)) {
|
|
|
if (isset($consultList['code']) && $consultList['code'] === 200) {
|
|
|
$consultList = $consultList['data']['list'];
|
|
|
$build = array();
|
|
|
foreach ($consultList as $value) {
|
|
|
$build['question'] = $value['ask'];
|
|
|
$build['time'] = $value['askTime'];
|
|
|
$build['time'] = $value['ask_time'];
|
|
|
$build['answer'] = $value['answer'];
|
|
|
$build['id'] = $value['id'];
|
|
|
$build['isLike'] = $value['isLike'];
|
|
|
$build['isLike'] = $value['is_like'] === 'Y';
|
|
|
$build['like'] = $value['like'];
|
|
|
$build['isUseful'] = $value['isUseful'];
|
|
|
$build['isUseful'] = $value['is_useful'] === 'Y';
|
|
|
$build['useful'] = $value['useful'];
|
|
|
$result[] = $build;
|
|
|
}
|
...
|
...
|
@@ -626,7 +627,7 @@ class DetailModel |
|
|
$result = array('code' => 400, 'message' => '出错啦~');
|
|
|
|
|
|
do {
|
|
|
$record = DetailData::upvoteConsult($uid, $id);
|
|
|
$record = DetailData::usefulConsult($uid, $id);
|
|
|
|
|
|
if (empty($uid)) {
|
|
|
$result['code'] = 401;
|
...
|
...
|
|