12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\api\controller;
- use app\common\exception\BaseException;
- use think\facade\Request;
- use app\api\service\Bonus as BonusService;
- class Bonus extends Base {
-
- public function index(){
- try{
- return $this->returnAjax("ok",1,BonusService::getList(Request::param()));
- }catch (BaseException $ex){
- return $this->returnAjax($ex->getMessage(),$ex->getCode(),$ex->getRaw());
- }
- }
-
- public function receive(){
- try {
- return $this->returnAjax("领取优惠劵成功",1,BonusService::receive(Request::param("id","0","intval")));
- }catch (BaseException $ex){
- return $this->returnAjax($ex->getMessage(),$ex->getCode(),$ex->getRaw());
- }
- }
- }
|