广告平台(站长使用)
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

981 строка
31 KiB

  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "站长后台接口",
  5. "title": "广告联盟-站长平台",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {
  8. "name": "dengbiao",
  9. "url": "http://www.swagger.io/support",
  10. "email": "1239118001@qq.com"
  11. },
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "1.0"
  17. },
  18. "host": "localhost:1002 or xxxx.advertisement.dengbiao.top",
  19. "paths": {
  20. "/api/login": {
  21. "post": {
  22. "description": "登入",
  23. "consumes": [
  24. "application/json"
  25. ],
  26. "produces": [
  27. "application/json"
  28. ],
  29. "tags": [
  30. "登录"
  31. ],
  32. "summary": "登陆",
  33. "parameters": [
  34. {
  35. "description": "用户名密码",
  36. "name": "req",
  37. "in": "body",
  38. "required": true,
  39. "schema": {
  40. "$ref": "#/definitions/md.LoginReq"
  41. }
  42. }
  43. ],
  44. "responses": {
  45. "200": {
  46. "description": "token",
  47. "schema": {
  48. "$ref": "#/definitions/md.LoginResponse"
  49. }
  50. },
  51. "400": {
  52. "description": "具体错误",
  53. "schema": {
  54. "$ref": "#/definitions/md.Response"
  55. }
  56. }
  57. }
  58. }
  59. },
  60. "/api/registerForAgent": {
  61. "post": {
  62. "description": "注册模块-渠道代理注册",
  63. "consumes": [
  64. "application/json"
  65. ],
  66. "produces": [
  67. "application/json"
  68. ],
  69. "tags": [
  70. "注册模块"
  71. ],
  72. "summary": "渠道代理注册",
  73. "parameters": [
  74. {
  75. "description": "用户名密码",
  76. "name": "req",
  77. "in": "body",
  78. "required": true,
  79. "schema": {
  80. "$ref": "#/definitions/md.RegisterForAgentReq"
  81. }
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "success",
  87. "schema": {
  88. "type": "string"
  89. }
  90. },
  91. "400": {
  92. "description": "具体错误",
  93. "schema": {
  94. "$ref": "#/definitions/md.Response"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "/api/registerForMedium": {
  101. "post": {
  102. "description": "注册模块-媒体注册",
  103. "consumes": [
  104. "application/json"
  105. ],
  106. "produces": [
  107. "application/json"
  108. ],
  109. "tags": [
  110. "注册模块"
  111. ],
  112. "summary": "媒体注册",
  113. "parameters": [
  114. {
  115. "description": "用户名密码",
  116. "name": "req",
  117. "in": "body",
  118. "required": true,
  119. "schema": {
  120. "$ref": "#/definitions/md.RegisterForMediumReq"
  121. }
  122. }
  123. ],
  124. "responses": {
  125. "200": {
  126. "description": "success",
  127. "schema": {
  128. "type": "string"
  129. }
  130. },
  131. "400": {
  132. "description": "具体错误",
  133. "schema": {
  134. "$ref": "#/definitions/md.Response"
  135. }
  136. }
  137. }
  138. }
  139. },
  140. "/api/role/addAdmin": {
  141. "post": {
  142. "description": "权限管理-新增管理员",
  143. "consumes": [
  144. "application/json"
  145. ],
  146. "produces": [
  147. "application/json"
  148. ],
  149. "tags": [
  150. "权限管理"
  151. ],
  152. "summary": "新增管理员",
  153. "parameters": [
  154. {
  155. "type": "string",
  156. "description": "验证参数Bearer和token空格拼接",
  157. "name": "Authorization",
  158. "in": "header",
  159. "required": true
  160. },
  161. {
  162. "description": "请求参数",
  163. "name": "args",
  164. "in": "body",
  165. "required": true,
  166. "schema": {
  167. "$ref": "#/definitions/md.AddAdminReq"
  168. }
  169. }
  170. ],
  171. "responses": {
  172. "200": {
  173. "description": "success",
  174. "schema": {
  175. "type": "string"
  176. }
  177. },
  178. "400": {
  179. "description": "具体错误",
  180. "schema": {
  181. "$ref": "#/definitions/md.Response"
  182. }
  183. }
  184. }
  185. }
  186. },
  187. "/api/role/addRole": {
  188. "post": {
  189. "description": "权限管理-添加角色",
  190. "consumes": [
  191. "application/json"
  192. ],
  193. "produces": [
  194. "application/json"
  195. ],
  196. "tags": [
  197. "权限管理"
  198. ],
  199. "summary": "添加角色",
  200. "parameters": [
  201. {
  202. "type": "string",
  203. "description": "验证参数Bearer和token空格拼接",
  204. "name": "Authorization",
  205. "in": "header",
  206. "required": true
  207. },
  208. {
  209. "description": "请求参数",
  210. "name": "args",
  211. "in": "body",
  212. "required": true,
  213. "schema": {
  214. "$ref": "#/definitions/md.AddRoleReq"
  215. }
  216. }
  217. ],
  218. "responses": {
  219. "200": {
  220. "description": "success",
  221. "schema": {
  222. "type": "string"
  223. }
  224. },
  225. "400": {
  226. "description": "具体错误",
  227. "schema": {
  228. "$ref": "#/definitions/md.Response"
  229. }
  230. }
  231. }
  232. }
  233. },
  234. "/api/role/adminInfo": {
  235. "get": {
  236. "description": "权限管理-管理员信息",
  237. "consumes": [
  238. "application/json"
  239. ],
  240. "produces": [
  241. "application/json"
  242. ],
  243. "tags": [
  244. "权限管理"
  245. ],
  246. "summary": "管理员信息",
  247. "parameters": [
  248. {
  249. "type": "string",
  250. "description": "验证参数Bearer和token空格拼接",
  251. "name": "Authorization",
  252. "in": "header",
  253. "required": true
  254. },
  255. {
  256. "type": "string",
  257. "description": "管理员id",
  258. "name": "adm_id",
  259. "in": "query",
  260. "required": true
  261. }
  262. ],
  263. "responses": {
  264. "200": {
  265. "description": "具体看返回内容",
  266. "schema": {
  267. "type": "string"
  268. }
  269. },
  270. "400": {
  271. "description": "具体错误",
  272. "schema": {
  273. "$ref": "#/definitions/md.Response"
  274. }
  275. }
  276. }
  277. }
  278. },
  279. "/api/role/adminList": {
  280. "post": {
  281. "description": "权限管理-管理员列表",
  282. "consumes": [
  283. "application/json"
  284. ],
  285. "produces": [
  286. "application/json"
  287. ],
  288. "tags": [
  289. "权限管理"
  290. ],
  291. "summary": "管理员列表",
  292. "parameters": [
  293. {
  294. "type": "string",
  295. "description": "验证参数Bearer和token空格拼接",
  296. "name": "Authorization",
  297. "in": "header",
  298. "required": true
  299. },
  300. {
  301. "description": "请求参数",
  302. "name": "args",
  303. "in": "body",
  304. "required": true,
  305. "schema": {
  306. "$ref": "#/definitions/md.AdminListReq"
  307. }
  308. }
  309. ],
  310. "responses": {
  311. "200": {
  312. "description": "具体看返回内容",
  313. "schema": {
  314. "type": "string"
  315. }
  316. },
  317. "400": {
  318. "description": "具体错误",
  319. "schema": {
  320. "$ref": "#/definitions/md.Response"
  321. }
  322. }
  323. }
  324. }
  325. },
  326. "/api/role/bindAdminRole/": {
  327. "post": {
  328. "description": "权限管理-管理员绑定角色",
  329. "consumes": [
  330. "application/json"
  331. ],
  332. "produces": [
  333. "application/json"
  334. ],
  335. "tags": [
  336. "权限管理"
  337. ],
  338. "summary": "管理员绑定角色",
  339. "parameters": [
  340. {
  341. "type": "string",
  342. "description": "验证参数Bearer和token空格拼接",
  343. "name": "Authorization",
  344. "in": "header",
  345. "required": true
  346. },
  347. {
  348. "description": "请求参数",
  349. "name": "args",
  350. "in": "body",
  351. "required": true,
  352. "schema": {
  353. "$ref": "#/definitions/md.BindAdminRoleReq"
  354. }
  355. }
  356. ],
  357. "responses": {
  358. "200": {
  359. "description": "success",
  360. "schema": {
  361. "type": "string"
  362. }
  363. },
  364. "400": {
  365. "description": "具体错误",
  366. "schema": {
  367. "$ref": "#/definitions/md.Response"
  368. }
  369. }
  370. }
  371. }
  372. },
  373. "/api/role/deleteAdmin/{$adm_id}": {
  374. "delete": {
  375. "description": "权限管理-删除管理员",
  376. "consumes": [
  377. "application/json"
  378. ],
  379. "produces": [
  380. "application/json"
  381. ],
  382. "tags": [
  383. "权限管理"
  384. ],
  385. "summary": "删除管理员",
  386. "parameters": [
  387. {
  388. "type": "string",
  389. "description": "验证参数Bearer和token空格拼接",
  390. "name": "Authorization",
  391. "in": "header",
  392. "required": true
  393. }
  394. ],
  395. "responses": {
  396. "200": {
  397. "description": "success",
  398. "schema": {
  399. "type": "string"
  400. }
  401. },
  402. "400": {
  403. "description": "具体错误",
  404. "schema": {
  405. "$ref": "#/definitions/md.Response"
  406. }
  407. }
  408. }
  409. }
  410. },
  411. "/api/role/deleteRole/{$id}": {
  412. "delete": {
  413. "description": "权限管理-删除角色",
  414. "consumes": [
  415. "application/json"
  416. ],
  417. "produces": [
  418. "application/json"
  419. ],
  420. "tags": [
  421. "权限管理"
  422. ],
  423. "summary": "删除角色",
  424. "parameters": [
  425. {
  426. "type": "string",
  427. "description": "验证参数Bearer和token空格拼接",
  428. "name": "Authorization",
  429. "in": "header",
  430. "required": true
  431. },
  432. {
  433. "description": "请求参数",
  434. "name": "args",
  435. "in": "body",
  436. "required": true,
  437. "schema": {
  438. "$ref": "#/definitions/md.UpdateRoleStateReq"
  439. }
  440. }
  441. ],
  442. "responses": {
  443. "200": {
  444. "description": "success",
  445. "schema": {
  446. "type": "string"
  447. }
  448. },
  449. "400": {
  450. "description": "具体错误",
  451. "schema": {
  452. "$ref": "#/definitions/md.Response"
  453. }
  454. }
  455. }
  456. }
  457. },
  458. "/api/role/roleBindPermissionGroup": {
  459. "post": {
  460. "description": "权限管理-角色绑定权限组",
  461. "consumes": [
  462. "application/json"
  463. ],
  464. "produces": [
  465. "application/json"
  466. ],
  467. "tags": [
  468. "权限管理"
  469. ],
  470. "summary": "角色绑定权限组",
  471. "parameters": [
  472. {
  473. "type": "string",
  474. "description": "验证参数Bearer和token空格拼接",
  475. "name": "Authorization",
  476. "in": "header",
  477. "required": true
  478. },
  479. {
  480. "description": "请求参数",
  481. "name": "args",
  482. "in": "body",
  483. "required": true,
  484. "schema": {
  485. "$ref": "#/definitions/md.RoleBindPermissionGroupReq"
  486. }
  487. }
  488. ],
  489. "responses": {
  490. "200": {
  491. "description": "success",
  492. "schema": {
  493. "type": "string"
  494. }
  495. },
  496. "400": {
  497. "description": "具体错误",
  498. "schema": {
  499. "$ref": "#/definitions/md.Response"
  500. }
  501. }
  502. }
  503. }
  504. },
  505. "/api/role/roleList": {
  506. "get": {
  507. "description": "权限管理-角色列表",
  508. "consumes": [
  509. "application/json"
  510. ],
  511. "produces": [
  512. "application/json"
  513. ],
  514. "tags": [
  515. "权限管理"
  516. ],
  517. "summary": "角色列表",
  518. "parameters": [
  519. {
  520. "type": "string",
  521. "description": "验证参数Bearer和token空格拼接",
  522. "name": "Authorization",
  523. "in": "header",
  524. "required": true
  525. }
  526. ],
  527. "responses": {
  528. "200": {
  529. "description": "具体看返回内容",
  530. "schema": {
  531. "type": "string"
  532. }
  533. },
  534. "400": {
  535. "description": "具体错误",
  536. "schema": {
  537. "$ref": "#/definitions/md.Response"
  538. }
  539. }
  540. }
  541. }
  542. },
  543. "/api/role/updateAdmin": {
  544. "post": {
  545. "description": "权限管理-修改管理员信息",
  546. "consumes": [
  547. "application/json"
  548. ],
  549. "produces": [
  550. "application/json"
  551. ],
  552. "tags": [
  553. "权限管理"
  554. ],
  555. "summary": "修改管理员信息",
  556. "parameters": [
  557. {
  558. "type": "string",
  559. "description": "验证参数Bearer和token空格拼接",
  560. "name": "Authorization",
  561. "in": "header",
  562. "required": true
  563. },
  564. {
  565. "description": "请求参数",
  566. "name": "args",
  567. "in": "body",
  568. "required": true,
  569. "schema": {
  570. "$ref": "#/definitions/md.UpdateAdminReq"
  571. }
  572. }
  573. ],
  574. "responses": {
  575. "200": {
  576. "description": "success",
  577. "schema": {
  578. "type": "string"
  579. }
  580. },
  581. "400": {
  582. "description": "具体错误",
  583. "schema": {
  584. "$ref": "#/definitions/md.Response"
  585. }
  586. }
  587. }
  588. }
  589. },
  590. "/api/role/updateAdminState": {
  591. "post": {
  592. "description": "权限管理-修改管理员状态",
  593. "consumes": [
  594. "application/json"
  595. ],
  596. "produces": [
  597. "application/json"
  598. ],
  599. "tags": [
  600. "权限管理"
  601. ],
  602. "summary": "修改管理员状态",
  603. "parameters": [
  604. {
  605. "type": "string",
  606. "description": "验证参数Bearer和token空格拼接",
  607. "name": "Authorization",
  608. "in": "header",
  609. "required": true
  610. },
  611. {
  612. "description": "请求参数",
  613. "name": "args",
  614. "in": "body",
  615. "required": true,
  616. "schema": {
  617. "$ref": "#/definitions/md.UpdateAdminStateReq"
  618. }
  619. }
  620. ],
  621. "responses": {
  622. "200": {
  623. "description": "success",
  624. "schema": {
  625. "type": "string"
  626. }
  627. },
  628. "400": {
  629. "description": "具体错误",
  630. "schema": {
  631. "$ref": "#/definitions/md.Response"
  632. }
  633. }
  634. }
  635. }
  636. },
  637. "/api/role/updateRole": {
  638. "post": {
  639. "description": "权限管理-修改角色状态",
  640. "consumes": [
  641. "application/json"
  642. ],
  643. "produces": [
  644. "application/json"
  645. ],
  646. "tags": [
  647. "权限管理"
  648. ],
  649. "summary": "修改角色状态",
  650. "parameters": [
  651. {
  652. "type": "string",
  653. "description": "验证参数Bearer和token空格拼接",
  654. "name": "Authorization",
  655. "in": "header",
  656. "required": true
  657. },
  658. {
  659. "description": "请求参数",
  660. "name": "args",
  661. "in": "body",
  662. "required": true,
  663. "schema": {
  664. "$ref": "#/definitions/md.UpdateRoleStateReq"
  665. }
  666. }
  667. ],
  668. "responses": {
  669. "200": {
  670. "description": "success",
  671. "schema": {
  672. "type": "string"
  673. }
  674. },
  675. "400": {
  676. "description": "具体错误",
  677. "schema": {
  678. "$ref": "#/definitions/md.Response"
  679. }
  680. }
  681. }
  682. }
  683. },
  684. "/role/permissionGroupList": {
  685. "get": {
  686. "description": "权限管理-权限组列表",
  687. "consumes": [
  688. "application/json"
  689. ],
  690. "produces": [
  691. "application/json"
  692. ],
  693. "tags": [
  694. "权限管理"
  695. ],
  696. "summary": "权限组列表",
  697. "parameters": [
  698. {
  699. "type": "string",
  700. "description": "验证参数Bearer和token空格拼接",
  701. "name": "Authorization",
  702. "in": "header",
  703. "required": true
  704. },
  705. {
  706. "type": "string",
  707. "description": "管理员id",
  708. "name": "adm_id",
  709. "in": "query",
  710. "required": true
  711. }
  712. ],
  713. "responses": {
  714. "200": {
  715. "description": "具体看返回内容",
  716. "schema": {
  717. "type": "string"
  718. }
  719. },
  720. "400": {
  721. "description": "具体错误",
  722. "schema": {
  723. "$ref": "#/definitions/md.Response"
  724. }
  725. }
  726. }
  727. }
  728. }
  729. },
  730. "definitions": {
  731. "md.AddAdminReq": {
  732. "type": "object",
  733. "required": [
  734. "password",
  735. "username"
  736. ],
  737. "properties": {
  738. "memo": {
  739. "type": "string"
  740. },
  741. "password": {
  742. "type": "string"
  743. },
  744. "username": {
  745. "type": "string"
  746. }
  747. }
  748. },
  749. "md.AddRoleReq": {
  750. "type": "object",
  751. "required": [
  752. "memo",
  753. "name"
  754. ],
  755. "properties": {
  756. "memo": {
  757. "type": "string"
  758. },
  759. "name": {
  760. "type": "string"
  761. }
  762. }
  763. },
  764. "md.AdminListReq": {
  765. "type": "object",
  766. "properties": {
  767. "limit": {
  768. "type": "integer"
  769. },
  770. "page": {
  771. "type": "integer"
  772. },
  773. "state": {
  774. "type": "integer"
  775. },
  776. "username": {
  777. "type": "string"
  778. }
  779. }
  780. },
  781. "md.BindAdminRoleReq": {
  782. "type": "object",
  783. "required": [
  784. "adm_id"
  785. ],
  786. "properties": {
  787. "adm_id": {
  788. "type": "integer"
  789. },
  790. "role_ids": {
  791. "type": "array",
  792. "items": {
  793. "type": "integer"
  794. }
  795. }
  796. }
  797. },
  798. "md.LoginReq": {
  799. "type": "object",
  800. "required": [
  801. "password",
  802. "username"
  803. ],
  804. "properties": {
  805. "code": {
  806. "type": "string",
  807. "example": "验证码"
  808. },
  809. "password": {
  810. "type": "string",
  811. "example": "登录密码"
  812. },
  813. "username": {
  814. "type": "string",
  815. "example": "登录账号"
  816. }
  817. }
  818. },
  819. "md.LoginResponse": {
  820. "type": "object",
  821. "properties": {
  822. "token": {
  823. "type": "string"
  824. }
  825. }
  826. },
  827. "md.RegisterForAgentReq": {
  828. "type": "object",
  829. "required": [
  830. "password",
  831. "phone"
  832. ],
  833. "properties": {
  834. "code": {
  835. "type": "string",
  836. "example": "验证码"
  837. },
  838. "password": {
  839. "type": "string",
  840. "example": "登录密码"
  841. },
  842. "phone": {
  843. "type": "string",
  844. "example": "登录账号"
  845. }
  846. }
  847. },
  848. "md.RegisterForMediumReq": {
  849. "type": "object",
  850. "required": [
  851. "password",
  852. "phone"
  853. ],
  854. "properties": {
  855. "code": {
  856. "type": "string",
  857. "example": "验证码"
  858. },
  859. "password": {
  860. "type": "string",
  861. "example": "登录密码"
  862. },
  863. "phone": {
  864. "type": "string",
  865. "example": "登录账号"
  866. }
  867. }
  868. },
  869. "md.Response": {
  870. "type": "object",
  871. "properties": {
  872. "code": {
  873. "type": "string",
  874. "example": "响应码"
  875. },
  876. "data": {
  877. "description": "内容"
  878. },
  879. "msg": {
  880. "type": "string",
  881. "example": "具体错误原因"
  882. }
  883. }
  884. },
  885. "md.RoleBindPermissionGroupReq": {
  886. "type": "object",
  887. "required": [
  888. "role_id"
  889. ],
  890. "properties": {
  891. "permission_ids": {
  892. "type": "array",
  893. "items": {
  894. "type": "integer"
  895. }
  896. },
  897. "role_id": {
  898. "type": "integer"
  899. }
  900. }
  901. },
  902. "md.UpdateAdminReq": {
  903. "type": "object",
  904. "required": [
  905. "adm_id",
  906. "password",
  907. "username"
  908. ],
  909. "properties": {
  910. "adm_id": {
  911. "type": "integer"
  912. },
  913. "memo": {
  914. "type": "string"
  915. },
  916. "password": {
  917. "type": "string"
  918. },
  919. "username": {
  920. "type": "string"
  921. }
  922. }
  923. },
  924. "md.UpdateAdminStateReq": {
  925. "type": "object",
  926. "required": [
  927. "adm_id",
  928. "state"
  929. ],
  930. "properties": {
  931. "adm_id": {
  932. "type": "integer"
  933. },
  934. "state": {
  935. "type": "integer"
  936. }
  937. }
  938. },
  939. "md.UpdateRoleReq": {
  940. "type": "object",
  941. "required": [
  942. "memo",
  943. "name",
  944. "role_id"
  945. ],
  946. "properties": {
  947. "memo": {
  948. "type": "string"
  949. },
  950. "name": {
  951. "type": "string"
  952. },
  953. "role_id": {
  954. "type": "integer"
  955. }
  956. }
  957. },
  958. "md.UpdateRoleStateReq": {
  959. "type": "object",
  960. "required": [
  961. "role_id",
  962. "state"
  963. ],
  964. "properties": {
  965. "role_id": {
  966. "type": "integer"
  967. },
  968. "state": {
  969. "type": "integer"
  970. }
  971. }
  972. }
  973. },
  974. "securityDefinitions": {
  975. "MasterID": {
  976. "type": "apiKey",
  977. "name": "MasterID",
  978. "in": "header"
  979. }
  980. }
  981. }