isAjax()) { $data = request()->post(); $website_model = new WebsiteModel(); if ($this->AgentInfo) { $data['separate_accounts_value']=json_encode($data['separate_accounts_value']); $res = $website_model->setWebSite($data, ['id' => $this->AgentInfo['id']]); return $res; } else { return error(-1,'您还不是代理商'); } } if($this->AgentInfo['separate_accounts_value']){ $separate_accounts_value=json_decode($this->AgentInfo['separate_accounts_value'],true); $this->AgentInfo['separate_accounts_value']=$separate_accounts_value; } $this->forthMenu(); $address_model = new AddressModel(); $list = $address_model->getAreaList([["pid", "=", 0], ["level", "=", 1]]); $this->assign('info', $this->AgentInfo); $this->assign("province_list", $list["data"]); return $this->fetch('config/index'); } /** * 分销结算设置 */ public function basics() { $model = new \addon\saas\model\Config(); if (request()->isAjax()) { if (empty(input('transfer_type'))) { $transfer_type = ''; } else { $transfer_type = implode(',', input('transfer_type')); } $data = [ 'account_type' => input('account_type', ''), 'withdraw_rate' => input('withdraw_rate', ''),//佣金提现手续费 'withdraw_status' => input('withdraw_status', ''),//提现审核 'transfer_type' => $transfer_type,//转账方式, 'is_auto_transfer' => input('is_auto_transfer', 0),//是否自动转账 1 手动转账 2 自动转账 'min' => input('withdraw', ''),//最低提现额度 'max' => input('max', 0),//提现最高额度 ]; $res = $model->setRegionSettlementConfig($data, 1, $this->site_id); return $res; } else { $withdraw_config = $model->getRegionSettlementConfig($this->site_id)[ 'data' ][ 'value' ] ?? []; $this->assign('withdraw_info', $withdraw_config); $fenxiao_withdraw_model = new FenxiaoWithdraw(); $transfer_type_list = $fenxiao_withdraw_model->getTransferType($this->site_id); $transfer_type_list[ 'balance' ] = '余额'; $this->assign('transfer_type_list', $transfer_type_list); $this->forthMenu(); return $this->fetch('config/region-withdraw'); } } }