...
|
...
|
@@ -7,7 +7,7 @@ use Plugin\Helpers; |
|
|
|
|
|
/**
|
|
|
* 商品详情页模板相关的数据模型
|
|
|
*
|
|
|
*
|
|
|
* @name DetailModel
|
|
|
* @package Product
|
|
|
* @copyright yoho.inc
|
...
|
...
|
@@ -19,7 +19,7 @@ class DetailModel |
|
|
|
|
|
/**
|
|
|
* 商品基本信息
|
|
|
*
|
|
|
*
|
|
|
* @param int $productId 商品ID SKN 和 ID 只需要传一个
|
|
|
* @param int $goodsId 某个颜色的商品
|
|
|
* @param int $uid 当前登录用户ID, 未登录为0
|
...
|
...
|
@@ -309,7 +309,7 @@ class DetailModel |
|
|
|
|
|
/**
|
|
|
* 商品尺码信息
|
|
|
*
|
|
|
*
|
|
|
* @param int $productSkn
|
|
|
* @return array
|
|
|
*/
|
...
|
...
|
@@ -520,7 +520,7 @@ class DetailModel |
|
|
|
|
|
/**
|
|
|
* 获取评价列表
|
|
|
*
|
|
|
*
|
|
|
* @param int $productId 产品ID
|
|
|
* @param int $pageNum 页码数
|
|
|
* @param int $pageSize 每页显示个数
|
...
|
...
|
@@ -571,9 +571,9 @@ class DetailModel |
|
|
$build['answer'] = $value['answer'];
|
|
|
$build['id'] = $value['id'];
|
|
|
$build['isLike'] = $value['is_like'] === 'Y';
|
|
|
$build['like'] = $value['like'];
|
|
|
$build['like'] = intval($value['like']);
|
|
|
$build['isUseful'] = $value['is_useful'] === 'Y';
|
|
|
$build['useful'] = $value['useful'];
|
|
|
$build['useful'] = intval($value['useful']);
|
|
|
$result[] = $build;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -584,6 +584,24 @@ class DetailModel |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取常见问题列表
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function getCommonConsults()
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
$consults = DetailData::commonConsultList();
|
|
|
if (isset($consults['code']) && $consults['code'] === 200) {
|
|
|
$result['commonConsults'] = $consults['data'];
|
|
|
$consults = array();
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 咨询点赞
|
|
|
*
|
|
|
* @param int $uid 用户ID
|
...
|
...
|
@@ -649,7 +667,7 @@ class DetailModel |
|
|
|
|
|
/**
|
|
|
* 获取为你优选的商品
|
|
|
*
|
|
|
*
|
|
|
* @param int $productSkn 商品SKN
|
|
|
* @return array
|
|
|
*/
|
...
|
...
|
|