正在显示
1 个修改的文件
包含
37 行增加
和
0 行删除
application/api/controller/Update.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | + | ||
4 | +namespace app\api\controller; | ||
5 | + | ||
6 | + | ||
7 | +use app\common\controller\Api; | ||
8 | + | ||
9 | +/** | ||
10 | + * 改版接口 | ||
11 | + */ | ||
12 | +class Update extends Api | ||
13 | +{ | ||
14 | + protected $noNeedLogin = ['*']; | ||
15 | + protected $noNeedRight = '*'; | ||
16 | + | ||
17 | + | ||
18 | + /** | ||
19 | + * 商城板块接口 | ||
20 | + * @ApiTitle (token换UserId) | ||
21 | + * @ApiSummary (token换UserId) | ||
22 | + * @ApiMethod (POST) | ||
23 | + * @ApiRoute (/api/Update/TokenToUser) | ||
24 | + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
25 | + * @ApiReturnParams (name="code", type="integer", required=true, sample="0") | ||
26 | + * @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功") | ||
27 | + * @ApiReturn ({ | ||
28 | + 'code':'1', | ||
29 | + 'msg':'返回成功', | ||
30 | + }) | ||
31 | + */ | ||
32 | + public function TokenToUser() | ||
33 | + { | ||
34 | + $UserId = $this->is_token($this->request->header()); | ||
35 | + $this->success('成功', $UserId); | ||
36 | + } | ||
37 | +} |
-
请 注册 或 登录 后发表评论