Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 43 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | const Response = require('../../util/response') |
||
2 | const ServiceSeller = require('../../services/catering/seller') |
||
3 | |||
4 | module.exports = { |
||
5 | /** |
||
6 | * @api {get} /api/catering/v1/sellers/:sellerId/stores 商家的店铺列表 |
||
7 | * @apiGroup seller |
||
8 | * @apiPermission user |
||
9 | * @apiVersion 1.0.0 |
||
10 | * @apiParam {String} param 参数 |
||
11 | * @apiSuccess {String} data 返回数据 |
||
12 | * @apiSuccessExample {json} Visual Preview: |
||
13 | * { |
||
14 | "success": true, |
||
15 | "code": 200, |
||
16 | "data": [ |
||
17 | { |
||
18 | "seller_id": 1, |
||
19 | "name": "吕松东🇧🇷🇫🇷", |
||
20 | "thumb": "https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eo13vc2RhqKyJI8f5qaGCcj2ZeRfic696O0a2PDZvJ2JrGL8ia8EJHA6KjR37ia2neD11IBcNJ4HianZg/132", |
||
21 | "store_type_id": 0, |
||
22 | "theme": "", |
||
23 | "tel": "", |
||
24 | "wechat": "", |
||
25 | "license": "", |
||
26 | "address": "", |
||
27 | "approve_status": 0, |
||
28 | "status": 1, |
||
29 | "audit_id": 0, |
||
30 | "id": 1 |
||
31 | } |
||
32 | ], |
||
33 | "message": "请求成功" |
||
34 | } |
||
35 | */ |
||
36 | stores: async function (ctx) { |
||
37 | let data = await ServiceSeller.storeList(ctx.uid) |
||
38 | |||
39 | return Response.output(ctx, data) |
||
40 | }, |
||
41 | |||
42 | |||
43 | } |
||
44 |