admin.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. /**
  2. * 管理后台本地数据
  3. */
  4. // 系统初始化数据
  5. const initData = {
  6. error: 0,
  7. msg: '获取成功',
  8. data: {
  9. name: 'bandhuBuy',
  10. logo: '/static/img/logo.png',
  11. domainurl: 'https://mall-oss.trust-will.com',
  12. filesystem: 'aliyun',
  13. version: '1.0.0',
  14. sheep_version: 'v1.4.1',
  15. is_pro: true,
  16. },
  17. };
  18. // 登录配置数据
  19. const loginConfigData = {
  20. error: 0,
  21. msg: '获取成功',
  22. data: {
  23. background: '/storage/default/20250227/8fdd538e05f5ad15402f5a66fe595621.jpg',
  24. mode: 'none',
  25. },
  26. };
  27. // 菜单权限数据 - 二级菜单结构
  28. const menuRulesData = {
  29. error: 0,
  30. msg: '获取成功',
  31. data: {
  32. menu: [
  33. {
  34. type_text: '菜单',
  35. status_text: '显示',
  36. id: 1,
  37. parent_id: 0,
  38. name: 'shop.admin',
  39. title: '商城管理',
  40. type: 'menu',
  41. icon: '/static/img/shop/logo.png',
  42. params: '',
  43. weigh: 0,
  44. status: 'show',
  45. children: [
  46. // 首页
  47. {
  48. type_text: '菜单',
  49. status_text: '显示',
  50. id: 90,
  51. parent_id: 1,
  52. name: 'shop.admin.dashboard',
  53. title: '首页',
  54. type: 'menu',
  55. icon: 'sa-home_line',
  56. params: '',
  57. weigh: 0,
  58. status: 'show',
  59. children: [
  60. {
  61. type_text: '页面',
  62. status_text: '显示',
  63. id: 901,
  64. parent_id: 90,
  65. name: 'shop.admin.dashboard',
  66. title: '数据概览',
  67. type: 'page',
  68. icon: 'sa-home_line',
  69. params: '',
  70. weigh: 0,
  71. status: 'show',
  72. },
  73. ],
  74. },
  75. // 商品
  76. {
  77. type_text: '菜单',
  78. status_text: '显示',
  79. id: 300,
  80. parent_id: 1,
  81. name: 'shop.admin.goods',
  82. title: '商品',
  83. type: 'menu',
  84. icon: 'sa-bag_line',
  85. params: '',
  86. weigh: 0,
  87. status: 'show',
  88. children: [
  89. {
  90. type_text: '页面',
  91. status_text: '显示',
  92. id: 113,
  93. parent_id: 300,
  94. name: 'shop.admin.goods.goods',
  95. title: '商品库',
  96. type: 'page',
  97. icon: '',
  98. params: '',
  99. weigh: 0,
  100. status: 'show',
  101. },
  102. {
  103. type_text: '页面',
  104. status_text: '显示',
  105. id: 125,
  106. parent_id: 300,
  107. name: 'shop.admin.goods.category',
  108. title: '商品分类',
  109. type: 'page',
  110. icon: '',
  111. params: '',
  112. weigh: 0,
  113. status: 'show',
  114. },
  115. ],
  116. },
  117. // 订单
  118. {
  119. type_text: '菜单',
  120. status_text: '显示',
  121. id: 400,
  122. parent_id: 1,
  123. name: 'shop.admin.order',
  124. title: '订单',
  125. type: 'menu',
  126. icon: 'sa-order_line',
  127. params: '',
  128. weigh: 0,
  129. status: 'show',
  130. children: [
  131. {
  132. type_text: '页面',
  133. status_text: '显示',
  134. id: 154,
  135. parent_id: 400,
  136. name: 'shop.admin.order.list',
  137. title: '订单管理',
  138. type: 'page',
  139. icon: '',
  140. params: '',
  141. weigh: 0,
  142. status: 'show',
  143. },
  144. {
  145. type_text: '页面',
  146. status_text: '显示',
  147. id: 171,
  148. parent_id: 400,
  149. name: 'shop.admin.order.aftersale',
  150. title: '售后管理',
  151. type: 'page',
  152. icon: '',
  153. params: '',
  154. weigh: 0,
  155. status: 'show',
  156. },
  157. {
  158. type_text: '页面',
  159. status_text: '显示',
  160. id: 172,
  161. parent_id: 400,
  162. name: 'shop.admin.order.setting',
  163. title: '订单设置',
  164. type: 'page',
  165. icon: '',
  166. params: '',
  167. weigh: 0,
  168. status: 'show',
  169. },
  170. ],
  171. },
  172. // 用户
  173. {
  174. type_text: '菜单',
  175. status_text: '显示',
  176. id: 500,
  177. parent_id: 1,
  178. name: 'shop.admin.user',
  179. title: '用户',
  180. type: 'menu',
  181. icon: 'sa-user',
  182. params: '',
  183. weigh: 0,
  184. status: 'show',
  185. children: [
  186. {
  187. type_text: '页面',
  188. status_text: '显示',
  189. id: 501,
  190. parent_id: 500,
  191. name: 'shop.admin.user.list',
  192. title: '用户列表',
  193. type: 'page',
  194. icon: '',
  195. params: '',
  196. weigh: 0,
  197. status: 'show',
  198. },
  199. {
  200. type_text: '页面',
  201. status_text: '显示',
  202. id: 502,
  203. parent_id: 500,
  204. name: 'shop.admin.user.tag',
  205. title: '标签管理',
  206. type: 'page',
  207. icon: '',
  208. params: '',
  209. weigh: 0,
  210. status: 'show',
  211. },
  212. {
  213. type_text: '页面',
  214. status_text: '显示',
  215. id: 503,
  216. parent_id: 500,
  217. name: 'shop.admin.user.level',
  218. title: '会员等级',
  219. type: 'page',
  220. icon: '',
  221. params: '',
  222. weigh: 0,
  223. status: 'show',
  224. },
  225. ],
  226. },
  227. // 营销
  228. {
  229. type_text: '菜单',
  230. status_text: '显示',
  231. id: 600,
  232. parent_id: 1,
  233. name: 'shop.admin.marketing',
  234. title: '营销',
  235. type: 'menu',
  236. icon: 'sa-marketing_line',
  237. params: '',
  238. weigh: 0,
  239. status: 'show',
  240. children: [
  241. {
  242. type_text: '页面',
  243. status_text: '显示',
  244. id: 601,
  245. parent_id: 600,
  246. name: 'shop.admin.marketing.group',
  247. title: '拼团',
  248. type: 'page',
  249. icon: '',
  250. params: '',
  251. weigh: 0,
  252. status: 'show',
  253. },
  254. ],
  255. },
  256. // 内容
  257. {
  258. type_text: '菜单',
  259. status_text: '显示',
  260. id: 700,
  261. parent_id: 1,
  262. name: 'shop.admin.content',
  263. title: '内容',
  264. type: 'menu',
  265. icon: 'sa-message_line',
  266. params: '',
  267. weigh: 0,
  268. status: 'show',
  269. children: [
  270. {
  271. type_text: '页面',
  272. status_text: '显示',
  273. id: 701,
  274. parent_id: 700,
  275. name: 'shop.admin.content.notification',
  276. title: '消息推送',
  277. type: 'page',
  278. icon: '',
  279. params: '',
  280. weigh: 0,
  281. status: 'show',
  282. },
  283. {
  284. type_text: '页面',
  285. status_text: '显示',
  286. id: 702,
  287. parent_id: 700,
  288. name: 'shop.admin.content.sms',
  289. title: '短信',
  290. type: 'page',
  291. icon: '',
  292. params: '',
  293. weigh: 0,
  294. status: 'show',
  295. },
  296. {
  297. type_text: '页面',
  298. status_text: '显示',
  299. id: 703,
  300. parent_id: 700,
  301. name: 'shop.admin.content.banner',
  302. title: '广告位',
  303. type: 'page',
  304. icon: '',
  305. params: '',
  306. weigh: 0,
  307. status: 'show',
  308. },
  309. ],
  310. },
  311. // 数据
  312. {
  313. type_text: '菜单',
  314. status_text: '显示',
  315. id: 800,
  316. parent_id: 1,
  317. name: 'shop.admin.data',
  318. title: '数据',
  319. type: 'menu',
  320. icon: 'sa-graph_line',
  321. params: '',
  322. weigh: 0,
  323. status: 'show',
  324. children: [
  325. {
  326. type_text: '页面',
  327. status_text: '显示',
  328. id: 801,
  329. parent_id: 800,
  330. name: 'shop.admin.data.report',
  331. title: '数据报表',
  332. type: 'page',
  333. icon: '',
  334. params: '',
  335. weigh: 0,
  336. status: 'show',
  337. },
  338. ],
  339. },
  340. // 财务
  341. {
  342. type_text: '菜单',
  343. status_text: '显示',
  344. id: 900,
  345. parent_id: 1,
  346. name: 'shop.admin.finance',
  347. title: '财务',
  348. type: 'menu',
  349. icon: 'sa-cny_line',
  350. params: '',
  351. weigh: 0,
  352. status: 'show',
  353. children: [
  354. {
  355. type_text: '页面',
  356. status_text: '显示',
  357. id: 901,
  358. parent_id: 900,
  359. name: 'shop.admin.finance.recharge',
  360. title: '充值',
  361. type: 'page',
  362. icon: '',
  363. params: '',
  364. weigh: 0,
  365. status: 'show',
  366. },
  367. {
  368. type_text: '页面',
  369. status_text: '显示',
  370. id: 902,
  371. parent_id: 900,
  372. name: 'shop.admin.finance.withdraw',
  373. title: '提款',
  374. type: 'page',
  375. icon: '',
  376. params: '',
  377. weigh: 0,
  378. status: 'show',
  379. },
  380. {
  381. type_text: '页面',
  382. status_text: '显示',
  383. id: 903,
  384. parent_id: 900,
  385. name: 'shop.admin.finance.commission',
  386. title: '佣金',
  387. type: 'page',
  388. icon: '',
  389. params: '',
  390. weigh: 0,
  391. status: 'show',
  392. },
  393. ],
  394. },
  395. // 设置
  396. {
  397. type_text: '菜单',
  398. status_text: '显示',
  399. id: 1000,
  400. parent_id: 1,
  401. name: 'admin.config',
  402. title: '设置',
  403. type: 'menu',
  404. icon: 'sa-config',
  405. params: '',
  406. weigh: 0,
  407. status: 'show',
  408. children: [
  409. {
  410. type_text: '页面',
  411. status_text: '显示',
  412. id: 1001,
  413. parent_id: 1000,
  414. name: 'admin.auth.role',
  415. title: '角色管理',
  416. type: 'page',
  417. icon: 'sa-auth-role',
  418. params: '',
  419. weigh: 0,
  420. status: 'show',
  421. },
  422. {
  423. type_text: '页面',
  424. status_text: '显示',
  425. id: 1002,
  426. parent_id: 1000,
  427. name: 'admin.auth.admin',
  428. title: '人员管理',
  429. type: 'page',
  430. params: '',
  431. weigh: 0,
  432. status: 'show',
  433. },
  434. ],
  435. },
  436. ],
  437. },
  438. ],
  439. permission: ['*'],
  440. },
  441. };
  442. export default {
  443. /**
  444. * 系统初始化接口
  445. */
  446. init: () => initData,
  447. /**
  448. * 登录配置接口
  449. */
  450. loginConfig: () => loginConfigData,
  451. /**
  452. * 菜单权限接口
  453. */
  454. account: {
  455. rules: () => menuRulesData,
  456. },
  457. };