53 lines
1.7 KiB
PHP
53 lines
1.7 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | 作者:修缘 联系QQ:278896498 QQ群:1054861244
|
||
// | 声明:未经作者许可,禁止倒卖等商业运营,违者必究
|
||
// | 另接php业务,网站制作、代理后台、gm后台、支付对接等
|
||
// +----------------------------------------------------------------------
|
||
// | 创建时间: 2022/1/5 15:42
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\admin\controller;
|
||
|
||
use think\Request;
|
||
use app\common\model\CurrencyWithdraw;
|
||
|
||
use app\common\validate\CurrencyWithdrawValidate;
|
||
|
||
class CurrencyWithdrawController extends Controller
|
||
{
|
||
|
||
//列表
|
||
public function index(Request $request, CurrencyWithdraw $model)
|
||
{
|
||
$param = $request->param();
|
||
$model = $model->scope('where', $param);
|
||
|
||
$data = $model->paginate($this->admin['per_page'], false, ['query' => $request->get()]);
|
||
//关键词,排序等赋值
|
||
$this->assign($request->get());
|
||
|
||
$this->assign([
|
||
'data' => $data,
|
||
'page' => $data->render(),
|
||
'total' => $data->total(),
|
||
|
||
]);
|
||
return $this->fetch();
|
||
}
|
||
|
||
|
||
public function enable($id, CurrencyWithdraw $model)
|
||
{
|
||
$result = $model->whereIn('id', $id)->update(['state' => 2, lang('system_check_success')]);
|
||
return $result ? admin_success('操作成功', URL_RELOAD) : admin_error();
|
||
}
|
||
|
||
|
||
public function disable($id, CurrencyWithdraw $model)
|
||
{
|
||
$result = $model->whereIn('id', $id)->update(['state' => 1, 'explain' => lang('system_check_error')]);
|
||
return $result ? admin_success('操作成功', URL_RELOAD) : admin_error();
|
||
}
|
||
}
|