Commit b3084508 authored by hujun's avatar hujun

统计时间

parent 106dee92
...@@ -177,20 +177,25 @@ class Setting extends Basic ...@@ -177,20 +177,25 @@ class Setting extends Basic
* @return \think\Response * @return \think\Response
*/ */
public function configWeek() { public function configWeek() {
if (empty($this->params['site_id']) || empty($this->params['total_date_start']) || empty($this->params['total_date_end']) ||
empty($this->params['sort_date_start']) || empty($this->params['sort_date_end'])) {
return $this->response(101, '参数错误');
}
try { try {
$code = 200; $code = 200;
$msg = ''; $msg = '';
$data = []; $data = [];
$where['params'] = 'week_competition_'.$this->params['site_id']; $where['params'] = 'week_competition_'.$this->params['site_id'];
if (empty($this->params['site_id'])) {
return $this->response(101, '参数错误');
}
$id = $this->m_config->getSettingV2($where, 'id,rule'); $id = $this->m_config->getSettingV2($where, 'id,rule');
if ($this->request->isPost()) { if ($this->request->isPost()) {
if (empty($this->params['total_date_start']) || empty($this->params['total_date_end']) ||
empty($this->params['sort_date_start']) || empty($this->params['sort_date_end'])) {
return $this->response(101, '参数错误');
}
$rule['total_date_start'] = $this->params['total_date_start']; $rule['total_date_start'] = $this->params['total_date_start'];
$rule['total_date_end'] = $this->params['total_date_end']; $rule['total_date_end'] = $this->params['total_date_end'];
$rule['sort_date_start'] = $this->params['sort_date_start']; $rule['sort_date_start'] = $this->params['sort_date_start'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment