40 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
		
		
			
		
	
	
			40 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace app\admin\controller\setting;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								use app\common\basics\AdminBase;
							 | 
						||
| 
								 | 
							
								use app\common\server\ConfigServer;
							 | 
						||
| 
								 | 
							
								use app\common\server\JsonServer;
							 | 
						||
| 
								 | 
							
								use think\facade\View;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class ShopWithdrawal extends AdminBase
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    /**
							 | 
						||
| 
								 | 
							
								     * @Notes: 商家提现配置页
							 | 
						||
| 
								 | 
							
								     * @Author: 张无忌
							 | 
						||
| 
								 | 
							
								     */
							 | 
						||
| 
								 | 
							
								    public function index()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        $detail['min_withdrawal_money'] = ConfigServer::get('shop_withdrawal', 'min_withdrawal_money', 0);
							 | 
						||
| 
								 | 
							
								        $detail['max_withdrawal_money'] = ConfigServer::get('shop_withdrawal', 'max_withdrawal_money', 0);
							 | 
						||
| 
								 | 
							
								        $detail['withdrawal_service_charge'] = ConfigServer::get('shop_withdrawal', 'withdrawal_service_charge', 0);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        View::assign('detail', $detail);
							 | 
						||
| 
								 | 
							
								        return view();
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    /**
							 | 
						||
| 
								 | 
							
								     * @Notes: 设置商家提现
							 | 
						||
| 
								 | 
							
								     * @Author: 张无忌
							 | 
						||
| 
								 | 
							
								     */
							 | 
						||
| 
								 | 
							
								    public function set()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        $post = $this->request->post();
							 | 
						||
| 
								 | 
							
								        ConfigServer::set('shop_withdrawal', 'min_withdrawal_money', $post['min_withdrawal_money'] ?? 0);
							 | 
						||
| 
								 | 
							
								        ConfigServer::set('shop_withdrawal', 'max_withdrawal_money', $post['max_withdrawal_money'] ?? 0);
							 | 
						||
| 
								 | 
							
								        ConfigServer::set('shop_withdrawal', 'withdrawal_service_charge', $post['withdrawal_service_charge'] ?? 0);
							 | 
						||
| 
								 | 
							
								        return JsonServer::success('设置成功');
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |