蛋蛋星球 后台端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 月之前
3 週之前
1 月之前
3 週之前
2 週之前
3 週之前
1 月之前
2 週之前
3 週之前
1 月之前
1 月之前
1 月之前
1 月之前
3 週之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
3 週之前
2 週之前
2 週之前
1 周之前
3 週之前
1 月之前
1 月之前
3 週之前
3 週之前
1 月之前
1 周之前
1 月之前
1 月之前
1 月之前
3 週之前
1 月之前
3 週之前
2 週之前
1 周之前
1 月之前
1 月之前
1 月之前
1 月之前
3 週之前
1 周之前
1 周之前
3 週之前
3 週之前
1 月之前
1 月之前
1 月之前
1 月之前
1 周之前
1 月之前
1 月之前
1 月之前
1 周之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
3 週之前
2 週之前
3 週之前
2 週之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 月之前
1 周之前
1 月之前
1 月之前
3 週之前
3 週之前
3 週之前
3 週之前
3 週之前
3 週之前
3 週之前
2 週之前
3 週之前
2 週之前
2 週之前
2 週之前
2 週之前
2 週之前
2 週之前
2 週之前
1 周之前
1 周之前
1 月之前
2 週之前
1 月之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. package router
  2. import (
  3. "applet/app/cfg"
  4. "applet/app/hdl"
  5. "applet/app/hdl/advertising"
  6. "applet/app/hdl/article"
  7. "applet/app/hdl/cloud_bundle"
  8. "applet/app/hdl/comm"
  9. "applet/app/hdl/content_reward"
  10. "applet/app/hdl/financial_center"
  11. "applet/app/hdl/friend_circle"
  12. "applet/app/hdl/im"
  13. "applet/app/hdl/institutional_management/egg_energy"
  14. "applet/app/hdl/institutional_management/egg_point_coefficient"
  15. "applet/app/hdl/institutional_management/module_setting"
  16. "applet/app/hdl/institutional_management/public_platoon"
  17. "applet/app/hdl/marketing_applications/new_user_red_package"
  18. "applet/app/hdl/member_center"
  19. "applet/app/hdl/notice"
  20. "applet/app/hdl/setCenter/oss/aliyun"
  21. "applet/app/hdl/setCenter/web"
  22. "applet/app/hdl/user_feedback"
  23. "applet/app/hdl/user_real_name"
  24. "applet/app/hdl/website"
  25. "applet/app/mw"
  26. _ "applet/docs"
  27. "github.com/gin-gonic/gin"
  28. swaggerFiles "github.com/swaggo/files"
  29. ginSwagger "github.com/swaggo/gin-swagger"
  30. )
  31. // 初始化路由
  32. func Init() *gin.Engine {
  33. // debug, release, test 项目阶段
  34. mode := "release"
  35. if cfg.Debug {
  36. mode = "debug"
  37. }
  38. gin.SetMode(mode)
  39. //创建一个新的启动器
  40. r := gin.New()
  41. r.GET("/api/swagger/*any", func(c *gin.Context) {
  42. // r.Use(mw.SwagAuth())
  43. ginSwagger.DisablingWrapHandler(swaggerFiles.Handler, "SWAGGER")(c)
  44. })
  45. // 是否打印访问日志, 在非正式环境都打印
  46. if mode != "release" {
  47. r.Use(gin.Logger())
  48. }
  49. r.Use(gin.Recovery())
  50. r.GET("/favicon.ico", func(c *gin.Context) {
  51. c.Status(204)
  52. })
  53. r.NoRoute(func(c *gin.Context) {
  54. c.JSON(404, gin.H{"code": 404, "msg": "page not found", "data": []struct{}{}})
  55. })
  56. r.NoMethod(func(c *gin.Context) {
  57. c.JSON(405, gin.H{"code": 405, "msg": "method not allowed", "data": []struct{}{}})
  58. })
  59. r.Use(mw.Cors)
  60. route(r.Group("/api"))
  61. return r
  62. }
  63. func route(r *gin.RouterGroup) {
  64. r.GET("/test", hdl.Demo)
  65. r.POST("/login", hdl.Login)
  66. {
  67. //打包机调用,不需要校验
  68. r.GET("/cloudBundle/base", cloud_bundle.Base) //打包基本信息
  69. r.POST("/cloudBundle/update/state", cloud_bundle.UpdateState) //打包更新状态
  70. r.POST("/cloudBundle/upload", cloud_bundle.Upload) //打包 上传apk
  71. r.GET("/getSTSVoucher", comm.GetSTSVoucher) // 获取 STS 凭证
  72. //这里是官网的接口
  73. rWebsite := r.Group("/website") //官网信息
  74. {
  75. rWebsite.GET("/info", website.WebsiteInfo) // 官网
  76. rWebsite.GET("/getModuleSetting", website.GetModuleSetting) // 获取页面样式
  77. rWebsite.POST("/certificate", website.Certificate) // 查询证书
  78. }
  79. }
  80. r.Use(mw.Auth) // 以下接口需要JWT验证
  81. rComm(r.Group("/comm"))
  82. r.GET("/config", hdl.Config)
  83. rIm(r.Group("/im"))
  84. r.Use(mw.CheckPermission) // 检测权限
  85. rRole(r.Group("/role"))
  86. rInstitutionalManagement(r.Group("/institutionalManagement"))
  87. rMarketingApplications(r.Group("/marketingApplications"))
  88. rMemberCenter(r.Group("/memberCenter"))
  89. rHomePage(r.Group("/homePage"))
  90. rSettCenter(r.Group("/settCenter"))
  91. rFinancialCenter(r.Group("/financialCenter"))
  92. rAdvertising(r.Group("/advertising"))
  93. rNotice(r.Group("/notice"))
  94. rArticle(r.Group("/article"))
  95. rUserFeedback(r.Group("/userFeedback"))
  96. rCloudBundle(r.Group("/cloudBundle")) //云打包
  97. rUserRealName(r.Group("/userRealName")) //实名认证
  98. rFriendCircleSettings(r.Group("/friendCircleSettings")) // 朋友圈设置
  99. rAdminLog(r.Group("/adminLog")) // 操作日志
  100. }
  101. func rSettCenter(r *gin.RouterGroup) { //设置中心
  102. rOss := r.Group("/oss") //oss设置
  103. {
  104. rOssAliYun := rOss.Group("/aliYun") //阿里云
  105. {
  106. rOssAliYun.GET("/getBasic", aliyun.GetBasic)
  107. rOssAliYun.POST("/setBasic", aliyun.SetBasic)
  108. }
  109. }
  110. rWeb := r.Group("/web") //网站信息
  111. {
  112. rWeb.GET("/getBasic", web.GetBasic)
  113. rWeb.POST("/setBasic", web.SetBasic)
  114. }
  115. }
  116. func rHomePage(r *gin.RouterGroup) {
  117. r.GET("/totalData", hdl.GetTotalData)
  118. r.GET("/activeData", hdl.GetActiveData)
  119. r.GET("/growData", hdl.GetGrowData)
  120. }
  121. func rAdvertising(r *gin.RouterGroup) {
  122. r.GET("/getBasic", advertising.GetBasic)
  123. r.POST("/setBasic", advertising.SetBasic)
  124. r.POST("/list", advertising.List)
  125. r.POST("/save", advertising.Save)
  126. r.POST("/del", advertising.Del)
  127. r.GET("/getLimit", advertising.GetLimit)
  128. r.POST("/setLimit", advertising.SetLimit)
  129. r.POST("/function/list", advertising.FunctionList)
  130. r.POST("/function/save", advertising.FunctionSave)
  131. r.POST("/function/del", advertising.FunctionDel)
  132. }
  133. func rNotice(r *gin.RouterGroup) {
  134. rBase := r.Group("/base") //极光
  135. {
  136. rBase.POST("/list", notice.List)
  137. rBase.POST("/save", notice.Save)
  138. rBase.POST("/del", notice.Del)
  139. }
  140. rJpush := r.Group("/jPush") //极光
  141. {
  142. rJpush.POST("/push/list", notice.PushList)
  143. rJpush.POST("/getUserList", notice.JPushGetUserList)
  144. rJpush.GET("/getTagList", notice.JPushGetTagList)
  145. rJpush.GET("/getLevelList", notice.JPushGetLevelList)
  146. rJpush.POST("/push/save", notice.PushSave)
  147. }
  148. rAliyunSms := r.Group("/aliyunSms") //阿里云短信
  149. {
  150. rAliyunSms.POST("/file/phone", notice.AliyunSmsFilePhone)
  151. rAliyunSms.POST("/getUserList", notice.AliyunSmsGetUserList)
  152. rAliyunSms.GET("/getTagList", notice.AliyunSmsTagList)
  153. rAliyunSms.GET("/getLevelList", notice.AliyunSmsGetLevelList)
  154. rAliyunSms.GET("/sale/base", notice.AliyunSmsSaleBase)
  155. rAliyunSms.POST("/sale/save", notice.AliyunSmsSaleSave)
  156. rAliyunSms.POST("/push/list", notice.AliyunSmsPushList)
  157. rAliyunSms.POST("/push/save", notice.AliyunSmsPushSave)
  158. }
  159. }
  160. func rArticle(r *gin.RouterGroup) { //文章
  161. rCate := r.Group("/cate") //
  162. {
  163. rCate.POST("/list", article.CateList)
  164. rCate.POST("/save", article.CateSave)
  165. rCate.POST("/del", article.CateDel)
  166. }
  167. rContent := r.Group("/content") //
  168. {
  169. rContent.POST("/list", article.List)
  170. rContent.POST("/save", article.Save)
  171. rContent.POST("/del", article.Del)
  172. }
  173. }
  174. func rUserFeedback(r *gin.RouterGroup) { //用户反馈
  175. rCate := r.Group("/cate") //
  176. {
  177. rCate.POST("/list", user_feedback.CateList)
  178. rCate.POST("/save", user_feedback.CateSave)
  179. rCate.POST("/del", user_feedback.CateDel)
  180. }
  181. rContent := r.Group("/content") //
  182. {
  183. rContent.POST("/list", user_feedback.List)
  184. rContent.POST("/record/list", user_feedback.RecordList)
  185. rContent.POST("/say", user_feedback.Say)
  186. rContent.POST("/change/state", user_feedback.ChangeState)
  187. rContent.POST("/del", user_feedback.Del)
  188. }
  189. }
  190. func rCloudBundle(r *gin.RouterGroup) { //云打包
  191. r.POST("/list", cloud_bundle.List)
  192. r.POST("/build", cloud_bundle.Build)
  193. r.POST("/del", cloud_bundle.Del)
  194. r.POST("/audit/set", cloud_bundle.AuditSet)
  195. r.POST("/audit/clear", cloud_bundle.AuditClear)
  196. r.GET("/img/base", cloud_bundle.ImgBase)
  197. r.POST("/img/base/save", cloud_bundle.ImgBaseSave)
  198. r.GET("/version/base", cloud_bundle.VersionBase)
  199. r.POST("/version/base/save", cloud_bundle.VersionBaseSave)
  200. }
  201. func rUserRealName(r *gin.RouterGroup) { //实名认证
  202. r.POST("/list", user_real_name.List)
  203. r.POST("/save", user_real_name.Save)
  204. r.GET("/base", user_real_name.Base)
  205. r.POST("/base/save", user_real_name.BaseSave)
  206. }
  207. func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
  208. rPublicPlatoon := r.Group("/publicPlatoon") //公排设置
  209. {
  210. rPublicPlatoon.GET("/getBasic", public_platoon.GetPublicPlatoonBasic)
  211. rPublicPlatoon.PUT("/updateBasic", public_platoon.UpdatePublicPlatoonBasic)
  212. rPublicPlatoon.GET("/relationshipMap", public_platoon.GetRelationshipMap)
  213. rPublicPlatoon.GET("/findUserRelationshipMap", public_platoon.FindUserRelationshipMap)
  214. rPublicPlatoon.GET("/findSubUserRelationshipMap", public_platoon.FindSubUserRelationshipMap)
  215. rPublicPlatoon.POST("/exchangeUserPosition", public_platoon.ExchangeUserPosition)
  216. rPublicPlatoon.POST("/selectMember", public_platoon.SelectMember)
  217. rPublicPlatoonUserFreePunish := rPublicPlatoon.Group("/publicPlatoonUserFreePunish")
  218. {
  219. rPublicPlatoonUserFreePunish.POST("/index", public_platoon.GetFreePublishUser)
  220. rPublicPlatoonUserFreePunish.POST("/save", public_platoon.AddFreePublishUser)
  221. rPublicPlatoonUserFreePunish.DELETE("/delete", public_platoon.DeleteFreePublishUser)
  222. }
  223. rCommunityDividends := rPublicPlatoon.Group("/communityDividends")
  224. {
  225. rCommunityDividends.POST("/communityDividendsList", public_platoon.ListCommunityDividends)
  226. rCommunityDividends.POST("/communityDividendsAdd", public_platoon.AddCommunityDividends)
  227. rCommunityDividends.POST("/communityDividendsWithUserList", public_platoon.ListCommunityDividendsWithUser)
  228. rCommunityDividends.POST("/communityDividendsWithUserAdd", public_platoon.AddCommunityDividendsWithUser)
  229. rCommunityDividends.DELETE("/communityDividendsWithUserDel/:id", public_platoon.DelCommunityDividendsWithUser)
  230. }
  231. rUserDailyActivityAnalysis := rPublicPlatoon.Group("/userDailyActivityAnalysis")
  232. {
  233. rUserDailyActivityAnalysis.POST("/index", public_platoon.UserDailyActivityAnalysis)
  234. }
  235. }
  236. rEggEnergy := r.Group("/eggEnergy") //蛋蛋能量
  237. {
  238. rEggEnergy.GET("/getVirtualCoinList", egg_energy.GetVirtualCoinList)
  239. rEggEnergy.POST("/batchAddVirtualCoins", egg_energy.BatchAddVirtualCoins)
  240. rEggEnergy.POST("/updateVirtualCoin", egg_energy.UpdateVirtualCoin)
  241. rEggEnergy.DELETE("/deleteVirtualCoin/:id", egg_energy.DeleteVirtualCoin)
  242. rEggEnergy.GET("/getBasic", egg_energy.GetEggEnergyBasic)
  243. rEggEnergy.POST("/updateBasic", egg_energy.UpdateEggEnergyBasic)
  244. rEggEnergy.GET("/getVipSetting", egg_energy.GetEggEnergyVipSetting)
  245. rEggEnergy.POST("/addVipSetting", egg_energy.AddEggEnergyVipSetting)
  246. rEggEnergy.POST("/updateVipSetting", egg_energy.UpdateEggEnergyVipSetting)
  247. rEggEnergyUserCoin := rEggEnergy.Group("/userCoin")
  248. {
  249. rEggEnergyUserCoin.POST("/eggEnergyUserCoinList", egg_energy.GetEggEnergyUserCoinList)
  250. rEggEnergyUserCoin.POST("/eggEnergyUserCoinFlowList", egg_energy.GetEggEnergyUserCoinFlowList)
  251. rEggEnergyUserCoin.POST("/eggPointsUserCoinList", egg_energy.GetEggPointsUserCoinList)
  252. rEggEnergyUserCoin.POST("/getEggPointsUserCoinFlowList", egg_energy.GetEggPointsUserCoinFlowList)
  253. }
  254. rEggEnergyAvailableEnergy := rEggEnergy.Group("/availableEnergy")
  255. {
  256. rEggEnergyAvailableEnergy.POST("/list", egg_energy.DynamicDataFlowList)
  257. }
  258. rEggGlobalData := rEggEnergy.Group("/globalData")
  259. {
  260. rEggGlobalData.GET("/coreDataList", egg_energy.GetEggCoreDataList)
  261. rEggGlobalData.GET("/pointsCenterPriceCurve", egg_energy.GetPriceCurve)
  262. rEggGlobalData.POST("/fundDataList", egg_energy.GetFundDataList)
  263. rEggGlobalData.POST("/fundDataRecordList", egg_energy.GetFundDataRecordList)
  264. rEggGlobalData.POST("/fundDataAdd", egg_energy.AddFundData)
  265. }
  266. rPlatformRevenue := rEggEnergy.Group("/platformRevenue")
  267. {
  268. rPlatformRevenue.POST("/getVideoReward", egg_energy.GetVideoReward)
  269. rPlatformRevenue.POST("/setVideoReward", egg_energy.SetVideoReward)
  270. rPlatformRevenue.POST("/platformRevenueList", egg_energy.ListPlatformRevenue)
  271. rPlatformRevenue.POST("/platformRevenueAdd", egg_energy.AddPlatformRevenue)
  272. }
  273. rEggPoint := rEggEnergy.Group("/eggPoint")
  274. {
  275. rEggPoint.POST("/userEggIndex", egg_energy.UserEggIndex)
  276. rEggPoint.POST("/statisticsUserEggIndex", egg_energy.StatisticsUserEggIndex)
  277. rEggPoint.POST("/userEggFlow", egg_energy.UserEggFlow)
  278. rEggPoint.POST("/manualScore", egg_energy.ManualScore)
  279. }
  280. rContributionValue := rEggEnergy.Group("/contributionValue")
  281. {
  282. rContributionValue.GET("/basic", egg_energy.GetContributionValueBasicSetting)
  283. rContributionValue.POST("/updateBasic", egg_energy.UpdateContributionValueBasicSetting)
  284. }
  285. }
  286. rModuleSetting := r.Group("/moduleSetting")
  287. {
  288. rModuleSetting.GET("/getModuleSetting", module_setting.ModuleSettingGet)
  289. rModuleSetting.POST("/getArticle", article.List)
  290. rModuleSetting.POST("/updateModuleSetting", module_setting.ModuleSettingUpdate)
  291. }
  292. rContentReward := r.Group("/contentReward") // 内容奖励
  293. {
  294. rVideo := rContentReward.Group("/video")
  295. {
  296. rVideo.GET("/base", content_reward.VideoBase) //
  297. rVideo.POST("/save", content_reward.VideoBaseSave) //
  298. }
  299. rPlaylet := rContentReward.Group("/playlet")
  300. {
  301. rPlaylet.GET("/base", content_reward.PlayletBase) //
  302. rPlaylet.POST("/save", content_reward.PlayletBaseSave) //
  303. }
  304. }
  305. rEggPointCoefficient := r.Group("/eggPointCoefficient") // 蛋蛋分区间系数管理
  306. {
  307. rEggPointCoefficient.GET("/index", egg_point_coefficient.EggPointCoefficientGet) // 查询
  308. rEggPointCoefficient.POST("/add", egg_point_coefficient.EggPointCoefficientBatchAdd) // 新增
  309. rEggPointCoefficient.POST("/update", egg_point_coefficient.EggPointCoefficientUpdate) // 更新
  310. rEggPointCoefficient.DELETE("/del", egg_point_coefficient.EggPointCoefficientDel) // 删除
  311. }
  312. }
  313. func rMarketingApplications(r *gin.RouterGroup) { //营销应用
  314. rNewUserRedPackage := r.Group("/newUserRedPackage") //新人红包
  315. {
  316. rNewUserRedPackage.GET("/getBasic", new_user_red_package.NewUserRedPackageGetBasic)
  317. rNewUserRedPackage.PUT("/updateBasic", new_user_red_package.NewUserRedPackageUpdateBasic)
  318. rNewUserRedPackage.POST("/recordList", new_user_red_package.NewUserRedPackageRecordList)
  319. rNewUserRedPackage.POST("/recordFlowList", new_user_red_package.NewUserRedPackageRecordFlowList)
  320. }
  321. }
  322. func rMemberCenter(r *gin.RouterGroup) { // 会员中心
  323. rUserManagement := r.Group("/userManagement")
  324. {
  325. rUserManagement.POST("/getUserList", member_center.UserManagementGetUserList)
  326. rUserManagement.GET("/userData", member_center.UserManagementGetOneBasic)
  327. rUserManagement.POST("/updateUserInfo", member_center.UserManagementUpdateUserInfo)
  328. rUserManagement.GET("/getFans", member_center.UserManagementGetFans)
  329. rUserManagement.GET("/balanceDetail", member_center.UserManagementGetBalanceDetail)
  330. rUserManagement.GET("/getVirtualCoinDetail", member_center.UserManagementGetVirtualCoinDetail)
  331. }
  332. rTagManagement := r.Group("/tagManagement")
  333. {
  334. rTagManagement.GET("/getTagList", member_center.GetTagList)
  335. rTagManagement.POST("/addTag", member_center.AddTag)
  336. rTagManagement.POST("/updateTag", member_center.UpdateTag)
  337. rTagManagement.DELETE("/deleteTag", member_center.DeleteTag)
  338. }
  339. rLevelManagement := r.Group("/levelManagement")
  340. {
  341. rLevelManagement.GET("/getLevelList", member_center.GetLevelList)
  342. rLevelManagement.GET("/getOneLevel", member_center.GetOneLevel)
  343. rLevelManagement.POST("/updateLevel", member_center.UpdateLevel)
  344. rLevelManagement.POST("/addLevel", member_center.AddLevel)
  345. rLevelManagement.DELETE("/deleteLevel", member_center.DeleteLevel)
  346. rLevelManagement.DELETE("/deleteLevelTask", member_center.DeleteLevelTask)
  347. }
  348. rCertificate := r.Group("/certificate")
  349. {
  350. rCertificate.POST("/list", member_center.CertificateList)
  351. rCertificate.POST("/save", member_center.CertificateSave)
  352. rCertificate.POST("/del", member_center.CertificateDel)
  353. }
  354. }
  355. func rIm(r *gin.RouterGroup) {
  356. r.GET("/getBasic", im.GetBasic)
  357. r.POST("/setBasic", im.SetBasic)
  358. r.POST("/pageEmoticon", im.PageEmoticon)
  359. r.POST("/addEmoticon", im.AddEmoticon)
  360. r.POST("/setEmoticonState", im.SetEmoticonState)
  361. r.POST("/updateEmoticon", im.UpdateEmoticon)
  362. r.POST("/deleteEmoticon", im.DeleteEmoticon)
  363. r.POST("/pageCustomerService", im.PageCustomerService)
  364. r.POST("/addCustomerService", im.AddCustomerService)
  365. r.POST("/setCustomerServiceState", im.SetCustomerServiceState)
  366. r.POST("/updateCustomerServiceMemo", im.UpdateCustomerServiceMemo)
  367. r.GET("/redPackageRecordsDetail", im.RedPackageRecordsDetail)
  368. r.POST("/pageSendRedPackageOrd", im.PageSendRedPackageOrd)
  369. r.POST("/groupList", im.GroupList)
  370. r.POST("/groupUserList", im.GroupUserList)
  371. r.POST("/batchSendGroupMessage", im.BatchSendGroupMessage)
  372. r.POST("/batchSendUserMessage", im.BatchSendUserMessage)
  373. }
  374. func rFinancialCenter(r *gin.RouterGroup) {
  375. rWithdraw := r.Group("/withdraw")
  376. {
  377. rWithdraw.GET("/setting", financial_center.GetWithdrawSetting)
  378. rWithdraw.POST("/updateWithdrawSetting", financial_center.UpdateWithdrawSetting)
  379. rWithdraw.POST("/applyList", financial_center.GetWithdrawApplyList)
  380. rWithdraw.POST("/audit", financial_center.WithdrawApplyAudit)
  381. }
  382. }
  383. func rFriendCircleSettings(r *gin.RouterGroup) {
  384. rBasic := r.Group("/basic")
  385. {
  386. rBasic.GET("/index", friend_circle.GetFriendCircleBasicSettings) // 获取动态基础设置
  387. rBasic.POST("/save", friend_circle.UpdateFriendCircleBasicSettings) // 更新动态设置
  388. }
  389. rBlackList := r.Group("/blackList")
  390. {
  391. rBlackList.GET("/index", friend_circle.GetBlackList) // 获取黑名单
  392. rBlackList.POST("/add", friend_circle.AddBlackList) // 添加黑名单
  393. rBlackList.DELETE("/del", friend_circle.DeleteBlackList) // 删除黑名单
  394. }
  395. rDynamic := r.Group("/dynamic")
  396. {
  397. rDynamic.POST("/index", friend_circle.GetDynamic) // 获取动态列表
  398. rDynamic.POST("/update", friend_circle.UpdateDynamic) // 更新动态
  399. rDynamic.DELETE("/del", friend_circle.DeleteDynamic) // 删除动态
  400. rDynamic.POST("/release", friend_circle.ReleaseDynamic) // 发布动态
  401. }
  402. }
  403. func rRole(r *gin.RouterGroup) {
  404. r.GET("/roleList", hdl.RoleList) // 角色列表
  405. r.POST("/addRole", hdl.AddRole) // 角色添加
  406. r.POST("/roleBindPermissionGroup", hdl.RoleBindPermissionGroup) // 角色绑定权限组
  407. r.POST("/updateRoleState", hdl.UpdateRoleState) // 修改角色状态
  408. r.POST("/updateRole", hdl.UpdateRole) // 修改角色状态
  409. r.DELETE("/deleteRole/:id", hdl.DeleteRole) // 删除角色
  410. r.GET("/permissionGroupList", hdl.PermissionGroupList) // 权限组列表
  411. r.POST("/adminList", hdl.AdminList) // 管理员列表
  412. r.POST("/updateAdminState", hdl.UpdateAdminState) // 修改管理员状态
  413. r.POST("/updateAdmin", hdl.UpdateAdmin) // 修改管理员信息
  414. r.POST("/addAdmin", hdl.AddAdmin) // 新增管理员
  415. r.DELETE("/deleteAdmin/:adm_id", hdl.DeleteAdmin) // 删除管理员
  416. r.GET("/adminInfo", hdl.AdminInfo) // 获取管理员信息
  417. r.POST("/bindAdminRole", hdl.BindAdminRole) // 绑定角色
  418. }
  419. func rAdminLog(r *gin.RouterGroup) {
  420. r.POST("/list", hdl.AdminLog) //
  421. }
  422. func rComm(r *gin.RouterGroup) {
  423. r.POST("/getMenuList", comm.MenuList) // 获取菜单栏列表
  424. r.POST("/getOssUrl", comm.GetOssUrl) // 获取阿里云上传PutObject所需的签名URL
  425. r.GET("/getSTSVoucher", comm.GetSTSVoucher) // 获取 STS 凭证
  426. r.GET("/adminInfo", comm.GetAdminInfo)
  427. }