menu.go 22 KB

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