正在显示
1 个修改的文件
包含
27 行增加
和
0 行删除
@@ -23,6 +23,33 @@ class Vip extends Api | @@ -23,6 +23,33 @@ class Vip extends Api | ||
23 | 23 | ||
24 | /** | 24 | /** |
25 | * 用户接口 | 25 | * 用户接口 |
26 | + * @ApiTitle (会员接口-验证) | ||
27 | + * @ApiSummary (验证) | ||
28 | + * @ApiMethod (POST) | ||
29 | + * @ApiRoute (/api/Vip/UserInfoRult) | ||
30 | + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
31 | + * @ApiReturnParams (name="code", type="integer", required=true, sample="0") | ||
32 | + * @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功") | ||
33 | + * @ApiReturn ({ | ||
34 | + 'code':'1', | ||
35 | + 'msg':'返回成功', | ||
36 | + "data": { | ||
37 | + } | ||
38 | + }) | ||
39 | + */ | ||
40 | + public function UserInfoRult() | ||
41 | + { | ||
42 | + $user_id = $this->is_token($this->request->header()); | ||
43 | + $user = Db::name('user')->where('id', $user_id)->find(); | ||
44 | + if (empty($user['car_num']) || empty($user['color']) || empty($user['car_type']) || empty($user['address']) || empty($user['address_con'])) { | ||
45 | + $this->error('请先完善信息', 0); | ||
46 | + die; | ||
47 | + } | ||
48 | + $this->success('成功', 1); | ||
49 | + } | ||
50 | + | ||
51 | + /** | ||
52 | + * 用户接口 | ||
26 | * @ApiTitle (会员接口-确认信息) | 53 | * @ApiTitle (会员接口-确认信息) |
27 | * @ApiSummary (确认信息) | 54 | * @ApiSummary (确认信息) |
28 | * @ApiMethod (POST) | 55 | * @ApiMethod (POST) |
-
请 注册 或 登录 后发表评论