shish 6 лет назад
Родитель
Сommit
87f1fa2edc
3 измененных файлов с 673 добавлено и 112 удалено
  1. 1 1
      huadian/src/config/config.js
  2. 7 5
      huadian/src/config/env.js
  3. 665 106
      huadian/src/mock/userInfo.js

+ 1 - 1
huadian/src/config/config.js

@@ -1,5 +1,5 @@
 import Vue from 'vue';
 // 项目配置--由bat脚本变更
-export const ProjectName = 'sass';
+export const ProjectName = 'business';
 
 Vue.prototype.$projectName = ProjectName;

+ 7 - 5
huadian/src/config/env.js

@@ -1,6 +1,8 @@
 import store from 'store';
 import { getUrlParam, getFirstHost } from '@/cool/utils';
 
+const env = process.env;
+
 // 路由模式
 const routerMode = 'hash';
 
@@ -8,7 +10,7 @@ const routerMode = 'hash';
 const imgHostUrl = `${window.location.protocol}//img.${getFirstHost()}.com`;
 
 // 请求地址
-const baseUrl = (function() {
+const baseUrl = (() => {
 	let proxy = getUrlParam('proxy');
 	console.log('proxy', proxy);
 
@@ -18,12 +20,12 @@ const baseUrl = (function() {
 		proxy = store.get('proxy') || 'dev';
 	}
 
-	switch (process.env.NODE_ENV) {
+	switch (env.NODE_ENV) {
 		case 'development':
 			return `/${proxy}`;
 		case 'production':
-			// return `http://api.s.huaml.com`;
-			return `${window.location.protocol}//api.s.${getFirstHost()}.com`;
+			// return `http://api.b.huaml.com`;
+			return `${window.location.protocol}//api.b.${getFirstHost()}.com`;
 		default:
 			return '';
 	}
@@ -32,4 +34,4 @@ const baseUrl = (function() {
 // 阿里字体图标库 https://at.alicdn.com/t/**.css
 const iconfontUrl = ``;
 
-export { routerMode, baseUrl, iconfontUrl, imgHostUrl };
+export { env, routerMode, baseUrl, iconfontUrl, imgHostUrl };

+ 665 - 106
huadian/src/mock/userInfo.js

@@ -171,182 +171,741 @@ let menu = {
 		// 	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,
+			name: '工作台',
+			type: 1,
 			icon: 'icongongzuotai',
 			orderNum: 1,
-			router: '/sass/shop-list',
-			viewPath: null,
+			router: '/',
+			viewPath: 'views/home.vue',
 			keepAlive: 1
 		},
+        {
+            id: '101',
+            parentId: 1,
+            name: '今日概况',
+            type: 1,
+            icon: 'icongongzuotai',
+            orderNum: 1,
+            router: '/console/index',
+            viewPath: 'views/home.vue',
+            keepAlive: 1
+        },
+		// 客户管理
 		{
-			id: '11',
-			parentId: '1',
-			name: '商家列表',
+			id: '2',
+			parentId: null,
+			name: '客户',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/',
-			viewPath: 'sass/shop/list',
+			icon: 'iconkehuguanli',
+			orderNum: 2,
+			router: '/member/list',
+			viewPath: 'views/member/list.vue',
 			keepAlive: 1
 		},
+        // 客户管理
+        {
+            id: '201',
+            parentId: 2,
+            name: '客户列表',
+            type: 1,
+            icon: 'iconkehuguanli',
+            orderNum: 2,
+            router: '/member/list',
+            viewPath: 'views/member/list.vue',
+            keepAlive: 1
+        },
+		// 订单管理
 		{
-			id: '12',
-			parentId: '1',
-			name: '开店申请',
+			id: '3',
+			parentId: null,
+			name: '订单',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/sass/merchant/apply-list',
-			viewPath: 'sass/shop/apply',
+			icon: 'icondingdanguanli',
+			orderNum: 3,
+			router: '/order/list',
+			viewPath: 'views/order/list.vue',
 			keepAlive: 1
 		},
+        // 订单列表
+        {
+            id: '301',
+            parentId: 3,
+            name: '订单列表',
+            type: 1,
+            icon: 'icondingdanguanli',
+            orderNum: 3,
+            router: '/order/list',
+            viewPath: 'views/order/list.vue',
+            keepAlive: 1
+        },
+		// 商品管理
 		{
-			id: '13',
-			parentId: '1',
-			name: '小程序',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/sass/merchant/upgrade',
-			viewPath: 'sass/shop/upgrade',
+			id: '4',
+			parentId: null,
+			name: '商品',
+			type: 0,
+			icon: 'iconshangpinguanli',
+			orderNum: 4,
+			router: '/goods/list',
+			viewPath: 'views/goods/goods-list.vue',
 			keepAlive: 1
 		},
 		{
-			id: '14',
-			parentId: '1',
-			name: '门店管理',
+			id: '401',
+			parentId: '4',
+			name: '商品列表',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/sass/merchant/shop-list',
-			viewPath: 'sass/shop/shop',
+			icon: 'icon-user',
+			orderNum: 4,
+			router: '/goods/list',
+			viewPath: 'views/goods/goods-list.vue',
 			keepAlive: 1
 		},
+		// {
+		// 	id: '402',
+		// 	parentId: '4',
+		// 	name: '图库管理',
+		// 	type: 1,
+		// 	icon: 'icon-user',
+		// 	orderNum: 1,
+		// 	router: '/goods/img-store',
+		// 	viewPath: 'views/goods/img-store.vue',
+		// 	keepAlive: 1
+		// },
 		{
-			id: '14',
-			parentId: '1',
-			name: '付费订单',
+			id: '403',
+			parentId: '4',
+			name: '添加商品',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/sass/merchant/buy-list',
-			viewPath: 'sass/shop/buy',
+			icon: 'icon-user',
+			orderNum: 4,
+			router: '/goods/add',
+			viewPath: 'views/goods/goods-add.vue',
+			keepAlive: 0
+		},
+		{
+			id: '404',
+			parentId: '4',
+			name: '分类管理',
+			type: 1,
+			icon: 'icon-user',
+			orderNum: 4,
+			router: '/goods/category',
+			viewPath: 'views/goods/category.vue',
 			keepAlive: 1
 		},
-		// 订单管理
 		{
-			id: '2',
-			parentId: null,
-			name: '商家订单',
+			id: '405',
+			parentId: '4',
+			name: '运费设置',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 2,
-			router: '/sass/order/list',
-			viewPath: 'sass/order/list',
+			icon: 'icon-user',
+			orderNum: 4,
+			router: '/goods/freight',
+			viewPath: 'views/goods/freight-set.vue',
 			keepAlive: 1
 		},
-		// 商家客户
 		{
-			id: '3',
-			parentId: null,
-			name: '商家客户',
+			id: '406',
+			parentId: '4',
+			name: '自动涨价',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 3,
-			router: '/sass/member/list',
-			viewPath: 'sass/member/list',
+			icon: 'icon-user',
+			orderNum: 4,
+			router: '/goods/auto-price',
+			viewPath: 'views/goods/auto-price.vue',
 			keepAlive: 1
 		},
-		// 平台客户
 		{
-			id: '4',
-			parentId: null,
-			name: '店长管理',
+			id: '406',
+			parentId: '4',
+			name: '通用简介',
 			type: 1,
-			icon: 'icongongzuotai',
+			icon: 'icon-user',
 			orderNum: 4,
-			router: '/sass/pt-member/list',
-			viewPath: 'sass/pt-member/list',
+			router: '/goods/summary',
+			viewPath: 'views/goods/summary.vue',
 			keepAlive: 1
 		},
-		// 商家商品
 		{
 			id: '5',
 			parentId: null,
-			name: '商品管理',
+			name: '图库',
 			type: 1,
-			icon: 'icongongzuotai',
+			icon: 'iconkehuguanli',
 			orderNum: 5,
-			router: '/sass/goods/list',
-			viewPath: 'sass/goods/list',
+			router: '/goods/img-store',
+			viewPath: 'views/goods/img-store.vue',
 			keepAlive: 1
 		},
-		// 节日管理
+        {
+            id: '501',
+            parentId: 5,
+            name: '列表',
+            type: 1,
+            icon: 'iconkehuguanli',
+            orderNum: 5,
+            router: '/goods/img-store',
+            viewPath: 'views/goods/img-store.vue',
+            keepAlive: 1
+        },
+		// 邀请有礼
 		{
 			id: '6',
 			parentId: null,
-			name: '节日管理',
+			name: '老带新',
+			type: 0,
+			icon: 'iconyaoqingyouli',
+			orderNum: 6,
+			router: '/invite/list',
+			viewPath: 'views/invite/list.vue',
+			keepAlive: 1
+		},
+		{
+			id: '601',
+			parentId: '6',
+			name: '邀请列表',
 			type: 1,
-			icon: 'icongongzuotai',
+			icon: 'iconkehuguanli',
 			orderNum: 6,
-			router: '/sass/fest/list',
-			viewPath: 'sass/fest/list',
+			router: '/invite/list',
+			viewPath: 'views/invite/list.vue',
 			keepAlive: 1
 		},
-		// 套餐管理
+		{
+			id: '602',
+			parentId: '6',
+			name: '邀请奖励',
+			type: 1,
+			icon: 'iconkehuguanli',
+			orderNum: 6,
+			router: '/invite/reward-set',
+			viewPath: 'views/invite/reward-set.vue',
+			keepAlive: 1
+		},
+		// 优惠券
 		{
 			id: '7',
 			parentId: null,
-			name: '套餐管理',
-			type: 0,
-			icon: 'icongongzuotai',
+			name: '优惠券',
+			type: 1,
+			icon: 'iconyouhuiquan',
 			orderNum: 7,
-			router: '/sass/manage/list',
-			viewPath: 'sass/manage/list',
+			router: '/coupon/list',
+			viewPath: 'views/coupon/list.vue',
 			keepAlive: 1
 		},
+        // 优惠券
+        {
+            id: '701',
+            parentId: 7,
+            name: '列表',
+            type: 1,
+            icon: 'iconyouhuiquan',
+            orderNum: 7,
+            router: '/coupon/list',
+            viewPath: 'views/coupon/list.vue',
+            keepAlive: 1
+        },
+		// 促销
+		// {
+		// 	id: '7',
+		// 	parentId: null,
+		// 	name: '促销',
+		// 	type: 0,
+		// 	icon: 'iconkehuguanli',
+		// 	orderNum: 2,
+		// 	router: '/goods/list',
+		// 	viewPath: 'views/goods/goods-list.vue',
+		// 	keepAlive: 1
+		// },
+		// 广告管理
 		{
-			id: '701',
-			parentId: '7',
-			name: '套餐列表',
+			id: '8',
+			parentId: null,
+			name: '广告',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 7,
-			router: '/sass/manage/package',
-			viewPath: 'sass/manage/package',
+			icon: 'iconguanggao',
+			orderNum: 8,
+			router: '/ad/list',
+			viewPath: 'views/ad/list.vue',
+			keepAlive: 1
+		},
+
+        {
+            id: '808',
+            parentId: '8',
+            name: '广告列表',
+            type: 1,
+            icon: 'iconguanggao',
+            orderNum: 8,
+            router: '/ad/list',
+            viewPath: 'views/ad/list.vue',
+            keepAlive: 1
+        },
+		// 员工管理
+		{
+			id: '9',
+			parentId: null,
+			name: '员工',
+			type: 0,
+			icon: 'iconyuangongguanli',
+			orderNum: 9,
+			router: '/staff/list',
+			viewPath: 'views/staff/list.vue',
 			keepAlive: 1
 		},
 		{
-			id: '701',
-			parentId: '7',
-			name: '权限管理',
+			id: '902',
+			parentId: '9',
+			name: '员工列表',
 			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 7,
-			router: '/sass/manage/auth',
-			viewPath: 'sass/manage/auth',
+			icon: 'iconkehuguanli',
+			orderNum: 9,
+			router: '/staff/list',
+			viewPath: 'views/staff/list.vue',
+			keepAlive: 1
+		},
+		{
+			id: '903',
+			parentId: '9',
+			name: '角色列表',
+			type: 1,
+			icon: 'iconkehuguanli',
+			orderNum: 9,
+			router: '/role/list',
+			viewPath: 'views/staff/role-list.vue',
 			keepAlive: 1
+		},
+		{
+			id: '904',
+			parentId: '9',
+			name: '操作记录',
+			type: 1,
+			icon: 'iconkehuguanli',
+			orderNum: 9,
+			router: '/operate/list',
+			viewPath: 'views/staff/operate.vue',
+			keepAlive: 1
+		},
+		// 门店管理
+		{
+			id: '10',
+			parentId: null,
+			name: '门店',
+			type: 1,
+			icon: 'iconguanggao',
+			orderNum: 10,
+			router: '/shop/list',
+			viewPath: 'views/shop/list.vue',
+			keepAlive: 1
+		},
+        // 门店管理
+        {
+            id: '1001',
+            parentId: 10,
+            name: '门店列表',
+            type: 1,
+            icon: 'iconguanggao',
+            orderNum: 10,
+            router: '/shop/list',
+            viewPath: 'views/shop/list.vue',
+            keepAlive: 1
+        },
+		{
+			id: '11',
+			parentId: null,
+			name: '培训',
+			type: 1,
+			icon: 'iconyaoqingyouli',
+			orderNum: 11,
+			router: '/pages/admin/my-invite',
+			viewPath: 'views/my-invite/index.vue',
+			keepAlive: 1
+		},
+        {
+            id: '1101',
+            parentId: 11,
+            name: '邀请开店',
+            type: 1,
+            icon: 'iconyaoqingyouli',
+            orderNum: 11,
+            router: '/pages/admin/my-invite',
+            viewPath: 'views/my-invite/index.vue',
+            keepAlive: 1
+        },
+		// 设置
+		{
+			id: '12',
+			parentId: null,
+			name: '设置',
+			type: 0,
+			icon: 'iconshezhi',
+			orderNum: 12,
+			router: '/goods/list',
+			viewPath: 'views/goods/goods-list.vue',
+			keepAlive: 1
+		},
+		{
+			id: '1201',
+			parentId: '12',
+			name: '公众号菜单',
+			type: 1,
+			icon: 'iconkehuguanli',
+			orderNum: 12,
+			router: '/setting/wx-menu',
+			viewPath: 'views/setting/wx-menu.vue',
+			keepAlive: 1
+		},
+		{
+			id: '1202',
+			parentId: '12',
+			name: '新人优惠券',
+			type: 1,
+			icon: 'iconkehuguanli',
+			orderNum: 12,
+			router: '/setting/coupon',
+			viewPath: 'views/setting/coupon.vue',
+			keepAlive: 1
+		},
+		{
+			id: '1203',
+			parentId: '12',
+			name: '会员等级',
+			type: 1,
+			icon: 'iconkehuguanli',
+			orderNum: 12,
+			router: '/setting/level',
+			viewPath: 'views/setting/level.vue',
+			keepAlive: 1
+		},
+		// {
+		// 	id: '12',
+		// 	parentId: null,
+		// 	name: '收入明细',
+		// 	type: 1,
+		// 	icon: 'iconkehuguanli',
+		// 	orderNum: 12,
+		// 	router: '/admin/assets/list',
+		// 	viewPath: 'views/assets/list.vue',
+		// 	keepAlive: 1
+		// },
+		// ========================================================
+		{
+			id: '13',
+			parentId: '8',
+			name: '新增',
+			type: 2,
+			icon: null,
+			orderNum: 1,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		{
+			id: '17',
+			parentId: '27',
+			name: '用户列表',
+			type: 1,
+			icon: 'icon-user',
+			orderNum: 1,
+			router: '/sys/user',
+			viewPath: 'views/system/user/index.vue',
+			keepAlive: 1
+		},
+		{
+			id: '18',
+			parentId: '17',
+			name: '新增',
+			type: 2,
+			icon: null,
+			orderNum: 1,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		{
+			id: '23',
+			parentId: '22',
+			name: '新增',
+			type: 2,
+			icon: null,
+			orderNum: 1,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		// {
+		// 	id: '27',
+		// 	parentId: null,
+		// 	name: '权限管理',
+		// 	type: 0,
+		// 	icon: 'icon-permission',
+		// 	orderNum: 1,
+		// 	router: null,
+		// 	viewPath: null,
+		// 	keepAlive: 0
+		// },
+		{
+			id: '29',
+			parentId: '28',
+			name: '日志列表',
+			type: 1,
+			icon: 'icon-log',
+			orderNum: 1,
+			router: '/sys/log',
+			viewPath: 'views/system/log/index.vue',
+			keepAlive: 0
+		},
+		{
+			id: '30',
+			parentId: '29',
+			name: '权限',
+			type: 2,
+			icon: null,
+			orderNum: 1,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		// {
+		// 	id: '38',
+		// 	parentId: '8',
+		// 	name: '11111',
+		// 	type: 0,
+		// 	icon: null,
+		// 	orderNum: 1,
+		// 	router: null,
+		// 	viewPath: null,
+		// 	keepAlive: 1
+		// },
+		{
+			id: '43',
+			parentId: '45',
+			name: 'crud 示例',
+			type: 1,
+			icon: 'icon-radioboxfill',
+			orderNum: 1,
+			router: '/crud',
+			viewPath: 'views/test/crud.vue',
+			keepAlive: 1
+		},
+		// {
+		// 	id: '53',
+		// 	parentId: '1',
+		// 	name: '组件预览',
+		// 	type: 1,
+		// 	icon: 'icon-activityfill',
+		// 	orderNum: 1,
+		// 	router: '/ui-components',
+		// 	viewPath: 'views/workbench/ui-components',
+		// 	keepAlive: 1
+		// },
+		// {
+		// 	id: '11',
+		// 	parentId: null,
+		// 	name: '系统',
+		// 	type: 0,
+		// 	icon: 'icon-systemfill',
+		// 	orderNum: 2,
+		// 	router: '/sys',
+		// 	viewPath: null,
+		// 	keepAlive: 1
+		// },
+		// {
+		// 	id: '8',
+		// 	parentId: '27',
+		// 	name: '菜单列表',
+		// 	type: 1,
+		// 	icon: 'icon-menu',
+		// 	orderNum: 2,
+		// 	router: '/sys/menu',
+		// 	viewPath: 'views/system/menu/index.vue',
+		// 	keepAlive: 1
+		// },
+		// {
+		// 	id: '11',
+		// 	parentId: '8',
+		// 	name: '删除',
+		// 	type: 2,
+		// 	icon: null,
+		// 	orderNum: 2,
+		// 	router: null,
+		// 	viewPath: null,
+		// 	keepAlive: 0
+		// },
+		// {
+		// 	id: '19',
+		// 	parentId: '17',
+		// 	name: '删除',
+		// 	type: 2,
+		// 	icon: null,
+		// 	orderNum: 2,
+		// 	router: null,
+		// 	viewPath: null,
+		// 	keepAlive: 0
+		// },
+		// {
+		// 	id: '24',
+		// 	parentId: '22',
+		// 	name: '删除',
+		// 	type: 2,
+		// 	icon: null,
+		// 	orderNum: 2,
+		// 	router: null,
+		// 	viewPath: null,
+		// 	keepAlive: 0
+		// },
+		// {
+		// 	id: '28',
+		// 	parentId: '11',
+		// 	name: '系统监控',
+		// 	type: 0,
+		// 	icon: 'icon-monitor',
+		// 	orderNum: 2,
+		// 	router: null,
+		// 	viewPath: null,
+		// 	keepAlive: 0
+		// },
+		// {
+		// 	id: '45',
+		// 	parentId: '1',
+		// 	name: '组件库',
+		// 	type: 0,
+		// 	icon: 'icon-activityfill',
+		// 	orderNum: 2,
+		// 	router: '/ui-lib',
+		// 	viewPath: null,
+		// 	keepAlive: 1
+		// },
+		// {
+		// 	id: '46',
+		// 	parentId: '45',
+		// 	name: 'Froala富文本',
+		// 	type: 1,
+		// 	icon: 'icon-radioboxfill',
+		// 	orderNum: 2,
+		// 	router: '/editor-froala',
+		// 	viewPath: 'views/test/editor-froala.vue',
+		// 	keepAlive: 1
+		// },
+		{
+			id: '12',
+			parentId: '8',
+			name: '修改',
+			type: 2,
+			icon: null,
+			orderNum: 3,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		{
+			id: '20',
+			parentId: '17',
+			name: '修改',
+			type: 2,
+			icon: null,
+			orderNum: 3,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		{
+			id: '22',
+			parentId: '27',
+			name: '角色列表',
+			type: 1,
+			icon: 'icon-role',
+			orderNum: 3,
+			router: '/sys/role',
+			viewPath: 'views/system/role/index.vue',
+			keepAlive: 1
+		},
+		{
+			id: '25',
+			parentId: '22',
+			name: '修改',
+			type: 2,
+			icon: null,
+			orderNum: 3,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		// {
+		// 	id: '47',
+		// 	parentId: null,
+		// 	name: '教程',
+		// 	type: 0,
+		// 	icon: 'icon-weibiaoti4',
+		// 	orderNum: 3,
+		// 	router: '/tutorial',
+		// 	viewPath: null,
+		// 	keepAlive: 1
+		// },
+		{
+			id: '49',
+			parentId: '45',
+			name: 'Quill富文本',
+			type: 1,
+			icon: 'icon-radioboxfill',
+			orderNum: 3,
+			router: '/editor-quill',
+			viewPath: 'views/test/editor-quill.vue',
+			keepAlive: 1
+		},
+		{
+			id: '13',
+			parentId: '8',
+			name: '查询',
+			type: 2,
+			icon: null,
+			orderNum: 4,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		{
+			id: '21',
+			parentId: '17',
+			name: '查询',
+			type: 2,
+			icon: null,
+			orderNum: 4,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
+		},
+		{
+			id: '26',
+			parentId: '22',
+			name: '查询',
+			type: 2,
+			icon: null,
+			orderNum: 4,
+			router: null,
+			viewPath: null,
+			keepAlive: 0
 		}
+		// {
+		// 	id: '51',
+		// 	parentId: '10',
+		// 	name: '测试404页面',
+		// 	type: 1,
+		// 	icon: 'icon-newfill',
+		// 	orderNum: 10,
+		// 	router: '/test',
+		// 	viewPath: null,
+		// 	keepAlive: 1
+		// }
 	]
 };
 
-// Mock.mock(RegExp('/auth/login' + '.*'), 'get', req => {
+// Mock.mock(RegExp('/comm/person' + '.*'), 'get', req => {
 // 	// console.table(req);
 // 	return {
 // 		code: 1,