1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use app\service\Pet;
- /**
- * 用户端订单接口
- */
- class UserOrder extends Api
- {
- protected $noNeedLogin = ['category','spec','protect'];
- protected $noNeedRight = '*';
- /**
- * 常用地址
- * @ApiReturnParams (name=id,description=id)
- * @ApiReturnParams (name=name,description=姓名)
- * @ApiReturnParams (name=mobile,description=手机号)
- * @ApiReturnParams (name=address,description=地址)
- * @ApiReturnParams (name=city,description=城市)
- */
- public function address(){
- $user=$this->auth->getUser();
- $this->success('',$user->addres()->order('id','desc')->select());
- }
- /**
- * 宠物类别
- * @ApiReturnParams (name=id,description=id)
- * @ApiReturnParams (name=name,description=名称)
- */
- public function category(Pet $pet){
- $this->success('',$pet::category());
- }
- /**
- * 宠物规格
- * @ApiReturnParams (name=id,description=id)
- * @ApiReturnParams (name=name,description=名称)
- * @ApiReturnParams (name=weight,description=重量范围)
- */
- public function spec(Pet $pet){
- $this->success('',$pet::spec());
- }
- /**
- * 宠物保
- * @ApiReturnParams (name=id,description=id)
- * @ApiReturnParams (name=name,description=名称)
- * @ApiReturnParams (name=max,description=最高保多少)
- * @ApiReturnParams (name=price,description=价格)
- */
- public function protect(Pet $pet){
- $this->success('',$pet::protect());
- }
- /**
- * 预下单
- * @param
- */
- public function prepare(){
- $data=input();
- }
- }
|