|
|
@@ -20,6 +20,30 @@ class ProductController extends BaseController
|
|
|
|
|
|
public $guestAccess = ['ghs-item'];
|
|
|
|
|
|
+ //所有花材
|
|
|
+ public function actionAll()
|
|
|
+ {
|
|
|
+ $where = [];
|
|
|
+ $where['mainId'] = $this->mainId;
|
|
|
+ $classId = Yii::$app->request->get('classId', 0);
|
|
|
+ if (!empty($classId)) {
|
|
|
+ $where['classId'] = $classId;
|
|
|
+ }
|
|
|
+ $status = Yii::$app->request->get('status', 0);
|
|
|
+ if (!empty($status)) {
|
|
|
+ $where['status'] = $status;
|
|
|
+ }
|
|
|
+ $delStatus = Yii::$app->request->get('delStatus', 0);
|
|
|
+ if ($delStatus != 2) {
|
|
|
+ $where['delStatus'] = $delStatus;
|
|
|
+ }
|
|
|
+ //输出标准会员价,即花店价,默认显示的是花店价
|
|
|
+ $level = 1;
|
|
|
+ $data = ProductClass::getAllByCondition($where, ['actualSold' => SORT_DESC, 'inTurn' => SORT_DESC], "*");
|
|
|
+ $data = ProductClass::groupProductInfo($data, $level);
|
|
|
+ util::success(['list' => $data]);
|
|
|
+ }
|
|
|
+
|
|
|
public function actionIndex()
|
|
|
{
|
|
|
$py = Yii::$app->request->get('py', '');
|