menu.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
  1. package api
  2. import (
  3. "gadmin/internal/admin/service"
  4. "gadmin/utility/serializer"
  5. "gadmin/utility/token"
  6. "github.com/gin-gonic/gin"
  7. )
  8. type (
  9. Map = map[string]interface{}
  10. )
  11. func MenuDynamic(c *gin.Context) {
  12. systemId := token.GetSystemId(c)
  13. t := c.GetHeader("authorization")
  14. roleId, _ := c.Get("admin_role_id")
  15. list, err := service.Menu.GetRoleMenuList(systemId, roleId.(int64), t)
  16. if err != nil {
  17. c.JSON(200, ErrorResponse(err))
  18. return
  19. }
  20. c.JSON(200, serializer.Suc(list, "获取成功"))
  21. return
  22. }
  23. //func GetAllMenuList(c *gin.Context) (map[int32][]*forms.Menu, error) {
  24. // systems, err := service.AdminRole.GetAllSystem()
  25. // if err != nil {
  26. // return nil, err
  27. // }
  28. // t := c.GetHeader("authorization")
  29. // roleId, _ := c.Get("admin_role_id")
  30. //
  31. // systemMap := make(map[int32][]*forms.Menu)
  32. // for _, sys := range systems {
  33. // menus, err := service.Menu.GetRoleMenuList(sys.ID, roleId.(int64), t)
  34. // if err != nil {
  35. // return nil, err
  36. // }
  37. // systemMap[sys.ID] = menus
  38. // }
  39. // return systemMap, nil
  40. //}
  41. //func GetMenuList(c *gin.Context) []Map {
  42. // var (
  43. // lists []Map
  44. // localHidden = true // 本地显示的菜单
  45. // )
  46. //
  47. // if os.Getenv("ADMIN_IS_LOCAL") == "1" {
  48. // localHidden = false
  49. // }
  50. //
  51. // // 控制台
  52. // lists = append(lists, Map{
  53. // "id": 1,
  54. // "path": "/dashboard",
  55. // "name": "Dashboard",
  56. // "component": "LAYOUT",
  57. // "redirect": "/dashboard/console",
  58. // "meta": Map{
  59. // "title": "Dashboard",
  60. // "icon": "DashboardOutlined",
  61. // },
  62. // "children": []Map{
  63. // {
  64. // "id": 1001,
  65. // "path": "console",
  66. // "name": "dashboard_console",
  67. // "component": "/dashboard/console/console",
  68. // "meta": Map{
  69. // "title": "主控台",
  70. // },
  71. // },
  72. // },
  73. // })
  74. //
  75. // // 玩家管理
  76. // lists = append(lists, Map{
  77. // "id": 2,
  78. // "path": "/account",
  79. // "name": "Account",
  80. // "component": "LAYOUT",
  81. // "redirect": "/account/account-list",
  82. // "meta": Map{
  83. // "icon": "UserOutlined",
  84. // "title": "玩家管理",
  85. // "sort": 2,
  86. // },
  87. // "children": []Map{
  88. // {
  89. // "id": 2001,
  90. // "path": "account-list",
  91. // "name": "account-list",
  92. // "component": "/account/accountList/index",
  93. // "meta": Map{
  94. // "title": "玩家列表",
  95. // },
  96. // },
  97. // {
  98. // "id": 2002,
  99. // "path": "account-info/:id?",
  100. // "name": "account-info",
  101. // "component": "/account/accountList/info",
  102. // "meta": Map{
  103. // "title": "基础详情",
  104. // "hidden": true,
  105. // "activeMenu": "account-list",
  106. // },
  107. // },
  108. // {
  109. // "id": 2003,
  110. // "path": "account-search",
  111. // "name": "account-search",
  112. // "component": "/account/accountList/search",
  113. // "meta": Map{
  114. // "title": "全服查找",
  115. // },
  116. // },
  117. // /*{
  118. // "path": "account-banLogs",
  119. // "name": "account-banLogs",
  120. // "component": "/account/accountList/banLogs",
  121. // "meta": Map{
  122. // "title": "拉黑记录",
  123. // },
  124. // },
  125. // {
  126. // "path": "retrofit-list",
  127. // "name": "retrofit-list",
  128. // "component": "/retrofit/index",
  129. // "meta": Map{
  130. // "title": "配装模板",
  131. // },
  132. // },
  133. // {
  134. // "path": "consumption-details",
  135. // "name": "consumption-details",
  136. // "component": "/recharge/consumption/index",
  137. // "meta": Map{
  138. // "title": "消费变动记录",
  139. // },
  140. // },
  141. // {
  142. // "path": "consumption-statistics",
  143. // "name": "consumption-statistics",
  144. // "component": "/recharge/consumptionStatistics/index",
  145. // "meta": Map{
  146. // "title": "消费统计",
  147. // },
  148. // },
  149. // {
  150. // "path": "game-data-alarm",
  151. // "name": "game-data-alarm",
  152. // "component": "/account/gameDataAlarm/index",
  153. // "meta": Map{
  154. // "title": "游戏异常",
  155. // },
  156. // },
  157. // {
  158. // "path": "game-cheating-alarm",
  159. // "name": "game-cheating-alarm",
  160. // "component": "/account/gameCheatingAlarm/index",
  161. // "meta": Map{
  162. // "title": "作弊数据筛选",
  163. // },
  164. // },
  165. // {
  166. // "path": "chat-report-list",
  167. // "name": "chat-report-list",
  168. // "component": "/account/chatReportList/index",
  169. // "meta": Map{
  170. // "title": "聊天举报记录",
  171. // },
  172. // },
  173. // {
  174. // "path": "chat-log-list",
  175. // "name": "chat-log-list",
  176. // "component": "/account/chatLogList/index",
  177. // "meta": Map{
  178. // "title": "聊天记录",
  179. // },
  180. // },*/
  181. // },
  182. // })
  183. //
  184. // if config.IsSuperRole(service.User.GetUserRoleId(c)) {
  185. // // 权限管理
  186. // lists = append(lists, Map{
  187. // "id": 3,
  188. // "path": "/permission",
  189. // "name": "Permission",
  190. // "component": "LAYOUT",
  191. // "redirect": "/permission/menu",
  192. // "meta": Map{
  193. // "icon": "SafetyCertificateOutlined",
  194. // "title": "权限管理",
  195. // "sort": 1,
  196. // },
  197. // "children": []Map{
  198. // {
  199. // "id": 3003,
  200. // "path": "menu",
  201. // "name": "permission_menu",
  202. // "component": "/permission/menu/menu",
  203. // "meta": Map{
  204. // "title": "菜单权限",
  205. // },
  206. // },
  207. // {
  208. // "id": 3001,
  209. // "path": "user",
  210. // "name": "permission_user",
  211. // "component": "/permission/user/user",
  212. // "meta": Map{
  213. // "title": "后台用户",
  214. // },
  215. // },
  216. // {
  217. // "id": 3002,
  218. // "path": "role",
  219. // "name": "permission_role",
  220. // "component": "/permission/role/role",
  221. // "meta": Map{
  222. // "title": "角色管理",
  223. // },
  224. // },
  225. // },
  226. // })
  227. // }
  228. //
  229. // // 充值管理
  230. // /*lists = append(lists, Map{
  231. // "id": 4,
  232. // "path": "/recharge",
  233. // "name": "Recharge",
  234. // "component": "LAYOUT",
  235. // "redirect": "/recharge/recharge-list",
  236. // "meta": Map{
  237. // "icon": "PayCircleOutlined",
  238. // "title": "充值订单",
  239. // "sort": 2,
  240. // },
  241. // "children": []Map{
  242. // {
  243. // "id": 4001,
  244. // "path": "recharge-list",
  245. // "name": "recharge-list",
  246. // "component": "/recharge/rechargeList/index",
  247. // "meta": Map{
  248. // "title": "订单记录",
  249. // },
  250. // },
  251. // {
  252. // "id": 4002,
  253. // "path": "recharge-dailyStatistics",
  254. // "name": "recharge-dailyStatistics",
  255. // "component": "/recharge/dailyStatistics/index",
  256. // "meta": Map{
  257. // "title": "每日统计",
  258. // },
  259. // },
  260. // {
  261. // "id": 4003,
  262. // "path": "recharge-ordersSettle",
  263. // "name": "recharge-ordersSettle",
  264. // "component": "/recharge/ordersSettle/index",
  265. // "meta": Map{
  266. // "title": "余额平账",
  267. // "keepAlive": true,
  268. // },
  269. // },
  270. // {
  271. // "id": 4004,
  272. // "path": "recharge-abnormalOrder",
  273. // "name": "recharge-abnormalOrder",
  274. // "component": "/recharge/abnormalOrder/index",
  275. // "meta": Map{
  276. // "title": "异常订单",
  277. // "keepAlive": true,
  278. // },
  279. // },
  280. // },
  281. // })*/
  282. //
  283. // // 排行榜
  284. // /*lists = append(lists, Map{
  285. // "id": 5,
  286. // "path": "/ranking",
  287. // "name": "Ranking",
  288. // "component": "LAYOUT",
  289. // "redirect": "/ranking/index",
  290. // "meta": Map{
  291. // "icon": "CellularOutline",
  292. // "title": "排行榜",
  293. // "sort": 2,
  294. // },
  295. // "children": []Map{
  296. // {
  297. // "id": 5001,
  298. // "path": "recharge-ranking",
  299. // "name": "recharge-ranking",
  300. // "component": "/ranking/recharge/index",
  301. // "meta": Map{
  302. // "title": "充值排行",
  303. // },
  304. // },
  305. // {
  306. // "id": 5002,
  307. // "path": "diamond-ranking",
  308. // "name": "diamond-ranking",
  309. // "component": "/ranking/diamond/index",
  310. // "meta": Map{
  311. // "title": "消费排行",
  312. // },
  313. // },
  314. // {
  315. // "id": 5003,
  316. // "path": "level-ranking",
  317. // "name": "level-ranking",
  318. // "component": "/ranking/level/index",
  319. // "meta": Map{
  320. // "title": "等级排行",
  321. // },
  322. // },
  323. // {
  324. // "id": 5004,
  325. // "path": "elrank-ranking",
  326. // "name": "elrank-ranking",
  327. // "component": "/ranking/elrank/index",
  328. // "meta": Map{
  329. // "title": "无尽排行",
  330. // },
  331. // },
  332. // {
  333. // "id": 5005,
  334. // "path": "duel-ranking",
  335. // "name": "duel-ranking",
  336. // "component": "/ranking/duel/index",
  337. // "meta": Map{
  338. // "title": "狭路排行",
  339. // },
  340. // },
  341. // {
  342. // "id": 5006,
  343. // "path": "gudong-ranking",
  344. // "name": "gudong-ranking",
  345. // "component": "/ranking/gudong/index",
  346. // "meta": Map{
  347. // "title": "古玩排行",
  348. // },
  349. // },
  350. // {
  351. // "id": 5007,
  352. // "path": "idiom-ranking",
  353. // "name": "idiom-ranking",
  354. // "component": "/ranking/idiom/index",
  355. // "meta": Map{
  356. // "title": "金榜题名",
  357. // },
  358. // },
  359. // {
  360. // "id": 5008,
  361. // "path": "boss-ranking",
  362. // "name": "boss-ranking",
  363. // "component": "/ranking/boss/index",
  364. // "meta": Map{
  365. // "title": "暗影突袭",
  366. // },
  367. // },
  368. // {
  369. // "id": 5009,
  370. // "path": "adv-ranking",
  371. // "name": "adv-ranking",
  372. // "component": "/ranking/adv/index",
  373. // "meta": Map{
  374. // "title": "看广告排行",
  375. // },
  376. // },
  377. // {
  378. // "id": 5010,
  379. // "path": "login-ranking",
  380. // "name": "login-ranking",
  381. // "component": "/ranking/login/index",
  382. // "meta": Map{
  383. // "title": "登录排行",
  384. // },
  385. // },
  386. // },
  387. // })*/
  388. //
  389. // // 数据统计
  390. // /*lists = append(lists, Map{
  391. // "id": 6,
  392. // "path": "/echarts",
  393. // "name": "Echarts",
  394. // "component": "LAYOUT",
  395. // "redirect": "/echarts/index",
  396. // "meta": Map{
  397. // "icon": "BarChartOutline",
  398. // "title": "数据统计",
  399. // "sort": 2,
  400. // },
  401. // "children": []Map{
  402. // {
  403. // "id": 6001,
  404. // "path": "login-echarts",
  405. // "name": "login-echarts",
  406. // "component": "/echarts/login/index",
  407. // "meta": Map{
  408. // "title": "登录数据",
  409. // },
  410. // },
  411. // {
  412. // "id": 6002,
  413. // "path": "chapter-echarts",
  414. // "name": "chapter-echarts",
  415. // "component": "/echarts/chapter/index",
  416. // "meta": Map{
  417. // "title": "关卡数据",
  418. // },
  419. // },
  420. // {
  421. // "id": 6003,
  422. // "path": "basic-echarts",
  423. // "name": "basic-echarts",
  424. // "component": "/echarts/basic/index",
  425. // "meta": Map{
  426. // "title": "基础数据",
  427. // },
  428. // },
  429. // {
  430. // "id": 6004,
  431. // "path": "adv-echarts",
  432. // "name": "adv-echarts",
  433. // "component": "/echarts/adv/index",
  434. // "meta": Map{
  435. // "title": "广告数据",
  436. // },
  437. // },
  438. // {
  439. // "id": 6005,
  440. // "path": "echarts-tests",
  441. // "name": "echarts-tests",
  442. // "component": "/echarts/adv/index2",
  443. // "meta": Map{
  444. // "hidden": localHidden,
  445. // "title": "图表测试",
  446. // },
  447. // },
  448. // {
  449. // "id": 6006,
  450. // "path": "goods-echarts",
  451. // "name": "goods-echarts",
  452. // "component": "/echarts/goods/index",
  453. // "meta": Map{
  454. // "title": "商品数据",
  455. // },
  456. // },
  457. // {
  458. // "id": 6007,
  459. // "path": "gudong-echarts",
  460. // "name": "gudong-echarts",
  461. // "component": "/echarts/gudong/index",
  462. // "meta": Map{
  463. // "title": "古玩数据",
  464. // },
  465. // },
  466. // {
  467. // "id": 6008,
  468. // "path": "duel-echarts",
  469. // "name": "duel-echarts",
  470. // "component": "/echarts/duel/index",
  471. // "meta": Map{
  472. // "title": "狭路对决",
  473. // },
  474. // },
  475. // {
  476. // "id": 6009,
  477. // "path": "expedition-echarts",
  478. // "name": "expedition-echarts",
  479. // "component": "/echarts/expedition/index",
  480. // "meta": Map{
  481. // "title": "远征数据",
  482. // },
  483. // },
  484. // {
  485. // "id": 6010,
  486. // "path": "idiom-echarts",
  487. // "name": "idiom-echarts",
  488. // "component": "/echarts/idiom/index",
  489. // "meta": Map{
  490. // "title": "金榜题名",
  491. // },
  492. // },
  493. // {
  494. // "id": 6011,
  495. // "path": "boss-echarts",
  496. // "name": "boss-echarts",
  497. // "component": "/echarts/boss/index",
  498. // "meta": Map{
  499. // "title": "暗影突袭",
  500. // },
  501. // },
  502. // {
  503. // "id": 6012,
  504. // "path": "seven-echarts",
  505. // "name": "seven-echarts",
  506. // "component": "/echarts/seven/index",
  507. // "meta": Map{
  508. // "title": "七日任务",
  509. // },
  510. // },
  511. // {
  512. // "id": 6013,
  513. // "path": "disconnect-echarts",
  514. // "name": "disconnect-echarts",
  515. // "component": "/echarts/disconnect/index",
  516. // "meta": Map{
  517. // "title": "重连数据",
  518. // },
  519. // },
  520. // {
  521. // "id": 6014,
  522. // "path": "gem-echarts",
  523. // "name": "gem-echarts",
  524. // "component": "/echarts/gem/index",
  525. // "meta": Map{
  526. // "title": "宝石数据",
  527. // },
  528. // },
  529. // {
  530. // "id": 6015,
  531. // "path": "limitgift-echarts",
  532. // "name": "limitgift-echarts",
  533. // "component": "/echarts/limitgift/index",
  534. // "meta": Map{
  535. // "title": "限时礼包",
  536. // },
  537. // },
  538. // {
  539. // "id": 6016,
  540. // "path": "treasure-echarts",
  541. // "name": "treasure-echarts",
  542. // "component": "/echarts/treasure/index",
  543. // "meta": Map{
  544. // "title": "宝物数据",
  545. // },
  546. // },
  547. // {
  548. // "id": 6017,
  549. // "path": "grandmaster-echarts",
  550. // "name": "grandmaster-echarts",
  551. // "component": "/echarts/grandmaster/index",
  552. // "meta": Map{
  553. // "title": "最强王者",
  554. // },
  555. // },
  556. // {
  557. // "id": 6018,
  558. // "path": "gradeDistribution-echarts",
  559. // "name": "gradeDistribution-echarts",
  560. // "component": "/echarts/gradeDistribution/index",
  561. // "meta": Map{
  562. // "title": "玩家等级分布",
  563. // },
  564. // },
  565. // {
  566. // "id": 6019,
  567. // "path": "roles-echarts",
  568. // "name": "roles-echarts",
  569. // "component": "/echarts/roles/index",
  570. // "meta": Map{
  571. // "title": "玩家拥有角色",
  572. // },
  573. // },
  574. // {
  575. // "id": 6020,
  576. // "path": "heroLevelDistribution-echarts",
  577. // "name": "heroLevelDistribution-echarts",
  578. // "component": "/echarts/heroLevelDistribution/index",
  579. // "meta": Map{
  580. // "title": "角色等级分布",
  581. // },
  582. // },
  583. // {
  584. // "id": 6021,
  585. // "path": "levelOutput-echarts",
  586. // "name": "levelOutput-echarts",
  587. // "component": "/echarts/levelOutput/index",
  588. // "meta": Map{
  589. // "title": "玩家等级产出",
  590. // },
  591. // },
  592. // },
  593. // })*/
  594. //
  595. // gameToolMap := make([]Map, 0)
  596. // gameToolMap = append(gameToolMap, Map{
  597. // "id": 7001,
  598. // "path": "config",
  599. // "name": "system_config",
  600. // "component": "/system/config/config",
  601. // "meta": Map{
  602. // "title": "服务配置",
  603. // },
  604. // }, Map{
  605. // "id": 7002,
  606. // "path": "deploy",
  607. // "name": "system_deploy",
  608. // "component": "/deploy/index",
  609. // "meta": Map{
  610. // "title": "服务部署",
  611. // },
  612. // })
  613. //
  614. // //// 非正式环境加载工具库
  615. // //if os.Getenv("GIN_MODE") != "release" && os.Getenv("GIN_MODE") != "" {
  616. // // gameToolMap = append(gameToolMap, Map{
  617. // // "path": "reboot",
  618. // // "name": "system_reboot",
  619. // // "component": "/system/reboot/index",
  620. // // "meta": Map{
  621. // // "title": "重启服务",
  622. // // }})
  623. // //}
  624. //
  625. // /*gameToolMap = append(gameToolMap, Map{
  626. // "path": "activity-tool",
  627. // "name": "activity-tool",
  628. // "component": "/tool/activity/index",
  629. // "meta": Map{
  630. // "title": "活动查询",
  631. // },
  632. // })*/
  633. //
  634. // // 游戏工具
  635. // lists = append(lists, Map{
  636. // "id": 7,
  637. // "path": "/tool",
  638. // "name": "Tool",
  639. // "component": "LAYOUT",
  640. // "redirect": "/tool/index",
  641. // "meta": Map{
  642. // "icon": "ToolOutlined",
  643. // "title": "游戏工具",
  644. // "sort": 5,
  645. // },
  646. // "children": gameToolMap,
  647. // })
  648. //
  649. // // 邮件通知
  650. // /*lists = append(lists, Map{
  651. // "id": 8,
  652. // "path": "/email",
  653. // "name": "email",
  654. // "component": "LAYOUT",
  655. // //"redirect": "/frame/docs",
  656. // "meta": Map{
  657. // "icon": "MailOutlined",
  658. // "sort": 10,
  659. // "isRoot": true,
  660. // "activeMenu": "email_index",
  661. // },
  662. // "children": []Map{
  663. // {
  664. // "id": 8001,
  665. // "path": "index",
  666. // "name": "email_index",
  667. // "component": "/email/index",
  668. // "meta": Map{
  669. // "title": "邮件通知",
  670. // "activeMenu": "email_index",
  671. // },
  672. // }},
  673. // })*/
  674. //
  675. // // 邮件通知
  676. // /*lists = append(lists, Map{
  677. // "id": 9,
  678. // "path": "/Mail",
  679. // "name": "mail",
  680. // "component": "LAYOUT",
  681. // //"redirect": "/frame/docs",
  682. // "meta": Map{
  683. // "icon": "MailOutlined",
  684. // "sort": 10,
  685. // "isRoot": true,
  686. // "activeMenu": "mail_index",
  687. // },
  688. // "children": []Map{
  689. // {
  690. // "id": 9001,
  691. // "path": "index",
  692. // "name": "mail_index",
  693. // "component": "/mail/index",
  694. // "meta": Map{
  695. // "title": "邮件通知(旧)",
  696. // "activeMenu": "mail_index",
  697. // },
  698. // }},
  699. // })*/
  700. //
  701. // // 广播通知
  702. // /*lists = append(lists, Map{
  703. // "id": 10,
  704. // "path": "/notice",
  705. // "name": "notice",
  706. // "component": "LAYOUT",
  707. // //"redirect": "/frame/docs",
  708. // "meta": Map{
  709. // "icon": "MegaphoneOutline",
  710. // "sort": 10,
  711. // "title": "广播管理",
  712. // //"isRoot": true,
  713. // //"activeMenu": "noticev2_index",
  714. // },
  715. // "children": []Map{
  716. // {
  717. // "id": 10001,
  718. // "path": "noticev2_index", // ?
  719. // "name": "noticev2_index",
  720. // "component": "/noticev2/index",
  721. // "meta": Map{
  722. // "title": "广播通知",
  723. // //"activeMenu": "noticev2_index",
  724. // },
  725. // },
  726. // //{
  727. // // "path": "index",
  728. // // "name": "notice_index",
  729. // // "component": "/notice/index",
  730. // // "meta": Map{
  731. // // "title": "广播通知(旧)",
  732. // // //"activeMenu": "notice_index",
  733. // // },
  734. // //},
  735. // },
  736. // })*/
  737. // // 客服记录
  738. // /*lists = append(lists, Map{
  739. // "id": 11,
  740. // "path": "/chatLog",
  741. // "name": "ChatLog",
  742. // "component": "LAYOUT",
  743. // "meta": Map{
  744. // "icon": "ChatboxEllipsesOutline",
  745. // "sort": 10,
  746. // "title": "客服记录",
  747. // "permissions": "ChatLog",
  748. // },
  749. // "children": []Map{
  750. // {
  751. // "id": 11001,
  752. // "path": "chatLog-index",
  753. // "name": "chatLog-index",
  754. // "component": "/chatLog/index",
  755. // "meta": Map{
  756. // "title": "客服记录",
  757. // },
  758. // },
  759. // },
  760. // })*/
  761. // // 兑换码
  762. // /*lists = append(lists, Map{
  763. // "id": 12,
  764. // "path": "/cdk",
  765. // "name": "cdk",
  766. // "component": "LAYOUT",
  767. // //"redirect": "/frame/docs",
  768. // "meta": Map{
  769. // "icon": "TicketOutline",
  770. // "sort": 10,
  771. // //"isRoot": true,
  772. // //"activeMenu": "cdk_index",
  773. // "title": "兑换码管理",
  774. // },
  775. // "children": []Map{
  776. // {
  777. // "id": 12001,
  778. // "path": "index",
  779. // "name": "cdk_index",
  780. // "component": "/cdk/index",
  781. // "meta": Map{
  782. // "title": "批次列表",
  783. // "activeMenu": "cdk_index",
  784. // },
  785. // },
  786. // {
  787. // "id": 12002,
  788. // "path": "cdk-redeemCodeList/:sn?",
  789. // "name": "cdk-redeemCodeList",
  790. // "component": "/cdk/redeemCodeList",
  791. // "meta": Map{
  792. // "title": "兑换码列表",
  793. // //"hidden": true,
  794. // //"activeMenu": "cdk_index",
  795. // },
  796. // },
  797. // },
  798. // })*/
  799. //
  800. // // 设置页面
  801. // lists = append(lists, Map{
  802. // "id": 13,
  803. // "path": "/setting",
  804. // "name": "Setting",
  805. // "component": "LAYOUT",
  806. // "redirect": "/setting/account",
  807. // "meta": Map{
  808. // "icon": "SettingOutlined",
  809. // "title": "账户设置",
  810. // "sort": 20,
  811. // },
  812. // "hidden": false,
  813. // "children": []Map{
  814. // {
  815. // "id": 13001,
  816. // "path": "account",
  817. // "name": "setting-account",
  818. // "component": "/setting/account/account",
  819. // "meta": Map{
  820. // "title": "个人信息",
  821. // },
  822. // },
  823. // //{
  824. // // "path": "info",
  825. // // "name": "result-info",
  826. // // "component": "/setting/system/system",
  827. // // "meta": Map{
  828. // // "title": "信息页",
  829. // // },
  830. // //},
  831. // {
  832. // "id": 13002,
  833. // "path": "log",
  834. // "name": "log-index",
  835. // "component": "/log/index",
  836. // "meta": Map{
  837. // "title": "操作日志",
  838. // },
  839. // },
  840. // {
  841. // "id": 13003,
  842. // "path": "log-view/:id?",
  843. // "name": "log-view",
  844. // "component": "/log/view",
  845. // "meta": Map{
  846. // "title": "日志详情",
  847. // "hidden": true,
  848. // "activeMenu": "log-index",
  849. // },
  850. // },
  851. // },
  852. // })
  853. // t := c.GetHeader("authorization")
  854. // // 管理后台切换
  855. // lists = append(lists, Map{
  856. // "id": 14,
  857. // "path": "/server_select",
  858. // "name": "ServerSelect",
  859. // "component": "LAYOUT",
  860. // "meta": Map{
  861. // "icon": "ServerOutline",
  862. // "title": "管理后台切换",
  863. // "sort": 5,
  864. // },
  865. // "children": []Map{
  866. // {
  867. // "id": 14001,
  868. // "path": "/redirect",
  869. // "name": "http://101.43.249.6:7004/gadmin/?access-token=%s" + t,
  870. // "component": "LAYOUT",
  871. // "meta": Map{
  872. // "title": "魔君测试服",
  873. // },
  874. // },
  875. // {
  876. // "id": 14002,
  877. // "path": "/redirect",
  878. // "name": "http://101.43.249.6:7006/cadmin/?access-token=" + t,
  879. // "component": "LAYOUT",
  880. // "meta": Map{
  881. // "title": "空之契约测试服",
  882. // },
  883. // },
  884. // {
  885. // "id": 14003,
  886. // "path": "/redirect",
  887. // "name": "http://192.168.0.186:8253/gadmin/?access-token=" + t,
  888. // "component": "LAYOUT",
  889. // "meta": Map{
  890. // "title": "魔君本地",
  891. // },
  892. // },
  893. // },
  894. // })
  895. //
  896. // // 文档
  897. // if localHidden == false {
  898. // lists = append(lists, Map{
  899. // "id": 15,
  900. // "path": "/external",
  901. // "name": "https://www.naiveui.com",
  902. // "component": "LAYOUT",
  903. // "meta": Map{
  904. // "icon": "DocumentTextOutline",
  905. // "title": "NaiveUi文档",
  906. // "sort": 99,
  907. // },
  908. // "children": []Map{},
  909. // })
  910. // }
  911. // return lists
  912. //}