Example #1
0
 /**
  * Lists all MGoods models.
  * @return mixed
  */
 public function actionIndex($pub_userid, $goods_kind)
 {
     $searchModel = new MGoodsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $pub_userid, $goods_kind);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Example #2
0
 public function actionClientGoodsList($goods_kind)
 {
     //$g = MGoods::find()->where(['status' => 1])->all();
     //return $this->render('clientGoodsList', ['model' => $g]);
     //guest 视图, 传参数 -1 , 取状态为已发布的所有商品
     $guest = -1;
     //$goods_kind = 0;
     $searchModel = new MGoodsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $guest, $goods_kind);
     return $this->render('clientGoodsList', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }