swagger.json 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "lzyd user server api",
  5. "title": "lzyd user server api",
  6. "contact": {},
  7. "license": {},
  8. "version": "1.0"
  9. },
  10. "paths": {
  11. "/app/launch": {
  12. "get": {
  13. "description": "获取App启动配置",
  14. "produces": [
  15. "application/json"
  16. ],
  17. "tags": [
  18. "Config"
  19. ],
  20. "summary": "获取App启动配置",
  21. "parameters": [
  22. {
  23. "type": "integer",
  24. "description": "客户端标识 1=iOS 2=Android 3=小程序",
  25. "name": "client",
  26. "in": "query",
  27. "required": true
  28. }
  29. ],
  30. "responses": {
  31. "200": {
  32. "description": "{\"code\":200,\"message\":\"success\":\"data\":{}}",
  33. "schema": {
  34. "type": "string"
  35. }
  36. }
  37. }
  38. }
  39. },
  40. "/customer/editCard": {
  41. "post": {
  42. "description": "修改身份证信息",
  43. "produces": [
  44. "application/json"
  45. ],
  46. "tags": [
  47. "Customer"
  48. ],
  49. "summary": "修改身份证信息",
  50. "parameters": [
  51. {
  52. "description": "修改身份证请求内容",
  53. "name": "body",
  54. "in": "body",
  55. "required": true,
  56. "schema": {
  57. "type": "object",
  58. "$ref": "#/definitions/models.EditCardReq"
  59. }
  60. }
  61. ],
  62. "responses": {
  63. "200": {
  64. "description": "{\"code\":200,\"message\":\"success\"}",
  65. "schema": {
  66. "type": "string"
  67. }
  68. }
  69. }
  70. }
  71. },
  72. "/customer/getInfo": {
  73. "get": {
  74. "description": "获取用户详细信息",
  75. "produces": [
  76. "application/json"
  77. ],
  78. "tags": [
  79. "Customer"
  80. ],
  81. "summary": "获取用户详细信息",
  82. "parameters": [
  83. {
  84. "type": "string",
  85. "description": "用户ID",
  86. "name": "user_code",
  87. "in": "query",
  88. "required": true
  89. }
  90. ],
  91. "responses": {
  92. "200": {
  93. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"mobile_phone\":\"\",\"user_name\":\"靓妆会员\",\"avatar\":\"https://\",\"gender\":2,\"birthday\":\"\",\"area\":\"江苏省-南京市-鼓楼区\",\"email\":\"\",\"customer_level\":0,\"user_point\":0,\"user_money\":0.00,\"register_time\":\"\"}}}",
  94. "schema": {
  95. "type": "string"
  96. }
  97. }
  98. }
  99. }
  100. },
  101. "/customer/getPoints": {
  102. "get": {
  103. "description": "获取用户总积分",
  104. "produces": [
  105. "application/json"
  106. ],
  107. "tags": [
  108. "Customer"
  109. ],
  110. "summary": "获取用户总积分",
  111. "parameters": [
  112. {
  113. "type": "string",
  114. "description": "用户ID",
  115. "name": "user_code",
  116. "in": "query",
  117. "required": true
  118. }
  119. ],
  120. "responses": {
  121. "200": {
  122. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  123. "schema": {
  124. "type": "string"
  125. }
  126. }
  127. }
  128. }
  129. },
  130. "/customer/updateAvatar": {
  131. "post": {
  132. "description": "修改用户的头像",
  133. "produces": [
  134. "application/json"
  135. ],
  136. "tags": [
  137. "Customer"
  138. ],
  139. "summary": "修改用户的头像",
  140. "parameters": [
  141. {
  142. "description": "修改用户头像请求内容",
  143. "name": "body",
  144. "in": "body",
  145. "required": true,
  146. "schema": {
  147. "type": "object",
  148. "$ref": "#/definitions/models.UpdateAvatarReq"
  149. }
  150. }
  151. ],
  152. "responses": {
  153. "200": {
  154. "description": "{\"code\":200,\"message\":\"success\"}",
  155. "schema": {
  156. "type": "string"
  157. }
  158. }
  159. }
  160. }
  161. },
  162. "/customer/updateProfile": {
  163. "post": {
  164. "description": "修改用户资料",
  165. "produces": [
  166. "application/json"
  167. ],
  168. "tags": [
  169. "Customer"
  170. ],
  171. "summary": "修改用户资料",
  172. "parameters": [
  173. {
  174. "description": "修改用户资料请求内容",
  175. "name": "body",
  176. "in": "body",
  177. "required": true,
  178. "schema": {
  179. "type": "object",
  180. "$ref": "#/definitions/models.UpdateProfileReq"
  181. }
  182. }
  183. ],
  184. "responses": {
  185. "200": {
  186. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  187. "schema": {
  188. "type": "string"
  189. }
  190. }
  191. }
  192. }
  193. },
  194. "/customer/updatePwd": {
  195. "post": {
  196. "description": "修改密码",
  197. "produces": [
  198. "application/json"
  199. ],
  200. "tags": [
  201. "Customer"
  202. ],
  203. "summary": "修改密码",
  204. "parameters": [
  205. {
  206. "description": "修改密码请求内容",
  207. "name": "body",
  208. "in": "body",
  209. "required": true,
  210. "schema": {
  211. "type": "object",
  212. "$ref": "#/definitions/models.UpdatePwdReq"
  213. }
  214. }
  215. ],
  216. "responses": {
  217. "200": {
  218. "description": "{\"code\":200,\"message\":\"success\"}",
  219. "schema": {
  220. "type": "string"
  221. }
  222. }
  223. }
  224. }
  225. },
  226. "/passport/bindMobile": {
  227. "post": {
  228. "description": "绑定手机号",
  229. "consumes": [
  230. "application/json"
  231. ],
  232. "produces": [
  233. "application/json"
  234. ],
  235. "tags": [
  236. "Passport"
  237. ],
  238. "summary": "绑定手机号",
  239. "parameters": [
  240. {
  241. "description": "绑定手机号请求内容",
  242. "name": "body",
  243. "in": "body",
  244. "required": true,
  245. "schema": {
  246. "type": "object",
  247. "$ref": "#/definitions/models.BindMobileReq"
  248. }
  249. }
  250. ],
  251. "responses": {
  252. "200": {
  253. "description": "{\"code\":200,\"message\":\"success\"}",
  254. "schema": {
  255. "type": "string"
  256. }
  257. }
  258. }
  259. }
  260. },
  261. "/passport/getbackPwd": {
  262. "post": {
  263. "description": "密码找回",
  264. "consumes": [
  265. "application/json"
  266. ],
  267. "produces": [
  268. "application/json"
  269. ],
  270. "tags": [
  271. "Passport"
  272. ],
  273. "summary": "密码找回",
  274. "parameters": [
  275. {
  276. "description": "密码找回请求内容",
  277. "name": "body",
  278. "in": "body",
  279. "required": true,
  280. "schema": {
  281. "type": "object",
  282. "$ref": "#/definitions/models.GetbackPwdReq"
  283. }
  284. }
  285. ],
  286. "responses": {
  287. "200": {
  288. "description": "{\"code\":200,\"message\":\"success\"}",
  289. "schema": {
  290. "type": "string"
  291. }
  292. }
  293. }
  294. }
  295. },
  296. "/passport/loginByThirdParty": {
  297. "post": {
  298. "description": "第三方登录",
  299. "consumes": [
  300. "application/json"
  301. ],
  302. "produces": [
  303. "application/json"
  304. ],
  305. "tags": [
  306. "Passport"
  307. ],
  308. "summary": "第三方登录",
  309. "parameters": [
  310. {
  311. "description": "第三方登录请求内容",
  312. "name": "body",
  313. "in": "body",
  314. "required": true,
  315. "schema": {
  316. "type": "object",
  317. "$ref": "#/definitions/models.ThirdLoginReq"
  318. }
  319. }
  320. ],
  321. "responses": {
  322. "200": {
  323. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  324. "schema": {
  325. "type": "string"
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "/passport/quickLogin": {
  332. "post": {
  333. "description": "快捷登录",
  334. "consumes": [
  335. "application/json"
  336. ],
  337. "produces": [
  338. "application/json"
  339. ],
  340. "tags": [
  341. "Passport"
  342. ],
  343. "summary": "快捷登录",
  344. "parameters": [
  345. {
  346. "description": "快捷登录请求内容",
  347. "name": "body",
  348. "in": "body",
  349. "required": true,
  350. "schema": {
  351. "type": "object",
  352. "$ref": "#/definitions/models.QuickLoginReq"
  353. }
  354. }
  355. ],
  356. "responses": {
  357. "200": {
  358. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"user\":{}}}",
  359. "schema": {
  360. "type": "string"
  361. }
  362. }
  363. }
  364. }
  365. },
  366. "/passport/register": {
  367. "post": {
  368. "description": "用户注册",
  369. "consumes": [
  370. "application/json"
  371. ],
  372. "produces": [
  373. "application/json"
  374. ],
  375. "tags": [
  376. "Passport"
  377. ],
  378. "summary": "用户注册",
  379. "parameters": [
  380. {
  381. "description": "注册请求内容",
  382. "name": "body",
  383. "in": "body",
  384. "required": true,
  385. "schema": {
  386. "type": "object",
  387. "$ref": "#/definitions/models.RegisterReq"
  388. }
  389. }
  390. ],
  391. "responses": {
  392. "200": {
  393. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"user\":{}}}",
  394. "schema": {
  395. "type": "string"
  396. }
  397. }
  398. }
  399. }
  400. },
  401. "/passport/wechatLogin": {
  402. "post": {
  403. "description": "微信手机号码登录",
  404. "consumes": [
  405. "application/json"
  406. ],
  407. "produces": [
  408. "application/json"
  409. ],
  410. "tags": [
  411. "Passport"
  412. ],
  413. "summary": "微信手机号码登录",
  414. "parameters": [
  415. {
  416. "description": "微信手机登录请求内容",
  417. "name": "body",
  418. "in": "body",
  419. "required": true,
  420. "schema": {
  421. "type": "object",
  422. "$ref": "#/definitions/models.WxLoginReq"
  423. }
  424. }
  425. ],
  426. "responses": {
  427. "200": {
  428. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"user\":{}}}",
  429. "schema": {
  430. "type": "string"
  431. }
  432. }
  433. }
  434. }
  435. },
  436. "/sms/get": {
  437. "get": {
  438. "description": "指定模板单发短信",
  439. "produces": [
  440. "application/json"
  441. ],
  442. "tags": [
  443. "Sms"
  444. ],
  445. "summary": "指定模板单发短信",
  446. "parameters": [
  447. {
  448. "type": "string",
  449. "description": "手机号码",
  450. "name": "mobile",
  451. "in": "query",
  452. "required": true
  453. },
  454. {
  455. "enum": [
  456. 1,
  457. 2,
  458. 3,
  459. 4
  460. ],
  461. "type": "integer",
  462. "default": 1,
  463. "description": "短信验证码类型(1=注册 2=找回密码 3=绑定手机号 4=快捷登录)",
  464. "name": "type",
  465. "in": "query",
  466. "required": true
  467. }
  468. ],
  469. "responses": {
  470. "200": {
  471. "description": "{\"code\":200, \"message\":\"success\"}",
  472. "schema": {
  473. "type": "string"
  474. }
  475. }
  476. }
  477. }
  478. },
  479. "/sms/remind": {
  480. "post": {
  481. "description": "发送提醒短信",
  482. "consumes": [
  483. "application/json"
  484. ],
  485. "produces": [
  486. "application/json"
  487. ],
  488. "tags": [
  489. "Sms"
  490. ],
  491. "summary": "发送提醒短信",
  492. "parameters": [
  493. {
  494. "description": "短信请求内容",
  495. "name": "body",
  496. "in": "body",
  497. "required": true,
  498. "schema": {
  499. "type": "object",
  500. "$ref": "#/definitions/models.SendSmsReq"
  501. }
  502. }
  503. ],
  504. "responses": {
  505. "200": {
  506. "description": "{\"code\":200, \"message\":\"success\"}",
  507. "schema": {
  508. "type": "string"
  509. }
  510. }
  511. }
  512. }
  513. },
  514. "/upload/image": {
  515. "post": {
  516. "description": "单图片上传接口, name=image",
  517. "consumes": [
  518. "multipart/form-data"
  519. ],
  520. "produces": [
  521. "application/json"
  522. ],
  523. "tags": [
  524. "Upload"
  525. ],
  526. "summary": "图片上传",
  527. "parameters": [
  528. {
  529. "type": "string",
  530. "description": "上传者的用户ID",
  531. "name": "user_code",
  532. "in": "formData",
  533. "required": true
  534. },
  535. {
  536. "type": "file",
  537. "description": "上传的图片",
  538. "name": "image",
  539. "in": "formData",
  540. "required": true
  541. }
  542. ],
  543. "responses": {
  544. "200": {
  545. "description": "{\"code\":200,\"message\":\"success\",\"data\":\"http://image.bitekun.xin/images/2019-03/test.png\"}",
  546. "schema": {
  547. "type": "string"
  548. }
  549. }
  550. }
  551. }
  552. }
  553. },
  554. "definitions": {
  555. "models.BindMobileReq": {
  556. "type": "object",
  557. "properties": {
  558. "mobile": {
  559. "type": "string"
  560. },
  561. "user_code": {
  562. "type": "string"
  563. },
  564. "valid_code": {
  565. "type": "string"
  566. }
  567. }
  568. },
  569. "models.EditCardReq": {
  570. "type": "object",
  571. "properties": {
  572. "card_back": {
  573. "type": "string"
  574. },
  575. "card_front": {
  576. "type": "string"
  577. },
  578. "card_id": {
  579. "type": "string"
  580. },
  581. "user_code": {
  582. "type": "string"
  583. }
  584. }
  585. },
  586. "models.GetbackPwdReq": {
  587. "type": "object",
  588. "properties": {
  589. "mobile": {
  590. "type": "string"
  591. },
  592. "password": {
  593. "type": "string"
  594. },
  595. "valid_code": {
  596. "type": "string"
  597. }
  598. }
  599. },
  600. "models.QuickLoginReq": {
  601. "type": "object",
  602. "properties": {
  603. "mobile": {
  604. "type": "string"
  605. },
  606. "valid_code": {
  607. "type": "string"
  608. }
  609. }
  610. },
  611. "models.RegisterReq": {
  612. "type": "object",
  613. "properties": {
  614. "area": {
  615. "type": "string"
  616. },
  617. "birthday": {
  618. "type": "string"
  619. },
  620. "gender": {
  621. "type": "integer"
  622. },
  623. "mobile": {
  624. "type": "string"
  625. },
  626. "password": {
  627. "type": "string"
  628. },
  629. "user_name": {
  630. "type": "string"
  631. },
  632. "valid_code": {
  633. "type": "string"
  634. }
  635. }
  636. },
  637. "models.SendSmsReq": {
  638. "type": "object",
  639. "properties": {
  640. "content": {
  641. "type": "string"
  642. },
  643. "mobile": {
  644. "type": "string"
  645. }
  646. }
  647. },
  648. "models.ThirdLoginReq": {
  649. "type": "object",
  650. "properties": {
  651. "avatar": {
  652. "type": "string"
  653. },
  654. "open_id": {
  655. "type": "string"
  656. },
  657. "user_name": {
  658. "type": "string"
  659. }
  660. }
  661. },
  662. "models.UpdateAvatarReq": {
  663. "type": "object",
  664. "properties": {
  665. "avatar": {
  666. "type": "string"
  667. },
  668. "user_code": {
  669. "type": "string"
  670. }
  671. }
  672. },
  673. "models.UpdateProfileReq": {
  674. "type": "object",
  675. "properties": {
  676. "area": {
  677. "type": "string"
  678. },
  679. "birthday": {
  680. "type": "string"
  681. },
  682. "city": {
  683. "type": "string"
  684. },
  685. "gender": {
  686. "type": "integer"
  687. },
  688. "identify": {
  689. "type": "string"
  690. },
  691. "nickname": {
  692. "type": "string"
  693. },
  694. "province": {
  695. "type": "string"
  696. },
  697. "user_code": {
  698. "type": "string"
  699. },
  700. "user_height": {
  701. "type": "integer"
  702. },
  703. "user_weight": {
  704. "type": "integer"
  705. }
  706. }
  707. },
  708. "models.UpdatePwdReq": {
  709. "type": "object",
  710. "properties": {
  711. "new_pwd": {
  712. "type": "string"
  713. },
  714. "old_pwd": {
  715. "type": "string"
  716. },
  717. "user_code": {
  718. "type": "string"
  719. }
  720. }
  721. },
  722. "models.WxLoginReq": {
  723. "type": "object",
  724. "properties": {
  725. "mobile": {
  726. "type": "string"
  727. }
  728. }
  729. }
  730. }
  731. }