Example #1
0
 public function actionSubcategory()
 {
     $view = \Yii::$app->view;
     $view->params['moduleName'] = '分类管理';
     $data['token'] = Token::getToken();
     $scid = \Yii::$app->request->_get('id', '0');
     $subC = [];
     if (intval($scid)) {
         $subC = Category::getSubcategory($scid);
     }
     $data['category'] = $subC;
     $data['scid'] = $scid;
     $data['token'] = Token::getToken();
     $userId = \Yii::$app->user->id;
     $data['addIdentity'] = EasyHelpers::dataEncrypt('add,' . $userId);
     $data['modifyIdentity'] = EasyHelpers::dataEncrypt('modify,' . $userId);
     $data['delcatetwoIdentity'] = EasyHelpers::dataEncrypt('delcatetwo,' . $userId);
     return $this->render('sub_category', $data);
 }