提交 d95e40e2 编写于 作者: T Terry

appserver wx 端调整

上级 aace5ca8
......@@ -91,6 +91,7 @@ class BaseController extends AppserverController
if(Yii::$app->request->getMethod() === 'OPTIONS'){
return [];
}
$productPrimaryKey = Yii::$service->product->getPrimaryKey();
$arr = [];
$firstDisplay = 0;
$currentLangCode = Yii::$service->store->currentLangCode;
......@@ -103,7 +104,7 @@ class BaseController extends AppserverController
foreach ($treeArr as $k=>$v) {
$categories[] = [
'id' => $v['_id'],
'id' => $v[$productPrimaryKey],
'name' => $v['name'],
'level' => 1,
];
......@@ -111,8 +112,8 @@ class BaseController extends AppserverController
//var_dump($v['child']);
foreach ($v['child'] as $k2 => $v2) {
$categorieslist[] = [
'pid' => $v['_id'],
'id' => $v2['_id'],
'pid' => $v[$productPrimaryKey],
'id' => $v2[$productPrimaryKey],
'name' => $v2['name'],
'level' => 2,
'icon' => $v2['thumbnail_image'] ? Yii::$service->category->image->getUrl($v2['thumbnail_image']) : 'https://cdn.it120.cc/apifactory/2019/01/26/8fe77acb4d09ab1e101b97158adbba3e.jpg',
......
......@@ -119,7 +119,9 @@ class HomeController extends AppserverController
public function getProductBySkus($skus)
{
if (is_array($skus) && !empty($skus)) {
$productPrimaryKey = Yii::$service->product->getPrimaryKey();
$filter['select'] = [
$productPrimaryKey,
'sku', 'spu', 'name', 'image',
'price', 'special_price',
'special_from', 'special_to',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册