jufubao-admin-library 1.1.34 → 1.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,230 @@
1
+ 'use strict';
2
+
3
+ const settings = {
4
+
5
+ /**
6
+ * @description 阿里云前端监控配置
7
+ */
8
+ aliPid: 'aa2vphu6tr@f7f6bac23dcef56',
9
+ aliEnvironment: 'daily', //daily测试环境 //prod线上环境
10
+ aliSample: 1, //1表示100%采样,10表示10%采样,100表示1%采样
11
+ aliPvSample: 1, //1表示100%采样,10表示10%采样,100表示1%采样
12
+ aliDisableHook: true, //是否禁用api上报 true=禁用 false=开启
13
+ aliBehavior: true, //是否为了便于排查错误而记录报错的用户行为。
14
+ aliEnableSPA: false, //是否启动单页面上报pv日志
15
+ aliEnableConsole: false, //是否劫持Console
16
+ aliSendResource: true, //静态资源错误上报
17
+ aliAutoSendPerf: true, //性能和api分析日志
18
+
19
+ /**
20
+ * @type {string}
21
+ * @description routerMode值 hash,history
22
+ */
23
+ routerMode: 'history',
24
+
25
+ /**
26
+ * @type {string}
27
+ * @description 项目名称
28
+ */
29
+ title: '工会福利系统(测试)',
30
+
31
+ /**
32
+ * @type {boolean}
33
+ * @description 无返回结构体{code: 200, data: {}, message:'success'},返回格式:{}
34
+ */
35
+ isOpenNoResultKey: true,
36
+
37
+ /**
38
+ * @type {string}
39
+ * @description 项目标识
40
+ */
41
+ system: 'saas-admin',
42
+
43
+ /**
44
+ * @type {string}
45
+ * @description 图片cdn域名地址
46
+ */
47
+ cdnBaseUrl: '//sandbox-img.jufubao.cn',
48
+
49
+ /**
50
+ * @type {Array}
51
+ * @description API白名单(不需要token,上报日志)
52
+ */
53
+ apiWhiteList: [
54
+ '/api/pb/host/get-brand',
55
+ '/api/pb/host/minfo',
56
+ '/api/pb/host/malert',
57
+ ],
58
+
59
+ /**
60
+ * @type {Number}
61
+ * @description 接口返回时间超时上报日志(单位:毫秒)
62
+ */
63
+ apiDelay: 10000,
64
+
65
+ /**
66
+ * @type {string}
67
+ * @description 百度AK
68
+ */
69
+ baiduAK: 'btKt57MWjMx2P1ds2OjZIttLOOjR2Ndf',
70
+
71
+ /**
72
+ * @type Function
73
+ * @description 页面layout页面路径
74
+ */
75
+ layout: () => import('@/layout'),
76
+
77
+
78
+ /**
79
+ * @type {boolean}
80
+ * @description 是否启用本地演示路由配置
81
+ */
82
+ isOpenLocalDemoRouter: false,
83
+
84
+ /**
85
+ * @type { Array }
86
+ * @description 不验证登录状态
87
+ */
88
+ whiteList:[
89
+ '/login'
90
+ ],
91
+
92
+ /**
93
+ * @description 用户登录页面
94
+ * @type {String}
95
+ */
96
+ login: '/login',
97
+
98
+ /**
99
+ * @type {String}
100
+ * @description 入口页面
101
+ */
102
+ index: '/',
103
+
104
+ /**
105
+ * @type {String}
106
+ * @description 跳转到登录地址
107
+ */
108
+ superAdminLogin: '/login',
109
+
110
+ /**
111
+ * @type {String}
112
+ * @description 后台请求base域名
113
+ */
114
+ apiBaseUrl: '//sandbox-fuli-admin.jufubao.cn',
115
+
116
+ /**
117
+ * @type {String}
118
+ * @description 后台管理API地址
119
+ */
120
+ getBrandHostBaseUrl: 'http://sandbox-c.jufubao.cn',
121
+
122
+ /**
123
+ * @type {string}
124
+ * @description 开发环境api baseurl地址 (开发环境生效)
125
+ */
126
+ //getBrandHost: 'sandbox-gonghui-admin.jufubao.cn',
127
+ getBrandHost: 'sandbox-c.jufubao.cn',
128
+
129
+
130
+ /**
131
+ * @type {String} 聚福宝储存token名字
132
+ * @description cookie token key
133
+ */
134
+ jufubaoTokenKey: 'jufubao-company-token',
135
+
136
+
137
+ /**
138
+ * @type {String} 当前后台系统tokenKey
139
+ * @description cookie token key
140
+ */
141
+ currentToken: 'jufubao-company-token',
142
+
143
+
144
+ /**
145
+ * @type {string}
146
+ * @description 系统版本
147
+ */
148
+ version: 'v1.0.0',
149
+
150
+ /**
151
+ * @type {boolean}
152
+ * @description 是否关闭eslint语法检测
153
+ */
154
+ isCloseEslint: false,
155
+
156
+ /***
157
+ * @description 请求列表返回数据条数
158
+ * @type { number }
159
+ */
160
+ limit: 10,
161
+
162
+
163
+ /**
164
+ * @type {boolean} true | false
165
+ * @description 是否开启方法执行逻辑定位位置显示
166
+ */
167
+ isTimeLog: false,
168
+
169
+
170
+ /**
171
+ * @type {boolean} true | false
172
+ * @description 开发环境与生产环境
173
+ */
174
+ isDebug: false,
175
+
176
+ /**
177
+ * @type {boolean} true | false
178
+ * @description 是否加载模拟数据
179
+ */
180
+ isTestData: false,
181
+
182
+ /**
183
+ * @type {number}
184
+ * @description 开发环境端口号
185
+ */
186
+ port: 8099,
187
+
188
+ /**
189
+ * @type {boolean} true | false
190
+ * @description Whether show the settings right-panel
191
+ */
192
+ showSettings: false,
193
+
194
+ /**
195
+ * @type {boolean} true | false
196
+ * @description Whether need tagsView
197
+ */
198
+ tagsView: true,
199
+
200
+ /**
201
+ * @type {boolean} true | false
202
+ * @description Whether fix the header
203
+ */
204
+ fixedHeader: false,
205
+
206
+ /**
207
+ * @type {boolean} true | false
208
+ * @description Whether show the logo in sidebar
209
+ */
210
+ sidebarLogo: true,
211
+
212
+ /**
213
+ * @type {boolean} true | false
214
+ * @description 启动营销中心导航
215
+ */
216
+ showTopNavMenu: false,
217
+
218
+ /**
219
+ * @type {string | array} 'production' | ['production', 'development']
220
+ * @description Need show err logs component.
221
+ * The default is only used in the production env
222
+ * If you want to also use it in dev, you can pass ['production', 'development']
223
+ */
224
+ errorLog: 'production',
225
+
226
+ };
227
+
228
+ module.exports = settings;
229
+
230
+
@@ -2,23 +2,27 @@ import Layout from '@/layout'
2
2
 
3
3
  import {setModuleName} from "@/utils/xd.base";
4
4
  import roles from '@/constant/permissions';
5
- //const enterprise_buy = roles.enterprise_buy
5
+ const greetingCard = roles.greetingCard
6
6
 
7
7
 
8
8
  const greetingCardRouter = {
9
9
  path: '/greeting_card',
10
10
  component: Layout,
11
- sort: 80,
11
+ sort: 90,
12
12
  name: '贺卡管理',
13
- alwaysShow: true,
13
+ alwaysShow: false,
14
+ // #ifdef saas-admin
15
+ hidden: true,
16
+ // #endif
14
17
  redirect: '/greeting_card/list',
15
18
  meta: {
16
19
  title: '贺卡管理',
17
20
  icon: 'el-icon-collection',
18
21
  iconSize: 20,
19
- //roles: []
22
+ roles: [greetingCard.getGreetingCardList]
20
23
  },
21
24
  children: [
25
+ // #ifdef admin
22
26
  {
23
27
  path: 'list',
24
28
  name: 'GreetingCardList',
@@ -26,9 +30,10 @@ const greetingCardRouter = {
26
30
  meta: {
27
31
  title: '贺卡管理',
28
32
  icon: 'el-icon-document',
29
- //roles: []
33
+ roles: [greetingCard.getGreetingCardList]
30
34
  }
31
35
  },
36
+ // #endif
32
37
  {
33
38
  path: 'config/:material_id?/:group_id?',
34
39
  name: 'GreetingCardConfig',
@@ -37,8 +42,13 @@ const greetingCardRouter = {
37
42
  meta: {
38
43
  title: '贺卡配置',
39
44
  icon: 'el-icon-s-platform',
40
- // roles: [],
41
- activeMenu: "/greeting_card/list"
45
+ roles: [greetingCard.setGreetingCardBaseConfig],
46
+ // #ifdef admin
47
+ activeMenu: "/greeting_card/list",
48
+ // #endif
49
+ // #ifdef saas-admin
50
+ activeMenu: '/cards/list'
51
+ // #endif
42
52
  }
43
53
  }
44
54
  ]
@@ -8,7 +8,6 @@ module.exports = {
8
8
  {
9
9
  title: '贺卡管理 - 组列表',
10
10
  mapFn: "getGreetingCardGroupList",
11
- isPublic: true,
12
11
  path: '/saas-admin/v1/bless_material_group/options',
13
12
  isRule: false,
14
13
  data: {},
@@ -18,7 +17,6 @@ module.exports = {
18
17
  {
19
18
  title: '贺卡管理 - 创建',
20
19
  mapFn: "AddGreetingCardGroup",
21
- isPublic: true,
22
20
  path: '/saas-admin/v1/bless_material_group',
23
21
  isRule: false,
24
22
  data: {
@@ -30,7 +28,6 @@ module.exports = {
30
28
  {
31
29
  title: '贺卡管理 - 删除',
32
30
  mapFn: "delGreetingCardGroup",
33
- isPublic: true,
34
31
  path: '/saas-admin/v1/bless_material_group/:group_id',
35
32
  isRule: false,
36
33
  data: {
@@ -43,7 +40,6 @@ module.exports = {
43
40
  {
44
41
  title: '贺卡管理 - 贺卡列表',
45
42
  mapFn: "getGreetingCardList",
46
- isPublic: true,
47
43
  path: '/saas-admin/v1/bless_material/items',
48
44
  isRule: false,
49
45
  data: {
@@ -52,12 +48,11 @@ module.exports = {
52
48
  page_size: ['页长', 'number', '必选'],
53
49
  },
54
50
  disabled: true,
55
- role: '',
51
+ role: '@@@.CARD.TEMPLATE_LIST',
56
52
  },
57
53
  {
58
54
  title: '贺卡管理 - 创建贺卡',
59
55
  mapFn: "addGreetingCard",
60
- isPublic: true,
61
56
  path: '/saas-admin/v1/bless_material',
62
57
  isRule: false,
63
58
  data: {
@@ -69,7 +64,6 @@ module.exports = {
69
64
  {
70
65
  title: '贺卡管理 - 编辑贺卡',
71
66
  mapFn: "updateGreetingCard",
72
- isPublic: true,
73
67
  path: '/saas-admin/v1/bless_material/:material_id',
74
68
  isRule: false,
75
69
  data: {
@@ -77,13 +71,12 @@ module.exports = {
77
71
  item:['贺卡记录对象', 'Object', '必填'],
78
72
  },
79
73
  disabled: true,
80
- role: '',
74
+ role: '@@@.CARD.TEMPLATE_EDIT',
81
75
  method: 'put'
82
76
  },
83
77
  {
84
78
  title: '贺卡管理 - 复制贺卡',
85
79
  mapFn: "copyGreetingCard",
86
- isPublic: true,
87
80
  path: '/saas-admin/v1/bless_material/copy/:copy_material_id',
88
81
  isRule: false,
89
82
  data: {
@@ -91,12 +84,11 @@ module.exports = {
91
84
  group_id:['复制到分组ID', 'Object', '必填'],
92
85
  },
93
86
  disabled: true,
94
- role: '',
87
+ role: '@@@.CARD.TEMPLATE_COPY',
95
88
  },
96
89
  {
97
90
  title: '贺卡管理 - 获取贺卡信息',
98
91
  mapFn: "getGreetingCardById",
99
- isPublic: true,
100
92
  path: '/saas-admin/v1/bless_material/item/:material_id',
101
93
  isRule: false,
102
94
  data: {
@@ -105,5 +97,55 @@ module.exports = {
105
97
  disabled: true,
106
98
  role: '',
107
99
  },
100
+ {
101
+ title: '贺卡管理 - 素材配置数据',
102
+ mapFn: "setGreetingCardBaseConfig",
103
+ path: '/saas-admin/v1/bless_material/config/:material_id',
104
+ isRule: false,
105
+ data: {
106
+ material_id:['素材ID', 'string|number', '必填'],
107
+ item: ['素材配置对象', 'string|number', '必填']
108
+ },
109
+ disabled: true,
110
+ role: '@@@.CARD.TEMPLATE_CONFIG',
111
+ method: 'put'
112
+ },
113
+
114
+ //custom
115
+ {
116
+ title: '贺卡管理 - 获取自定义素材信息',
117
+ mapFn: "getCustomMaterialInfo",
118
+ path: '/saas-company/v1/bless_x_material/item/:x_material_id',
119
+ isRule: false,
120
+ params: {
121
+ x_material_id:['素材ID', 'string|number', '必填'],
122
+ },
123
+ disabled: true,
124
+ role: '@@@.CARD.TEMPLATE_CUSTOM_CONFIG',
125
+ },
126
+ {
127
+ title: '贺卡管理 - 创建自定义素材',
128
+ mapFn: "createCustomMaterial",
129
+ path: '/saas-company/v1/bless_x_material',
130
+ isRule: false,
131
+ data: {
132
+ item: ['素材配置对象', 'string|number', '必填']
133
+ },
134
+ disabled: true,
135
+ role: '',
136
+ },
137
+ {
138
+ title: '贺卡管理 - 编辑自定义素材',
139
+ mapFn: "updateCustomMaterial",
140
+ path: '/saas-company/v1/bless_x_material/:x_material_id',
141
+ isRule: false,
142
+ data: {
143
+ x_material_id:['素材ID', 'string|number', '必填'],
144
+ item: ['素材配置对象', 'string|number', '必填']
145
+ },
146
+ disabled: true,
147
+ role: '',
148
+ method: 'put'
149
+ },
108
150
  ],
109
151
  }