jufubao-base 1.0.306 → 1.0.307-beta1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.306",
3
+ "version": "1.0.307-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -8,10 +8,12 @@ module.exports = [
8
8
  {
9
9
  mapFnName: "getExchangeCode",
10
10
  title: "兑换码",
11
- path: "/member/v1/exchange/:exchange_code",
11
+ path: "/member/v1/card",
12
12
  isRule: true,
13
13
  params: {
14
- exchange_code: ['兑换码', 'String', '必选']
14
+ card_number: ['券号', 'String', '可选'],
15
+ card_password: ['密码', 'String', '可选'],
16
+ card_qrcode: ['二维码', 'String', '可选'],
15
17
  },
16
18
  isConsole: true,
17
19
  disabled: true,
@@ -19,7 +21,7 @@ module.exports = [
19
21
  {
20
22
  mapFnName: "createVipOrder",
21
23
  title: "创建VIP订单",
22
- path: "/member/v1/order/submit",
24
+ path: "/member/v1/new-order/submit",
23
25
  isRule: false,
24
26
  data: {
25
27
  business_code: ['业务编码', 'String', '必选'],
@@ -31,5 +33,14 @@ module.exports = [
31
33
  },
32
34
  isConsole: true,
33
35
  disabled: true,
34
- }
36
+ },
37
+ {
38
+ mapFnName: 'getOpenBaseUserInfo',
39
+ title: '获取用户信息',
40
+ path: '/passport/v1/user/get',
41
+ params: {},
42
+ isRule: false,
43
+ isConsole: true,
44
+ disabled: true,
45
+ },
35
46
  ];
@@ -17,239 +17,309 @@ export default {
17
17
  type: ["jpg", "png", "jpeg", "gif"],
18
18
  };
19
19
  return [
20
- {
21
- label: "文案描述:", //label
22
- ele: "xd-tinymce", //package 名称
23
- valueKey: "description", //form[valueKey]
24
- value: data.description || "",
25
- imageConfig: imageConfig,
26
- inline: false,
27
- groupKey: "content",
28
- },
29
- {
30
- label: '共享PLUS会员用户协议:',
31
- ele: 'xd-site-news',
32
- valueKey: 'notices',
33
- groupKey:'content',
34
- value: data.notices || {type: 'privacy'},
35
- className: 'input70',
36
- setting: {
37
- config: {
38
- sort: true,
39
- maxlen: 100,
40
- action: 'aliyun',
41
- size: 5,
42
- tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
43
- uploadType: 'aliyun',
44
- type: ['jpg', 'png', 'jpeg']
45
- },
46
- },
47
- handleCustom({action, data}) {
48
- if (data && data.params) {
49
- //当一个插件中出现多个内容分类时候需要设置code值,在页面引用时候(容器id + code)进行拼接获取数据列表
50
- data.params = Object.assign({}, data.params, {code: 'privacy_service'});
51
- }
20
+ // {
21
+ // label: "文案描述:", //label
22
+ // ele: "xd-tinymce", //package 名称
23
+ // valueKey: "description", //form[valueKey]
24
+ // value: data.description || "",
25
+ // imageConfig: imageConfig,
26
+ // inline: false,
27
+ // groupKey: "content",
28
+ // },
29
+ // {
30
+ // label: '共享PLUS会员用户协议:',
31
+ // ele: 'xd-site-news',
32
+ // valueKey: 'notices',
33
+ // groupKey:'content',
34
+ // value: data.notices || {type: 'privacy'},
35
+ // className: 'input70',
36
+ // setting: {
37
+ // config: {
38
+ // sort: true,
39
+ // maxlen: 100,
40
+ // action: 'aliyun',
41
+ // size: 5,
42
+ // tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
43
+ // uploadType: 'aliyun',
44
+ // type: ['jpg', 'png', 'jpeg']
45
+ // },
46
+ // },
47
+ // handleCustom({action, data}) {
48
+ // if (data && data.params) {
49
+ // //当一个插件中出现多个内容分类时候需要设置code值,在页面引用时候(容器id + code)进行拼接获取数据列表
50
+ // data.params = Object.assign({}, data.params, {code: 'privacy_service'});
51
+ // }
52
52
 
53
- //获取返回参数(场景类型名称为必填)
54
- let loading = { close(){}}
53
+ // //获取返回参数(场景类型名称为必填)
54
+ // let loading = { close(){}}
55
55
 
56
- //获取显示内容
57
- if (action === 'screen') {
58
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
59
- .then(res => {
60
- loading.close();
61
- data.cb(res['list'])
62
- })
63
- .catch(error => {
64
- console.error(error);
65
- loading.close();
66
- });
56
+ // //获取显示内容
57
+ // if (action === 'screen') {
58
+ // XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
59
+ // .then(res => {
60
+ // loading.close();
61
+ // data.cb(res['list'])
62
+ // })
63
+ // .catch(error => {
64
+ // console.error(error);
65
+ // loading.close();
66
+ // });
67
67
 
68
- }
68
+ // }
69
69
 
70
- //获取返回参数(广告位高度必选项)
71
- if (action === 'getNewsInfo') {
72
- XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
73
- .then(res => {
74
- loading.close()
75
- data.cb({list: res.list, selectId: res.selected})
76
- })
77
- .catch(error => {
78
- loading.close()
79
- console.error(error);
80
- });
81
- }
70
+ // //获取返回参数(广告位高度必选项)
71
+ // if (action === 'getNewsInfo') {
72
+ // XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
73
+ // .then(res => {
74
+ // loading.close()
75
+ // data.cb({list: res.list, selectId: res.selected})
76
+ // })
77
+ // .catch(error => {
78
+ // loading.close()
79
+ // console.error(error);
80
+ // });
81
+ // }
82
82
 
83
- //获取产品业务线列表
84
- if (action === 'namespace') {
85
- XdBus.getParentApi('getOptionsNamespaces')({})
86
- .then(res => {
87
- loading.close()
88
- data.cb(res['list'])
89
- })
90
- .catch(error => {
91
- loading.close()
92
- console.error(error);
93
- });
94
- }
83
+ // //获取产品业务线列表
84
+ // if (action === 'namespace') {
85
+ // XdBus.getParentApi('getOptionsNamespaces')({})
86
+ // .then(res => {
87
+ // loading.close()
88
+ // data.cb(res['list'])
89
+ // })
90
+ // .catch(error => {
91
+ // loading.close()
92
+ // console.error(error);
93
+ // });
94
+ // }
95
95
 
96
- //使用内容分类
97
- if (action === 'cmsPublishEditxContent') {
98
- loading = XdBus.getParentApi('loading')({});
99
- XdBus.getParentApi('cmsPublishEditxContent')(data.params)
100
- .then(res => {
101
- console.log('cmsPublishEditxContent', res)
102
- loading.close();
103
- data.cb(res)
104
- })
105
- .catch(error => {
106
- loading.close();
107
- console.error(error);
108
- });
109
- }
96
+ // //使用内容分类
97
+ // if (action === 'cmsPublishEditxContent') {
98
+ // loading = XdBus.getParentApi('loading')({});
99
+ // XdBus.getParentApi('cmsPublishEditxContent')(data.params)
100
+ // .then(res => {
101
+ // console.log('cmsPublishEditxContent', res)
102
+ // loading.close();
103
+ // data.cb(res)
104
+ // })
105
+ // .catch(error => {
106
+ // loading.close();
107
+ // console.error(error);
108
+ // });
109
+ // }
110
110
 
111
- //位置列表
112
- if (action === 'getListPostion') {
113
- loading = XdBus.getParentApi('loading')({});
114
- XdBus.getParentApi('getListNewsPosition')(data.params)
115
- .then(res => {
116
- loading.close();
117
- data.cb(res)
118
- })
119
- .catch(error => {
120
- loading.close();
121
- console.error(error);
122
- });
123
- }
111
+ // //位置列表
112
+ // if (action === 'getListPostion') {
113
+ // loading = XdBus.getParentApi('loading')({});
114
+ // XdBus.getParentApi('getListNewsPosition')(data.params)
115
+ // .then(res => {
116
+ // loading.close();
117
+ // data.cb(res)
118
+ // })
119
+ // .catch(error => {
120
+ // loading.close();
121
+ // console.error(error);
122
+ // });
123
+ // }
124
124
 
125
- //位置创建
126
- if (action === 'addPostion') {
127
- loading = XdBus.getParentApi('loading')({});
128
- XdBus.getParentApi('addNewsPosition')(data.params)
129
- .then(res => {
130
- loading.close();
131
- data.cb(true)
132
- })
133
- .catch(error => {
134
- console.error(error);
135
- loading.close();
136
- data.cb(false)
137
- });
138
- }
125
+ // //位置创建
126
+ // if (action === 'addPostion') {
127
+ // loading = XdBus.getParentApi('loading')({});
128
+ // XdBus.getParentApi('addNewsPosition')(data.params)
129
+ // .then(res => {
130
+ // loading.close();
131
+ // data.cb(true)
132
+ // })
133
+ // .catch(error => {
134
+ // console.error(error);
135
+ // loading.close();
136
+ // data.cb(false)
137
+ // });
138
+ // }
139
139
 
140
- //位置编辑
141
- if (action === 'editPostion') {
142
- loading = XdBus.getParentApi('loading')({});
143
- XdBus.getParentApi('updateNewsPosition')(data.params)
144
- .then(res => {
145
- loading.close();
146
- data.cb(true)
147
- })
148
- .catch(error => {
149
- console.error(error);
150
- loading.close();
151
- data.cb(false)
152
- });
153
- }
140
+ // //位置编辑
141
+ // if (action === 'editPostion') {
142
+ // loading = XdBus.getParentApi('loading')({});
143
+ // XdBus.getParentApi('updateNewsPosition')(data.params)
144
+ // .then(res => {
145
+ // loading.close();
146
+ // data.cb(true)
147
+ // })
148
+ // .catch(error => {
149
+ // console.error(error);
150
+ // loading.close();
151
+ // data.cb(false)
152
+ // });
153
+ // }
154
154
 
155
- //位置删除
156
- if (action === 'deleltePostion') {
157
- loading = XdBus.getParentApi('loading')({});
158
- XdBus.getParentApi('deleteNewsPosition')(data.params)
159
- .then(res => {
160
- loading.close();
161
- data.cb(true)
162
- })
163
- .catch(error => {
164
- console.error(error);
165
- loading.close();
166
- data.cb(false)
167
- });
168
- }
155
+ // //位置删除
156
+ // if (action === 'deleltePostion') {
157
+ // loading = XdBus.getParentApi('loading')({});
158
+ // XdBus.getParentApi('deleteNewsPosition')(data.params)
159
+ // .then(res => {
160
+ // loading.close();
161
+ // data.cb(true)
162
+ // })
163
+ // .catch(error => {
164
+ // console.error(error);
165
+ // loading.close();
166
+ // data.cb(false)
167
+ // });
168
+ // }
169
169
 
170
- //获取广告位内容列表
171
- if (action === 'getListContent') {
172
- loading = XdBus.getParentApi('loading')({});
173
- XdBus.getParentApi('getListNewsContent')(data.params)
174
- .then(res => {
175
- loading.close();
176
- data.cb(res)
177
- })
178
- .catch(error => {
179
- loading.close();
180
- console.error(error);
181
- });
182
- }
170
+ // //获取广告位内容列表
171
+ // if (action === 'getListContent') {
172
+ // loading = XdBus.getParentApi('loading')({});
173
+ // XdBus.getParentApi('getListNewsContent')(data.params)
174
+ // .then(res => {
175
+ // loading.close();
176
+ // data.cb(res)
177
+ // })
178
+ // .catch(error => {
179
+ // loading.close();
180
+ // console.error(error);
181
+ // });
182
+ // }
183
183
 
184
- //广告内容创建
185
- if (action === 'addContent') {
186
- loading = XdBus.getParentApi('loading')({});
187
- XdBus.getParentApi('addNewsContent')(data.params)
188
- .then(res => {
189
- loading.close();
190
- data.cb(true)
191
- })
192
- .catch(error => {
193
- console.error(error);
194
- loading.close();
195
- data.cb(false)
196
- });
197
- }
184
+ // //广告内容创建
185
+ // if (action === 'addContent') {
186
+ // loading = XdBus.getParentApi('loading')({});
187
+ // XdBus.getParentApi('addNewsContent')(data.params)
188
+ // .then(res => {
189
+ // loading.close();
190
+ // data.cb(true)
191
+ // })
192
+ // .catch(error => {
193
+ // console.error(error);
194
+ // loading.close();
195
+ // data.cb(false)
196
+ // });
197
+ // }
198
198
 
199
- //广告内容编辑
200
- if (action === 'editContent') {
201
- loading = XdBus.getParentApi('loading')({});
202
- XdBus.getParentApi('updateNewsContent')(data.params)
203
- .then(res => {
204
- loading.close();
205
- data.cb(true)
206
- })
207
- .catch(error => {
208
- console.error(error);
209
- loading.close();
210
- data.cb(false)
211
- });
212
- }
199
+ // //广告内容编辑
200
+ // if (action === 'editContent') {
201
+ // loading = XdBus.getParentApi('loading')({});
202
+ // XdBus.getParentApi('updateNewsContent')(data.params)
203
+ // .then(res => {
204
+ // loading.close();
205
+ // data.cb(true)
206
+ // })
207
+ // .catch(error => {
208
+ // console.error(error);
209
+ // loading.close();
210
+ // data.cb(false)
211
+ // });
212
+ // }
213
213
 
214
- //广告内容删除
215
- if (action === 'deleteContent') {
216
- loading = XdBus.getParentApi('loading')({});
217
- XdBus.getParentApi('deleteNewsContent')(data.params)
218
- .then(res => {
219
- loading.close();
220
- data.cb(true)
221
- })
222
- .catch(error => {
223
- console.error(error);
224
- loading.close();
225
- data.cb(false)
226
- });
227
- }
214
+ // //广告内容删除
215
+ // if (action === 'deleteContent') {
216
+ // loading = XdBus.getParentApi('loading')({});
217
+ // XdBus.getParentApi('deleteNewsContent')(data.params)
218
+ // .then(res => {
219
+ // loading.close();
220
+ // data.cb(true)
221
+ // })
222
+ // .catch(error => {
223
+ // console.error(error);
224
+ // loading.close();
225
+ // data.cb(false)
226
+ // });
227
+ // }
228
228
 
229
- //内容发布
230
- if (action === 'publish') {
231
- loading = XdBus.getParentApi('loading')({});
232
- console.log('publish', data.params)
233
- XdBus.getParentApi('cmsPublishContent')(data.params)
234
- .then(res => {
235
- loading.close();
236
- data.cb(res)
237
- })
238
- .catch(error => {
239
- loading.close();
240
- console.error(error);
241
- });
242
- }
229
+ // //内容发布
230
+ // if (action === 'publish') {
231
+ // loading = XdBus.getParentApi('loading')({});
232
+ // console.log('publish', data.params)
233
+ // XdBus.getParentApi('cmsPublishContent')(data.params)
234
+ // .then(res => {
235
+ // loading.close();
236
+ // data.cb(res)
237
+ // })
238
+ // .catch(error => {
239
+ // loading.close();
240
+ // console.error(error);
241
+ // });
242
+ // }
243
243
 
244
- //通知页面进行刷新
245
- if (action === 'update') {
246
- loading = XdBus.getParentApi('loading')({});
247
- XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
248
- loading.close()
249
- }
250
- },
251
- inline: false,
252
- notice: '',
244
+ // //通知页面进行刷新
245
+ // if (action === 'update') {
246
+ // loading = XdBus.getParentApi('loading')({});
247
+ // XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
248
+ // loading.close()
249
+ // }
250
+ // },
251
+ // inline: false,
252
+ // notice: '',
253
+ // },
254
+ {
255
+ label: "用户信息背景颜色:",
256
+ ele: "xd-color",
257
+ valueKey: "userBgColor",
258
+ value: data.userBgColor || null,
259
+ groupKey: "style",
260
+ },
261
+ {
262
+ label: "用户信息背景图",
263
+ ele: 'xd-upload',
264
+ valueKey: "userBgImg",
265
+ groupKey: "content",
266
+ value: data.userBgImg || {},
267
+ defaultValue: data.userBgImg || null,
268
+ slot: true,
269
+ oneWidth: 355,
270
+ oneHeight: 84,
271
+ elinputClassName: 'input40',
272
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议宽度为<span style="color:red">710px</span>,高度<span style="color:red">196px</span>',
273
+ type: ['jpg', 'png', 'jpeg'],
274
+ styleType: 'one',
275
+ uploadType: 'aliyun',
276
+ size: 5,
277
+ action: 'action',
278
+ sort: true,
279
+ maxlen: 100,
280
+ },
281
+ {
282
+ label: "PLUS会员banner背景图",
283
+ ele: 'xd-upload',
284
+ valueKey: "bannerBgImg",
285
+ groupKey: "content",
286
+ value: data.bannerBgImg || {},
287
+ defaultValue: data.bannerBgImg || null,
288
+ slot: true,
289
+ oneWidth: 355,
290
+ oneHeight: 170,
291
+ elinputClassName: 'input40',
292
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议宽度为<span style="color:red">710px</span>,高度<span style="color:red">340px</span>',
293
+ type: ['jpg', 'png', 'jpeg'],
294
+ styleType: 'one',
295
+ uploadType: 'aliyun',
296
+ size: 5,
297
+ action: 'action',
298
+ sort: true,
299
+ maxlen: 100,
300
+ rules: [
301
+ { required: true, message: '请添加背景图', trigger: 'change' },
302
+ ],
303
+ },
304
+ {
305
+ label: "兑换规则说明",
306
+ ele: 'xd-upload',
307
+ valueKey: "ruleImg",
308
+ groupKey: "content",
309
+ value: data.ruleImg || {},
310
+ defaultValue: data.ruleImg || null,
311
+ slot: true,
312
+ oneWidth: 355,
313
+ // oneHeight: 84,
314
+ elinputClassName: 'input40',
315
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议宽度为<span style="color:red">710px</span>',
316
+ type: ['jpg', 'png', 'jpeg'],
317
+ styleType: 'one',
318
+ uploadType: 'aliyun',
319
+ size: 5,
320
+ action: 'action',
321
+ sort: true,
322
+ maxlen: 100,
253
323
  },
254
324
  {
255
325
  label: 'PLUS会员开通成功跳转路径:',
@@ -263,18 +333,18 @@ export default {
263
333
  },
264
334
  inline: false,
265
335
  },
266
- {
267
- label: '支付页面跳转路径:',
268
- ele: 'xd-select-pages-path',
269
- valueKey: 'payPath',
270
- groupKey:'advanced',
271
- placeholder: '请选择支付页面跳转路径',
272
- value: data['payPath'] || null,
273
- setting: {
274
- router: XdBus.getParentApi('getPagesTree'),
275
- },
276
- inline: false,
277
- },
336
+ // {
337
+ // label: '支付页面跳转路径:',
338
+ // ele: 'xd-select-pages-path',
339
+ // valueKey: 'payPath',
340
+ // groupKey:'advanced',
341
+ // placeholder: '请选择支付页面跳转路径',
342
+ // value: data['payPath'] || null,
343
+ // setting: {
344
+ // router: XdBus.getParentApi('getPagesTree'),
345
+ // },
346
+ // inline: false,
347
+ // },
278
348
  ].filter(i=>i)
279
349
  },
280
350
  advanced: [],