request->isAjax()) { $get = $this->request->get(); $data = DividendCashLogic::cash($get); return JsonServer::success('', $data, 1); } $today = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))), date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399) ]; $yesterday = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))), date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399) ]; $days_ago7 = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))), date('Y-m-d 23:59:59', time()) ]; $days_ago30 = [ date('Y-m-d 00:00:00', strtotime("-30 day")), date('Y-m-d 23:59:59', time()) ]; $dividend_cash = ConfigServer::get('platform_setting', 'dividend_cash', 0); return view('', [ 'today' => $today, 'yesterday' => $yesterday, 'days_ago7' => $days_ago7, 'days_ago30' => $days_ago30, 'dividend_cash'=>$dividend_cash, ]); } /** * @notes 分红排队列表 * @return \think\response\Json|\think\response\View * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author suny * @date 2021/7/13 7:02 下午 */ public function dividend_order() { if ($this->request->isAjax()) { $get = $this->request->get(); $data = DividendCashLogic::order($get); return JsonServer::success('', $data, 1); } $today = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))), date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399) ]; $yesterday = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))), date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399) ]; $days_ago7 = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))), date('Y-m-d 23:59:59', time()) ]; $days_ago30 = [ date('Y-m-d 00:00:00', strtotime("-30 day")), date('Y-m-d 23:59:59', time()) ]; return view('', [ 'today' => $today, 'yesterday' => $yesterday, 'days_ago7' => $days_ago7, 'days_ago30' => $days_ago30, ]); } /** * @notes 排队订单详情 * @return \think\response\View * @author suny * @date 2021/7/13 7:02 下午 */ public function detail() { $id = $this->request->get('id', '', 'intval'); if ($this->request->isAjax()) { $get = $this->request->get(); $data = DividendCashLogic::detail($get); return JsonServer::success('', $data, 1); } $today = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))), date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399) ]; $yesterday = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))), date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399) ]; $days_ago7 = [ date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))), date('Y-m-d 23:59:59', time()) ]; $days_ago30 = [ date('Y-m-d 00:00:00', strtotime("-30 day")), date('Y-m-d 23:59:59', time()) ]; return view('detail', [ 'id' => $id, 'today' => $today, 'yesterday' => $yesterday, 'days_ago7' => $days_ago7, 'days_ago30' => $days_ago30, ]); } /** * @notes 导出账户明细Excel * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/4/24 10:20 */ public function cashExport() { $params = $this->request->get(); $result = DividendCashLogic::cash($params, true); if(false === $result) { return JsonServer::error(DividendCashLogic::getError() ?: '导出失败'); } return JsonServer::success('', $result); } /** * @notes 导出佣金提现Excel * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/4/24 10:20 */ public function orderExport() { $params = $this->request->get(); $result = DividendCashLogic::order($params, true); if(false === $result) { return JsonServer::error(DividendCashLogic::getError() ?: '导出失败'); } return JsonServer::success('', $result); } /** * @notes 导出佣金提现Excel * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/4/24 10:20 */ public function detailExport() { $params = $this->request->get(); $result = DividendCashLogic::detail($params, true); if(false === $result) { return JsonServer::error(DividendCashLogic::getError() ?: '导出失败'); } return JsonServer::success('', $result); } }