request->isPost()) { $params = $this->request->post('row/a'); if (!is_array($params)) { $params = $this->request->post(); } try { FcConfig::saveMember($params); if (isset($params['fc_dist_enabled']) || isset($params['fc_dist_level1Rate'])) { FcConfig::saveDistribution($params); } } catch (\Exception $e) { $this->error($e->getMessage()); } $this->success('会员权益与分销配置已保存生效'); } $plans = Db::name('fc_plan')->order('sort asc, id asc')->select(); $this->view->assign('plans', $plans); $this->view->assign('row', FcConfig::getMemberBenefitConfig()); return $this->view->fetch(); } }