...
|
...
|
@@ -3,6 +3,7 @@ namespace backend\controllers; |
|
|
|
|
|
use Yii;
|
|
|
use backend\components\Pagination;
|
|
|
use yii\helpers\ArrayHelper;
|
|
|
use common\lib\YohoApi\Client as YohoApiClient;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -59,16 +60,25 @@ class ProductController extends BaseController |
|
|
|
|
|
if (!empty($ret['product_list'])){
|
|
|
foreach ($ret['product_list'] as $product){
|
|
|
$list[$product['product_skn']]->product_name = $product['product_name'];
|
|
|
$list[$product['product_skn']]->sales_price = $product['sales_price'];
|
|
|
if (!empty($list[$product['product_skn']])){
|
|
|
$list[$product['product_skn']]->setAttributes([
|
|
|
'product_name' => $product['product_name'],
|
|
|
'sales_price' => $product['sales_price'],
|
|
|
]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//推送服务地址
|
|
|
$wsAddrs = (new \common\models\SysConfig)->getServerAddr();
|
|
|
$wsAddr = @ArrayHelper::getValue($wsAddrs, ['websocket',0]);
|
|
|
|
|
|
return $this->render('list',[
|
|
|
'room'=> \app\models\Room::findOne(['room_id'=>$room_id]),
|
|
|
'pagination'=>$pagination,
|
|
|
'list'=>$list,
|
|
|
'wsAddr'=>$wsAddr
|
|
|
]);
|
|
|
}
|
|
|
|
...
|
...
|
|