data($result); } /** * @notes 设置签到规则 * @return \think\response\Json * @author Tab * @date 2021/8/16 9:53 */ public function setConfig() { $params = (new SignValidate())->post()->goCheck('setConfig'); $result = SignLogic::setConfig($params); if($result) { return $this->success('保存成功', [], 1, 1); } return $this->fail(SignLogic::getError()); } /** * @notes 添加连续签到规则 * @return \think\response\Json * @author Tab * @date 2021/8/16 15:20 */ public function add() { $params = (new SignValidate())->post()->goCheck('add'); $result = SignLogic::add($params); if($result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(SignLogic::getError()); } /** * @notes 编辑连续签到规则 * @return \think\response\Json * @author Tab * @date 2021/8/16 15:42 */ public function edit() { $params = (new SignValidate())->post()->goCheck('edit'); $result = SignLogic::edit($params); if($result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(SignLogic::getError()); } /** * @notes 删除连续签到规则 * @return \think\response\Json * @author Tab * @date 2021/8/16 15:49 */ public function delete() { $params = (new SignValidate())->post()->goCheck('delete'); $result = SignLogic::delete($params); if($result) { return $this->success('删除成功', [], 1, 1); } return $this->fail(SignLogic::getError()); } /** * @notes 查看连续签到规则详情 * @return \think\response\Json * @author Tab * @date 2021/8/16 11:35 */ public function detail() { $params = (new SignValidate())->goCheck('detail'); $result = SignLogic::detail($params); return $this->data($result); } /** * @notes 重置说明 * @return \think\response\Json * @author Tab * @date 2021/8/16 19:21 */ public function resetRemark() { if(!$this->request->isPost()) { return $this->fail('请求方式错误'); } SignLogic::resetRemark(); return $this->success('重置成功', [], 1, 1); } /** * @notes 查看签到记录 * @return \think\response\Json * @author Tab * @date 2021/8/16 19:30 */ public function lists() { return $this->dataLists(); } /** * @notes 签到数据中心 * @return \think\response\Json * @author Tab * @date 2021/8/16 19:53 */ public function dataCenter() { $result = SignLogic::dataCenter(); return $this->data($result); } }