lalala 6 лет назад
Родитель
Сommit
ed781db032
2 измененных файлов с 382 добавлено и 0 удалено
  1. 381 0
      admin-code/src/mock/userInfo-w.js
  2. 1 0
      admin-code/src/pages/layout/slider/index.vue

+ 381 - 0
admin-code/src/mock/userInfo-w.js

@@ -0,0 +1,381 @@
+import Mock from 'mockjs';
+// import { getUrlParams } from './utils';
+
+let token = {
+	expire: 9999999,
+	token:
+		'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlSWRzIjpbIjEiXSwidXNlcklkIjoiMSIsInBhc3N3b3JkVmVyc2lvbiI6MSwiaWF0IjoxNTczOTc4MzYyLCJleHAiOjE1NzQ1ODMxNjJ9.UOfPFd5cbWaRcaCri4TU2aFZ8_t8KVJzfBFBciDYLdQ'
+};
+
+let userList = [
+	{
+		id: '21',
+		name: '测试部门权限2',
+		password: 'e10adc3949ba59abbe56e057f20f883e',
+		passwordV: 1,
+		nickName: '权限2昵称',
+		headImg: null,
+		email: null,
+		remark: null,
+		status: 1,
+		createTime: '2019-11-20 15:48:31',
+		updateTime: '2019-11-20 15:48:31',
+		username: 'testdp2',
+		phone: null,
+		departmentId: '1',
+		roleName: '只有部门2小组2',
+		departmentName: 'COOL-ADMIN'
+	},
+	{
+		id: '20',
+		name: '测试部门权限',
+		password: 'e10adc3949ba59abbe56e057f20f883e',
+		passwordV: 1,
+		nickName: '测试部门权限昵称',
+		headImg: null,
+		email: null,
+		remark: null,
+		status: 1,
+		createTime: '2019-11-20 15:39:28',
+		updateTime: '2019-11-20 15:39:28',
+		username: 'testdep',
+		phone: null,
+		departmentId: '1',
+		roleName: '只有部门1',
+		departmentName: 'COOL-ADMIN'
+	},
+	{
+		id: '19',
+		name: '33',
+		password: 'e10adc3949ba59abbe56e057f20f883e',
+		passwordV: 1,
+		nickName: '333',
+		headImg: null,
+		email: null,
+		remark: null,
+		status: 1,
+		createTime: '2019-11-19 00:02:27',
+		updateTime: '2019-11-19 00:02:27',
+		username: '333',
+		phone: null,
+		departmentId: '17',
+		roleName: '只有部门1',
+		departmentName: '小组1'
+	},
+	{
+		id: '18',
+		name: '阿打算',
+		password: 'e10adc3949ba59abbe56e057f20f883e',
+		passwordV: 1,
+		nickName: '12312',
+		headImg: null,
+		email: null,
+		remark: null,
+		status: 1,
+		createTime: '2019-11-18 18:20:04',
+		updateTime: '2019-11-18 18:20:04',
+		username: '3123',
+		phone: null,
+		departmentId: '13',
+		roleName: 'testRole',
+		departmentName: '部门1'
+	},
+	{
+		id: '17',
+		name: '阿',
+		password: 'e10adc3949ba59abbe56e057f20f883e',
+		passwordV: 1,
+		nickName: '123',
+		headImg: null,
+		email: null,
+		remark: null,
+		status: 1,
+		createTime: '2019-11-18 18:07:57',
+		updateTime: '2019-11-18 18:07:57',
+		username: '123',
+		phone: null,
+		departmentId: '16',
+		roleName: '超管',
+		departmentName: '小组2'
+	},
+	{
+		id: '16',
+		name: 'test',
+		password: 'e10adc3949ba59abbe56e057f20f883e',
+		passwordV: 1,
+		nickName: null,
+		headImg: null,
+		email: null,
+		remark: null,
+		status: 1,
+		createTime: '2019-11-11 10:37:43',
+		updateTime: '2019-11-11 11:17:25',
+		username: '测试',
+		phone: null,
+		departmentId: '14',
+		roleName: '测试,testRole,超管',
+		departmentName: '小组1'
+	}
+];
+
+let userInfo = {
+	createTime: '2019-06-25 10:20:20',
+	email: '123456@qq.com',
+	headImg: 'https://pic.qqtn.com/up/2019-11/2019110209212070747.jpg',
+	id: '1',
+	name: '超级管理员',
+	nickName: '超管',
+	passwordV: 1,
+	phone: '18000000000',
+	remark: '备注',
+	roleIdList: ['1'],
+	status: 1,
+	updateTime: '2019-11-12 09:40:27',
+	username: 'admin'
+};
+
+let menu = {
+	perms: [
+		'sys:menu:add',
+		'sys:menu:delete',
+		'sys:menu:update',
+		'sys:menu:page',
+		'sys:menu:list',
+		'sys:menu:info',
+		'sys:user:add',
+		'sys:user:delete',
+		'sys:user:update',
+		'sys:user:page',
+		'sys:user:list',
+		'sys:user:info',
+		'sys:role:add',
+		'sys:role:delete',
+		'sys:role:update',
+		'sys:role:page',
+		'sys:role:list',
+		'sys:role:info',
+		'1',
+		'sys:log:page',
+		'sys:log:clear'
+	],
+	menus: [
+		// {
+		// 	id: '48',
+		// 	parentId: '47',
+		// 	name: '文档',
+		// 	type: 1,
+		// 	icon: 'icon-favorfill',
+		// 	orderNum: 0,
+		// 	router: '/tutorial/doc',
+		// 	viewPath: 'https://docs.cool-admin.com/#/',
+		// 	keepAlive: 1
+		// },
+		// 工作台
+		// {
+		// 	id: '1',
+		// 	parentId: null,
+		// 	name: '工作台',
+		// 	type: 0,
+		// 	icon: 'icongongzuotai',
+		// 	orderNum: 1,
+		// 	router: '/',
+		// 	viewPath: null,
+		// 	keepAlive: 1
+		// },
+		// 商家管理
+		{
+			id: '1',
+			parentId: null,
+			name: '商家管理',
+			type: 0,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/shop-list',
+			viewPath: null,
+			keepAlive: 1
+		},
+		{
+			id: '11',
+			parentId: '1',
+			name: '商家列表',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/merchant/merchant-list',
+			viewPath: 'sass/shop/list',
+			keepAlive: 1
+		},
+		{
+			id: '12',
+			parentId: '1',
+			name: '申请记录',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/merchant/apply-list',
+			viewPath: 'sass/shop/apply',
+			keepAlive: 1
+		},
+		{
+			id: '13',
+			parentId: '1',
+			name: '小程序升级',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/merchant/upgrade',
+			viewPath: 'sass/shop/upgrade',
+			keepAlive: 1
+		},
+		{
+			id: '14',
+			parentId: '1',
+			name: '门店',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/merchant/shop-list',
+			viewPath: 'sass/shop/shop',
+			keepAlive: 1
+		},
+		{
+			id: '14',
+			parentId: '1',
+			name: '购买记录',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/merchant/buy-list',
+			viewPath: 'sass/shop/buy',
+			keepAlive: 1
+		},
+		// 订单管理
+		{
+			id: '2',
+			parentId: null,
+			name: '订单管理',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/order/list',
+			viewPath: 'sass/order/list',
+			keepAlive: 1
+		},
+		// 商家客户
+		{
+			id: '3',
+			parentId: null,
+			name: '客户列表',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/member/list',
+			viewPath: 'sass/member/list',
+			keepAlive: 1
+		},
+		// 花卉宝商家客户
+		{
+			id: '4',
+			parentId: null,
+			name: '花卉宝客户',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/pt-member/list',
+			viewPath: 'sass/pt-member/list',
+			keepAlive: 1
+		},
+		// 商家商品
+		{
+			id: '5',
+			parentId: null,
+			name: '商品列表',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/goods/list',
+			viewPath: 'sass/goods/list',
+			keepAlive: 1
+		},
+		// 节日管理
+		{
+			id: '6',
+			parentId: null,
+			name: '节日列表',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/fest/list',
+			viewPath: 'sass/fest/list',
+			keepAlive: 1
+		},
+		// 套餐管理
+		{
+			id: '7',
+			parentId: null,
+			name: '套餐管理',
+			type: 0,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/manage/list',
+			viewPath: 'sass/manage/list',
+			keepAlive: 1
+		},
+		{
+			id: '701',
+			parentId: '7',
+			name: '套餐列表',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/manage/package',
+			viewPath: 'sass/manage/package',
+			keepAlive: 1
+		},
+		{
+			id: '701',
+			parentId: '7',
+			name: '权限管理',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/sass/manage/auth',
+			viewPath: 'sass/manage/auth',
+			keepAlive: 1
+		}
+	]
+};
+
+// Mock.mock(RegExp('/auth/login' + '.*'), 'get', req => {
+// 	// console.table(req);
+// 	return {
+// 		code: 1,
+// 		data: userInfo,
+// 		message: 'success'
+// 	};
+// });
+
+Mock.mock(RegExp('/comm/permmenu' + '.*'), 'get', req => {
+	// console.table(req);
+	return {
+		code: 1,
+		data: menu,
+		message: 'success'
+	};
+});
+
+Mock.mock(RegExp('/sys/user/list' + '.*'), 'get', req => {
+	// console.table(req);
+	return {
+		code: 1,
+		data: {
+			list: userList,
+			pagination: {
+				page: 1,
+				size: 20,
+				total: 6
+			}
+		},
+		message: 'success'
+	};
+});

+ 1 - 0
admin-code/src/pages/layout/slider/index.vue

@@ -139,6 +139,7 @@ export default {
 			padding-left: 10px;
 			padding-left: 10px;
 			font-size: 14px;
 			font-size: 14px;
 			color: $fontColor2;
 			color: $fontColor2;
+			cursor: pointer;
 			&.active {
 			&.active {
 				color: $mainColor;
 				color: $mainColor;
 				background-color: #f0f2f6;
 				background-color: #f0f2f6;