attributes = get_params(); $form->store_id = get_store_id(); return $this->asJson($form->list()); } /** * 保存 */ public function actionSave() { $form = new MdCategoryForm(); $form->attributes = post_params(); $form->store_id = get_store_id(); return $this->asJson($form->save()); } /** * 删除 */ public function actionDel() { $form = new MdCategoryForm(); $form->attributes = post_params(); $form->store_id = get_store_id(); return $this->asJson($form->del()); } /** * 修改状态 */ public function actionSetStatus() { $form = new MdCategoryForm(); $form->attributes = post_params(); $form->store_id = get_store_id(); return $this->asJson($form->setStatus()); } /** * 获取门店分类数据(订单金额) */ public function actionGetMdCategoryData() { $form = new MdCategoryForm(); $form->attributes = get_params(); $form->id = get_params('cat_id'); $form->store_id = get_store_id(); return $this->asJson($form->getMdCategoryData()); } /** * 获取门店分类数据 详情 */ public function actionGetMdCategoryDataDetail() { $form = new MdCategoryForm(); $form->attributes = get_params(); $form->store_id = get_store_id(); return $this->asJson($form->getMdCategoryDataDetail()); } public function actionGetMdCategory() { $store_id = get_store_id(); return $this->asJson([ 'code' => 0, 'msg' => '', 'data' => [ 'list' => MdCategory::getList($store_id) ] ]); } }