userInfo.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940
  1. import Mock from 'mockjs';
  2. // import { getUrlParams } from './utils';
  3. let token = {
  4. expire: 9999999,
  5. token:
  6. 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlSWRzIjpbIjEiXSwidXNlcklkIjoiMSIsInBhc3N3b3JkVmVyc2lvbiI6MSwiaWF0IjoxNTczOTc4MzYyLCJleHAiOjE1NzQ1ODMxNjJ9.UOfPFd5cbWaRcaCri4TU2aFZ8_t8KVJzfBFBciDYLdQ'
  7. };
  8. let userList = [
  9. {
  10. id: '21',
  11. name: '测试部门权限2',
  12. password: 'e10adc3949ba59abbe56e057f20f883e',
  13. passwordV: 1,
  14. nickName: '权限2昵称',
  15. headImg: null,
  16. email: null,
  17. remark: null,
  18. status: 1,
  19. createTime: '2019-11-20 15:48:31',
  20. updateTime: '2019-11-20 15:48:31',
  21. username: 'testdp2',
  22. phone: null,
  23. departmentId: '1',
  24. roleName: '只有部门2小组2',
  25. departmentName: 'COOL-ADMIN'
  26. },
  27. {
  28. id: '20',
  29. name: '测试部门权限',
  30. password: 'e10adc3949ba59abbe56e057f20f883e',
  31. passwordV: 1,
  32. nickName: '测试部门权限昵称',
  33. headImg: null,
  34. email: null,
  35. remark: null,
  36. status: 1,
  37. createTime: '2019-11-20 15:39:28',
  38. updateTime: '2019-11-20 15:39:28',
  39. username: 'testdep',
  40. phone: null,
  41. departmentId: '1',
  42. roleName: '只有部门1',
  43. departmentName: 'COOL-ADMIN'
  44. },
  45. {
  46. id: '19',
  47. name: '33',
  48. password: 'e10adc3949ba59abbe56e057f20f883e',
  49. passwordV: 1,
  50. nickName: '333',
  51. headImg: null,
  52. email: null,
  53. remark: null,
  54. status: 1,
  55. createTime: '2019-11-19 00:02:27',
  56. updateTime: '2019-11-19 00:02:27',
  57. username: '333',
  58. phone: null,
  59. departmentId: '17',
  60. roleName: '只有部门1',
  61. departmentName: '小组1'
  62. },
  63. {
  64. id: '18',
  65. name: '阿打算',
  66. password: 'e10adc3949ba59abbe56e057f20f883e',
  67. passwordV: 1,
  68. nickName: '12312',
  69. headImg: null,
  70. email: null,
  71. remark: null,
  72. status: 1,
  73. createTime: '2019-11-18 18:20:04',
  74. updateTime: '2019-11-18 18:20:04',
  75. username: '3123',
  76. phone: null,
  77. departmentId: '13',
  78. roleName: 'testRole',
  79. departmentName: '部门1'
  80. },
  81. {
  82. id: '17',
  83. name: '阿',
  84. password: 'e10adc3949ba59abbe56e057f20f883e',
  85. passwordV: 1,
  86. nickName: '123',
  87. headImg: null,
  88. email: null,
  89. remark: null,
  90. status: 1,
  91. createTime: '2019-11-18 18:07:57',
  92. updateTime: '2019-11-18 18:07:57',
  93. username: '123',
  94. phone: null,
  95. departmentId: '16',
  96. roleName: '超管',
  97. departmentName: '小组2'
  98. },
  99. {
  100. id: '16',
  101. name: 'test',
  102. password: 'e10adc3949ba59abbe56e057f20f883e',
  103. passwordV: 1,
  104. nickName: null,
  105. headImg: null,
  106. email: null,
  107. remark: null,
  108. status: 1,
  109. createTime: '2019-11-11 10:37:43',
  110. updateTime: '2019-11-11 11:17:25',
  111. username: '测试',
  112. phone: null,
  113. departmentId: '14',
  114. roleName: '测试,testRole,超管',
  115. departmentName: '小组1'
  116. }
  117. ];
  118. let userInfo = {
  119. createTime: '2019-06-25 10:20:20',
  120. email: '123456@qq.com',
  121. headImg: 'https://pic.qqtn.com/up/2019-11/2019110209212070747.jpg',
  122. id: '1',
  123. name: '超级管理员',
  124. nickName: '超管',
  125. passwordV: 1,
  126. phone: '18000000000',
  127. remark: '备注',
  128. roleIdList: ['1'],
  129. status: 1,
  130. updateTime: '2019-11-12 09:40:27',
  131. username: 'admin'
  132. };
  133. let menu = {
  134. perms: [
  135. 'sys:menu:add',
  136. 'sys:menu:delete',
  137. 'sys:menu:update',
  138. 'sys:menu:page',
  139. 'sys:menu:list',
  140. 'sys:menu:info',
  141. 'sys:user:add',
  142. 'sys:user:delete',
  143. 'sys:user:update',
  144. 'sys:user:page',
  145. 'sys:user:list',
  146. 'sys:user:info',
  147. 'sys:role:add',
  148. 'sys:role:delete',
  149. 'sys:role:update',
  150. 'sys:role:page',
  151. 'sys:role:list',
  152. 'sys:role:info',
  153. '1',
  154. 'sys:log:page',
  155. 'sys:log:clear'
  156. ],
  157. menus: [
  158. // {
  159. // id: '48',
  160. // parentId: '47',
  161. // name: '文档',
  162. // type: 1,
  163. // icon: 'icon-favorfill',
  164. // orderNum: 0,
  165. // router: '/tutorial/doc',
  166. // viewPath: 'https://docs.cool-admin.com/#/',
  167. // keepAlive: 1
  168. // },
  169. // 工作台
  170. {
  171. id: '1',
  172. parentId: null,
  173. name: '工作台',
  174. type: 1,
  175. icon: 'icongongzuotai',
  176. orderNum: 1,
  177. router: '/',
  178. viewPath: 'views/home.vue',
  179. keepAlive: 1
  180. },
  181. {
  182. id: '101',
  183. parentId: 1,
  184. name: '今日概况',
  185. type: 1,
  186. icon: 'icongongzuotai',
  187. orderNum: 1,
  188. router: '/console/index',
  189. viewPath: 'views/home.vue',
  190. keepAlive: 1
  191. },
  192. // 客户管理
  193. {
  194. id: '2',
  195. parentId: null,
  196. name: '客户管理',
  197. type: 1,
  198. icon: 'iconkehuguanli',
  199. orderNum: 2,
  200. router: '/member/list',
  201. viewPath: 'views/member/list.vue',
  202. keepAlive: 1
  203. },
  204. // 客户管理
  205. {
  206. id: '201',
  207. parentId: 2,
  208. name: '客户列表',
  209. type: 1,
  210. icon: 'iconkehuguanli',
  211. orderNum: 2,
  212. router: '/member/list',
  213. viewPath: 'views/member/list.vue',
  214. keepAlive: 1
  215. },
  216. // 订单管理
  217. {
  218. id: '3',
  219. parentId: null,
  220. name: '订单管理',
  221. type: 1,
  222. icon: 'icondingdanguanli',
  223. orderNum: 3,
  224. router: '/order/list',
  225. viewPath: 'views/order/list.vue',
  226. keepAlive: 1
  227. },
  228. // 订单列表
  229. {
  230. id: '301',
  231. parentId: 3,
  232. name: '订单列表',
  233. type: 1,
  234. icon: 'icondingdanguanli',
  235. orderNum: 3,
  236. router: '/order/list',
  237. viewPath: 'views/order/list.vue',
  238. keepAlive: 1
  239. },
  240. // 商品管理
  241. {
  242. id: '4',
  243. parentId: null,
  244. name: '商品管理',
  245. type: 0,
  246. icon: 'iconshangpinguanli',
  247. orderNum: 4,
  248. router: '/goods/list',
  249. viewPath: 'views/goods/goods-list.vue',
  250. keepAlive: 1
  251. },
  252. {
  253. id: '401',
  254. parentId: '4',
  255. name: '商品列表',
  256. type: 1,
  257. icon: 'icon-user',
  258. orderNum: 4,
  259. router: '/goods/list',
  260. viewPath: 'views/goods/goods-list.vue',
  261. keepAlive: 1
  262. },
  263. // {
  264. // id: '402',
  265. // parentId: '4',
  266. // name: '图库管理',
  267. // type: 1,
  268. // icon: 'icon-user',
  269. // orderNum: 1,
  270. // router: '/goods/img-store',
  271. // viewPath: 'views/goods/img-store.vue',
  272. // keepAlive: 1
  273. // },
  274. {
  275. id: '403',
  276. parentId: '4',
  277. name: '添加商品',
  278. type: 1,
  279. icon: 'icon-user',
  280. orderNum: 4,
  281. router: '/goods/add',
  282. viewPath: 'views/goods/goods-add.vue',
  283. keepAlive: 0
  284. },
  285. {
  286. id: '404',
  287. parentId: '4',
  288. name: '分类管理',
  289. type: 1,
  290. icon: 'icon-user',
  291. orderNum: 4,
  292. router: '/goods/category',
  293. viewPath: 'views/goods/category.vue',
  294. keepAlive: 1
  295. },
  296. {
  297. id: '405',
  298. parentId: '4',
  299. name: '运费设置',
  300. type: 1,
  301. icon: 'icon-user',
  302. orderNum: 4,
  303. router: '/goods/freight',
  304. viewPath: 'views/goods/freight-set.vue',
  305. keepAlive: 1
  306. },
  307. {
  308. id: '406',
  309. parentId: '4',
  310. name: '自动涨价',
  311. type: 1,
  312. icon: 'icon-user',
  313. orderNum: 4,
  314. router: '/goods/auto-price',
  315. viewPath: 'views/goods/auto-price.vue',
  316. keepAlive: 1
  317. },
  318. {
  319. id: '406',
  320. parentId: '4',
  321. name: '通用简介',
  322. type: 1,
  323. icon: 'icon-user',
  324. orderNum: 4,
  325. router: '/goods/summary',
  326. viewPath: 'views/goods/summary.vue',
  327. keepAlive: 1
  328. },
  329. {
  330. id: '5',
  331. parentId: null,
  332. name: '图库列表',
  333. type: 1,
  334. icon: 'iconkehuguanli',
  335. orderNum: 5,
  336. router: '/goods/img-store',
  337. viewPath: 'views/goods/img-store.vue',
  338. keepAlive: 1
  339. },
  340. {
  341. id: '501',
  342. parentId: 5,
  343. name: '列表',
  344. type: 1,
  345. icon: 'iconkehuguanli',
  346. orderNum: 5,
  347. router: '/goods/img-store',
  348. viewPath: 'views/goods/img-store.vue',
  349. keepAlive: 1
  350. },
  351. // 邀请有礼
  352. {
  353. id: '6',
  354. parentId: null,
  355. name: '老带新',
  356. type: 0,
  357. icon: 'iconyaoqingyouli',
  358. orderNum: 6,
  359. router: '/invite/list',
  360. viewPath: 'views/invite/list.vue',
  361. keepAlive: 1
  362. },
  363. {
  364. id: '601',
  365. parentId: '6',
  366. name: '邀请列表',
  367. type: 1,
  368. icon: 'iconkehuguanli',
  369. orderNum: 6,
  370. router: '/invite/list',
  371. viewPath: 'views/invite/list.vue',
  372. keepAlive: 1
  373. },
  374. {
  375. id: '602',
  376. parentId: '6',
  377. name: '邀请奖励',
  378. type: 1,
  379. icon: 'iconkehuguanli',
  380. orderNum: 6,
  381. router: '/invite/reward-set',
  382. viewPath: 'views/invite/reward-set.vue',
  383. keepAlive: 1
  384. },
  385. // 优惠券
  386. {
  387. id: '7',
  388. parentId: null,
  389. name: '优惠券',
  390. type: 1,
  391. icon: 'iconyouhuiquan',
  392. orderNum: 7,
  393. router: '/coupon/list',
  394. viewPath: 'views/coupon/list.vue',
  395. keepAlive: 1
  396. },
  397. // 优惠券
  398. {
  399. id: '701',
  400. parentId: 7,
  401. name: '列表',
  402. type: 1,
  403. icon: 'iconyouhuiquan',
  404. orderNum: 7,
  405. router: '/coupon/list',
  406. viewPath: 'views/coupon/list.vue',
  407. keepAlive: 1
  408. },
  409. // 促销
  410. // {
  411. // id: '7',
  412. // parentId: null,
  413. // name: '促销',
  414. // type: 0,
  415. // icon: 'iconkehuguanli',
  416. // orderNum: 2,
  417. // router: '/goods/list',
  418. // viewPath: 'views/goods/goods-list.vue',
  419. // keepAlive: 1
  420. // },
  421. // 广告管理
  422. {
  423. id: '8',
  424. parentId: null,
  425. name: '广告管理',
  426. type: 1,
  427. icon: 'iconguanggao',
  428. orderNum: 8,
  429. router: '/ad/list',
  430. viewPath: 'views/ad/list.vue',
  431. keepAlive: 1
  432. },
  433. {
  434. id: '808',
  435. parentId: '8',
  436. name: '广告列表',
  437. type: 1,
  438. icon: 'iconguanggao',
  439. orderNum: 8,
  440. router: '/ad/list',
  441. viewPath: 'views/ad/list.vue',
  442. keepAlive: 1
  443. },
  444. // 员工管理
  445. {
  446. id: '9',
  447. parentId: null,
  448. name: '员工管理',
  449. type: 0,
  450. icon: 'iconyuangongguanli',
  451. orderNum: 9,
  452. router: '/staff/list',
  453. viewPath: 'views/staff/list.vue',
  454. keepAlive: 1
  455. },
  456. {
  457. id: '902',
  458. parentId: '9',
  459. name: '员工列表',
  460. type: 1,
  461. icon: 'iconkehuguanli',
  462. orderNum: 9,
  463. router: '/staff/list',
  464. viewPath: 'views/staff/list.vue',
  465. keepAlive: 1
  466. },
  467. {
  468. id: '903',
  469. parentId: '9',
  470. name: '角色列表',
  471. type: 1,
  472. icon: 'iconkehuguanli',
  473. orderNum: 9,
  474. router: '/role/list',
  475. viewPath: 'views/staff/role-list.vue',
  476. keepAlive: 1
  477. },
  478. {
  479. id: '904',
  480. parentId: '9',
  481. name: '操作记录',
  482. type: 1,
  483. icon: 'iconkehuguanli',
  484. orderNum: 9,
  485. router: '/operate/list',
  486. viewPath: 'views/staff/operate.vue',
  487. keepAlive: 1
  488. },
  489. // 门店管理
  490. {
  491. id: '10',
  492. parentId: null,
  493. name: '门店管理',
  494. type: 1,
  495. icon: 'iconguanggao',
  496. orderNum: 10,
  497. router: '/shop/list',
  498. viewPath: 'views/shop/list.vue',
  499. keepAlive: 1
  500. },
  501. // 门店管理
  502. {
  503. id: '1001',
  504. parentId: 10,
  505. name: '门店列表',
  506. type: 1,
  507. icon: 'iconguanggao',
  508. orderNum: 10,
  509. router: '/shop/list',
  510. viewPath: 'views/shop/list.vue',
  511. keepAlive: 1
  512. },
  513. {
  514. id: '11',
  515. parentId: null,
  516. name: '开店邀请',
  517. type: 1,
  518. icon: 'iconyaoqingyouli',
  519. orderNum: 11,
  520. router: '/pages/admin/my-invite',
  521. viewPath: 'views/my-invite/index.vue',
  522. keepAlive: 1
  523. },
  524. {
  525. id: '1101',
  526. parentId: 11,
  527. name: '邀请列表',
  528. type: 1,
  529. icon: 'iconyaoqingyouli',
  530. orderNum: 11,
  531. router: '/pages/admin/my-invite',
  532. viewPath: 'views/my-invite/index.vue',
  533. keepAlive: 1
  534. },
  535. // 设置
  536. {
  537. id: '12',
  538. parentId: null,
  539. name: '设置',
  540. type: 0,
  541. icon: 'iconshezhi',
  542. orderNum: 12,
  543. router: '/goods/list',
  544. viewPath: 'views/goods/goods-list.vue',
  545. keepAlive: 1
  546. },
  547. {
  548. id: '1201',
  549. parentId: '12',
  550. name: '微信菜单',
  551. type: 1,
  552. icon: 'iconkehuguanli',
  553. orderNum: 12,
  554. router: '/setting/wx-menu',
  555. viewPath: 'views/setting/wx-menu.vue',
  556. keepAlive: 1
  557. },
  558. {
  559. id: '1202',
  560. parentId: '12',
  561. name: '新人优惠券',
  562. type: 1,
  563. icon: 'iconkehuguanli',
  564. orderNum: 12,
  565. router: '/setting/coupon',
  566. viewPath: 'views/setting/coupon.vue',
  567. keepAlive: 1
  568. },
  569. {
  570. id: '1203',
  571. parentId: '12',
  572. name: '会员等级',
  573. type: 1,
  574. icon: 'iconkehuguanli',
  575. orderNum: 12,
  576. router: '/setting/level',
  577. viewPath: 'views/setting/level.vue',
  578. keepAlive: 1
  579. },
  580. // {
  581. // id: '12',
  582. // parentId: null,
  583. // name: '收入明细',
  584. // type: 1,
  585. // icon: 'iconkehuguanli',
  586. // orderNum: 12,
  587. // router: '/admin/assets/list',
  588. // viewPath: 'views/assets/list.vue',
  589. // keepAlive: 1
  590. // },
  591. // ========================================================
  592. {
  593. id: '13',
  594. parentId: '8',
  595. name: '新增',
  596. type: 2,
  597. icon: null,
  598. orderNum: 1,
  599. router: null,
  600. viewPath: null,
  601. keepAlive: 0
  602. },
  603. {
  604. id: '17',
  605. parentId: '27',
  606. name: '用户列表',
  607. type: 1,
  608. icon: 'icon-user',
  609. orderNum: 1,
  610. router: '/sys/user',
  611. viewPath: 'views/system/user/index.vue',
  612. keepAlive: 1
  613. },
  614. {
  615. id: '18',
  616. parentId: '17',
  617. name: '新增',
  618. type: 2,
  619. icon: null,
  620. orderNum: 1,
  621. router: null,
  622. viewPath: null,
  623. keepAlive: 0
  624. },
  625. {
  626. id: '23',
  627. parentId: '22',
  628. name: '新增',
  629. type: 2,
  630. icon: null,
  631. orderNum: 1,
  632. router: null,
  633. viewPath: null,
  634. keepAlive: 0
  635. },
  636. // {
  637. // id: '27',
  638. // parentId: null,
  639. // name: '权限管理',
  640. // type: 0,
  641. // icon: 'icon-permission',
  642. // orderNum: 1,
  643. // router: null,
  644. // viewPath: null,
  645. // keepAlive: 0
  646. // },
  647. {
  648. id: '29',
  649. parentId: '28',
  650. name: '日志列表',
  651. type: 1,
  652. icon: 'icon-log',
  653. orderNum: 1,
  654. router: '/sys/log',
  655. viewPath: 'views/system/log/index.vue',
  656. keepAlive: 0
  657. },
  658. {
  659. id: '30',
  660. parentId: '29',
  661. name: '权限',
  662. type: 2,
  663. icon: null,
  664. orderNum: 1,
  665. router: null,
  666. viewPath: null,
  667. keepAlive: 0
  668. },
  669. // {
  670. // id: '38',
  671. // parentId: '8',
  672. // name: '11111',
  673. // type: 0,
  674. // icon: null,
  675. // orderNum: 1,
  676. // router: null,
  677. // viewPath: null,
  678. // keepAlive: 1
  679. // },
  680. {
  681. id: '43',
  682. parentId: '45',
  683. name: 'crud 示例',
  684. type: 1,
  685. icon: 'icon-radioboxfill',
  686. orderNum: 1,
  687. router: '/crud',
  688. viewPath: 'views/test/crud.vue',
  689. keepAlive: 1
  690. },
  691. // {
  692. // id: '53',
  693. // parentId: '1',
  694. // name: '组件预览',
  695. // type: 1,
  696. // icon: 'icon-activityfill',
  697. // orderNum: 1,
  698. // router: '/ui-components',
  699. // viewPath: 'views/workbench/ui-components',
  700. // keepAlive: 1
  701. // },
  702. // {
  703. // id: '11',
  704. // parentId: null,
  705. // name: '系统',
  706. // type: 0,
  707. // icon: 'icon-systemfill',
  708. // orderNum: 2,
  709. // router: '/sys',
  710. // viewPath: null,
  711. // keepAlive: 1
  712. // },
  713. // {
  714. // id: '8',
  715. // parentId: '27',
  716. // name: '菜单列表',
  717. // type: 1,
  718. // icon: 'icon-menu',
  719. // orderNum: 2,
  720. // router: '/sys/menu',
  721. // viewPath: 'views/system/menu/index.vue',
  722. // keepAlive: 1
  723. // },
  724. // {
  725. // id: '11',
  726. // parentId: '8',
  727. // name: '删除',
  728. // type: 2,
  729. // icon: null,
  730. // orderNum: 2,
  731. // router: null,
  732. // viewPath: null,
  733. // keepAlive: 0
  734. // },
  735. // {
  736. // id: '19',
  737. // parentId: '17',
  738. // name: '删除',
  739. // type: 2,
  740. // icon: null,
  741. // orderNum: 2,
  742. // router: null,
  743. // viewPath: null,
  744. // keepAlive: 0
  745. // },
  746. // {
  747. // id: '24',
  748. // parentId: '22',
  749. // name: '删除',
  750. // type: 2,
  751. // icon: null,
  752. // orderNum: 2,
  753. // router: null,
  754. // viewPath: null,
  755. // keepAlive: 0
  756. // },
  757. // {
  758. // id: '28',
  759. // parentId: '11',
  760. // name: '系统监控',
  761. // type: 0,
  762. // icon: 'icon-monitor',
  763. // orderNum: 2,
  764. // router: null,
  765. // viewPath: null,
  766. // keepAlive: 0
  767. // },
  768. // {
  769. // id: '45',
  770. // parentId: '1',
  771. // name: '组件库',
  772. // type: 0,
  773. // icon: 'icon-activityfill',
  774. // orderNum: 2,
  775. // router: '/ui-lib',
  776. // viewPath: null,
  777. // keepAlive: 1
  778. // },
  779. // {
  780. // id: '46',
  781. // parentId: '45',
  782. // name: 'Froala富文本',
  783. // type: 1,
  784. // icon: 'icon-radioboxfill',
  785. // orderNum: 2,
  786. // router: '/editor-froala',
  787. // viewPath: 'views/test/editor-froala.vue',
  788. // keepAlive: 1
  789. // },
  790. {
  791. id: '12',
  792. parentId: '8',
  793. name: '修改',
  794. type: 2,
  795. icon: null,
  796. orderNum: 3,
  797. router: null,
  798. viewPath: null,
  799. keepAlive: 0
  800. },
  801. {
  802. id: '20',
  803. parentId: '17',
  804. name: '修改',
  805. type: 2,
  806. icon: null,
  807. orderNum: 3,
  808. router: null,
  809. viewPath: null,
  810. keepAlive: 0
  811. },
  812. {
  813. id: '22',
  814. parentId: '27',
  815. name: '角色列表',
  816. type: 1,
  817. icon: 'icon-role',
  818. orderNum: 3,
  819. router: '/sys/role',
  820. viewPath: 'views/system/role/index.vue',
  821. keepAlive: 1
  822. },
  823. {
  824. id: '25',
  825. parentId: '22',
  826. name: '修改',
  827. type: 2,
  828. icon: null,
  829. orderNum: 3,
  830. router: null,
  831. viewPath: null,
  832. keepAlive: 0
  833. },
  834. // {
  835. // id: '47',
  836. // parentId: null,
  837. // name: '教程',
  838. // type: 0,
  839. // icon: 'icon-weibiaoti4',
  840. // orderNum: 3,
  841. // router: '/tutorial',
  842. // viewPath: null,
  843. // keepAlive: 1
  844. // },
  845. {
  846. id: '49',
  847. parentId: '45',
  848. name: 'Quill富文本',
  849. type: 1,
  850. icon: 'icon-radioboxfill',
  851. orderNum: 3,
  852. router: '/editor-quill',
  853. viewPath: 'views/test/editor-quill.vue',
  854. keepAlive: 1
  855. },
  856. {
  857. id: '13',
  858. parentId: '8',
  859. name: '查询',
  860. type: 2,
  861. icon: null,
  862. orderNum: 4,
  863. router: null,
  864. viewPath: null,
  865. keepAlive: 0
  866. },
  867. {
  868. id: '21',
  869. parentId: '17',
  870. name: '查询',
  871. type: 2,
  872. icon: null,
  873. orderNum: 4,
  874. router: null,
  875. viewPath: null,
  876. keepAlive: 0
  877. },
  878. {
  879. id: '26',
  880. parentId: '22',
  881. name: '查询',
  882. type: 2,
  883. icon: null,
  884. orderNum: 4,
  885. router: null,
  886. viewPath: null,
  887. keepAlive: 0
  888. }
  889. // {
  890. // id: '51',
  891. // parentId: '10',
  892. // name: '测试404页面',
  893. // type: 1,
  894. // icon: 'icon-newfill',
  895. // orderNum: 10,
  896. // router: '/test',
  897. // viewPath: null,
  898. // keepAlive: 1
  899. // }
  900. ]
  901. };
  902. // Mock.mock(RegExp('/comm/person' + '.*'), 'get', req => {
  903. // // console.table(req);
  904. // return {
  905. // code: 1,
  906. // data: userInfo,
  907. // message: 'success'
  908. // };
  909. // });
  910. Mock.mock(RegExp('/comm/permmenu' + '.*'), 'get', req => {
  911. // console.table(req);
  912. return {
  913. code: 1,
  914. data: menu,
  915. message: 'success'
  916. };
  917. });
  918. Mock.mock(RegExp('/sys/user/list' + '.*'), 'get', req => {
  919. // console.table(req);
  920. return {
  921. code: 1,
  922. data: {
  923. list: userList,
  924. pagination: {
  925. page: 1,
  926. size: 20,
  927. total: 6
  928. }
  929. },
  930. message: 'success'
  931. };
  932. });