问题描述:
微信小程序收藏栏列表数据不包含商品id,因此无法进入商品详情页。
修复方法:
修改 @fecshop\app\appserver\modules\Customer\controllers\ProductfavoriteController.php 文件中的 getProductInfo 方法。
修改前:
// 得到产品的信息
$product_filter = [
'where' => [
['in', $productPrimaryKey, $product_ids],
],
'select' => [
'name', 'image',
'price', 'special_price',
'special_from', 'special_to',
'url_key',
],
'asArray' => true,
];
修改后:
// 得到产品的信息
$product_filter = [
'where' => [
['in', $productPrimaryKey, $product_ids],
],
'select' => [
'id', // 修改部分
'name', 'image',
'price', 'special_price',
'special_from', 'special_to',
'url_key',
],
'asArray' => true,
];
本文由 kgjn 创作,采用 知识共享署名 3.0 中国大陆许可协议 进行许可。
可自由转载、引用,但需署名作者且注明文章出处。