'10', 'name' => '微信支付'], ['id' => '20', 'name' => '支付宝'], ['id' => '30', 'name' => '银行卡'] ]; public $pay_type1 = [ 10 => '微信支付', 20 => '支付宝', 30 => '银行卡' ]; /** * 连盟设置 */ public function index() { $pay_type = $this->pay_type; $data = BranchSettingModel::getAll(); return $this->renderSuccess('', compact('data', 'pay_type')); } /** * 基础信息设置 */ public function basic() { $param = $this->postData(); $data['basic'] = $param; return $this->edit($data); } /** * 入会协议设置 */ public function license() { $param = $this->postData(); $data['license'] = $param; return $this->edit($data); } /** * 入会协议设置 */ public function words() { $param = $this->postData(); $data['words'] = $param; return $this->edit($data); } /** * 修改 */ public function edit($data) { $model = new BranchSettingModel; if ($model->edit($data)) { return $this->renderSuccess('更新成功'); } return $this->renderError($model->getError() ?: '更新失败'); } }