CardCodeEnum::getTypeDesc() ]; } /** * @notes 列表类 * @return mixed * @author cjhao * @date 2023/7/10 12:09 */ public function lists() { return $this->dataLists(); } /** * @notes 添加卡密 * @return mixed * @author cjhao * @date 2023/7/10 15:34 */ public function add() { $post = (new CardCodeValidate())->post()->goCheck('add'); $result = (new CardCodeLogic())->add($post); if(true === $result) { return $this->success('添加成功',[],1,1); } return $this->fail($result); } /** * @notes 获取卡密详情 * @return mixed * @author cjhao * @date 2023/7/10 16:27 */ public function detail() { (new CardCodeValidate())->goCheck('id'); $detail = (new CardCodeLogic())->detail($this->request->get('id')); return $this->success('',$detail); } /** * @notes 删除卡吗 * @return mixed * @author cjhao * @date 2023/7/10 17:32 */ public function del() { (new CardCodeValidate())->post()->goCheck('id'); (new CardCodeLogic())->del($this->request->post('id')); return $this->success('删除成功',[],1,1); } /** * @notes 获取卡密设置 * @return mixed * @author cjhao * @date 2023/7/11 11:50 */ public function getConfig() { $config = (new CardCodeLogic())->getConfig(); return $this->success('',$config); } /** * @notes 卡密设置 * @return mixed * @author cjhao * @date 2023/7/11 11:56 */ public function setConfig() { (new CardCodeLogic())->setConfig($this->request->post()); return $this->success('设置成功'); } }