安徽博创起重服务端程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
1.2 KiB

<?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('设置成功');
}
}