menu.go 22 KB

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