后台会员级别及会员权益关联入会类型
This commit is contained in:
@@ -35,13 +35,15 @@ class Level extends Backend
|
||||
protected $model = null;
|
||||
protected $modelValidate = true;
|
||||
protected $pay_method = null;
|
||||
protected $member_benefit_model = null;
|
||||
protected $benefit_model = null;
|
||||
protected $join_config_model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\wdsxh\member\Level;
|
||||
$this->member_benefit_model = new \app\admin\model\wdsxh\member\MemberBenefits;
|
||||
$this->benefit_model = new \app\admin\model\wdsxh\member\MemberBenefits;
|
||||
$this->join_config_model = new \app\admin\model\wdsxh\member\JoinConfig;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$pay_method = (new FeesConfig())->where('id',1)->value('pay_method');
|
||||
$this->pay_method = $pay_method;
|
||||
@@ -114,8 +116,12 @@ class Level extends Backend
|
||||
public function add()
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
$benefits = $this->member_benefit_model->getSimpleByStatus(0);
|
||||
$benefits = $this->benefit_model->getSimpleByStatus(0);
|
||||
$this->view->assign('benefits', $benefits);
|
||||
|
||||
$join_config = $this->join_config_model->getSimpleByStatus();
|
||||
$this->view->assign('join_config', $join_config);
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
@@ -170,11 +176,14 @@ class Level extends Backend
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
if (false === $this->request->isPost()) {
|
||||
$benefits = $this->member_benefit_model->getSimpleByStatus(0);
|
||||
$benefits = $this->benefit_model->getSimpleByStatus(0);
|
||||
$this->view->assign('benefits', $benefits);
|
||||
if (is_null($row['benefits_id'])) {
|
||||
$row['benefits_id'] = [];
|
||||
}
|
||||
$join_config = $this->join_config_model->getSimpleByStatus();
|
||||
$this->view->assign('join_config', $join_config);
|
||||
|
||||
$this->view->assign('row', $row);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
@@ -20,11 +20,16 @@ use app\common\controller\Backend;
|
||||
*/
|
||||
class Rights extends Backend
|
||||
{
|
||||
protected $join_config_model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\wdsxh\member\MemberBenefits();
|
||||
$this->view->assign("statusList", $this->model->getDisabledList());
|
||||
|
||||
$this->join_config_model = new \app\admin\model\wdsxh\member\JoinConfig();
|
||||
$this->view->assign('join_config', $this->join_config_model->getSimpleByStatus());
|
||||
$this->searchFields = ['title'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user