mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 06:20:50 +00:00
虚拟评论选择规格
This commit is contained in:
parent
0c0ead6176
commit
ae997b85de
@ -131,10 +131,12 @@ class StoreProductReplyServices extends BaseServices
|
||||
public function getRecProductReply(int $productId)
|
||||
{
|
||||
$res = $this->dao->getProductReply($productId);
|
||||
|
||||
if ($res) {
|
||||
$res = $res->toArray();
|
||||
// $res['cart_info'] = isset($res['cart_info']) ? json_decode($res['cart_info'], true) : [];
|
||||
$res['suk'] = isset($res['cart_info']['productInfo']['attrInfo']) ? $res['cart_info']['productInfo']['attrInfo']['suk'] : '';
|
||||
if ($res['suk'] == '') {
|
||||
$res['suk'] = isset($res['cart_info']['productInfo']['attrInfo']) ? $res['cart_info']['productInfo']['attrInfo']['suk'] : '';
|
||||
}
|
||||
$res['nickname'] = anonymity($res['nickname']);
|
||||
$res['merchant_reply_time'] = date('Y-m-d H:i', $res['merchant_reply_time']);
|
||||
$res['add_time'] = time_tran($res['add_time']);
|
||||
|
||||
@ -865,6 +865,15 @@ class StoreProductServices extends BaseServices
|
||||
$item['cost'] = floatval($item['cost']);
|
||||
$item['is_product_type'] = 1;
|
||||
$item['logistics'] = explode(',', $item['logistics']);
|
||||
$attrs = $this->getProductRules($item['id'], 0)['attrs'];
|
||||
foreach ($attrs as $items) {
|
||||
$item['attrs'][] = [
|
||||
'image' => $items['pic'],
|
||||
'price' => $items['price'],
|
||||
'ot_price' => $items['ot_price'],
|
||||
'sku' => implode(',', $items['detail'])
|
||||
];
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user