_applyFormToken(); if ($this->request->isGet()) { $this->title = '修改聚合页配置'; $this->config = SystemService::instance()->getData("group:page:config"); $this->fetch(); } else { SystemService::instance()->setData('group:page:config', Request::post("config")); sysoplog('聚合页配置管理', "修改聚合页配置成功"); $this->success('修改聚合页配置成功!'); } } /** * 修改品牌任务配置 * @auth true * @menu true * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function brandTaskConfig() { $this->_applyFormToken(); if ($this->request->isGet()) { $this->title = '修改品牌任务配置'; $this->config = SystemService::instance()->getData("brand:task:config"); $this->fetch(); } else { SystemService::instance()->setData('brand:task:config', Request::post("config")); sysoplog('品牌任务配置管理', "修改品牌任务配置成功"); $this->success('修改品牌任务配置成功!'); } } /** * 修改活动规则 * @auth true * @menu true * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function rule() { $this->_applyFormToken(); if ($this->request->isGet()) { $this->title = '修改活动规则配置'; $this->config = SystemService::instance()->getData("activity:rule"); $this->fetch(); } else { SystemService::instance()->setData('activity:rule', Request::post("config")); sysoplog('品牌活动规则管理', "修改活动规则配置成功"); $this->success('修改活动规则配置成功!'); } } public function removeUserTask() { $this->_applyFormToken(); if ($this->request->isGet()) { $this->title = '清除用户任务数据'; $this->fetch(); } else { $uid = Request::post('uid'); $dateForRedis = date('Ymd'); $redisKey = "t:{$dateForRedis}:" . $uid; Cache::delete($redisKey); Cache::delete('u:f:' . $uid); Db::table('awards_user_task')->where('uid', $uid)->where('date', date('Y-m-d'))->delete(); sysoplog('测试管理', "清除用户任务数据"); $this->success('清除用户任务数据成功!'); } } }