jufubao-movie 1.0.36-beta1 → 1.0.36-beta3

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.
@@ -6,53 +6,605 @@
6
6
  export default {
7
7
  style: [],
8
8
  content: (data) => {
9
+ let outSpacing = 20;
10
+ if(data['outSpacing'] ) outSpacing = Number(data['outSpacing'])
11
+ let size = {width:750 - outSpacing*2,height:null};
12
+ if(data.poster && data.poster.size && data.poster.size.height) {
13
+ size['height'] = data.poster.size.height
14
+ }
15
+ let poster = {
16
+ size: size,
17
+ type:'1',
18
+ position: Object.assign({},data.poster && data.poster.position)
19
+ };
9
20
  return [
21
+
22
+ {
23
+ label: "是否热映影片",
24
+ ele: "xd-radio",
25
+ valueKey: "showHot",
26
+ value: data['showHot'] || "Y",
27
+ groupKey: 'content',
28
+ list: [
29
+ {label: "显示", value: "Y"},
30
+ {label: "隐藏", value: "N"}
31
+ ]
32
+ },
33
+ data['showHot'] === 'Y'&& {
34
+ label: '热映影片自定义名称:',
35
+ ele: 'el-input',
36
+ type: 'text',
37
+ groupKey:'content',
38
+ valueKey: 'showHotName',
39
+ value: data['showHotName'] || '',
40
+ notice: '热映影片自定义名称设置,默认值:<span style="color:red">热映影片</span>',
41
+ inline: false,
42
+ className: 'input60',
43
+ },
44
+ {
45
+ label: "是否即将上映",
46
+ ele: "xd-radio",
47
+ valueKey: "showRightnow",
48
+ value: data['showRightnow'] || "Y",
49
+ groupKey: 'content',
50
+ list: [
51
+ {label: "显示", value: "Y"},
52
+ {label: "隐藏", value: "N"}
53
+ ]
54
+ },
55
+ data['showRightnow'] === 'Y'&& {
56
+ label: '即将上映自定义名称:',
57
+ ele: 'el-input',
58
+ type: 'text',
59
+ groupKey:'content',
60
+ valueKey: 'showRightnowName',
61
+ value: data['showRightnowName'] || '',
62
+ notice: '即将上映自定义名称设置,默认值:<span style="color:red">即将上映</span>',
63
+ inline: false,
64
+ className: 'input60',
65
+ },
66
+ {
67
+ label: "是否影院列表",
68
+ ele: "xd-radio",
69
+ valueKey: "showList",
70
+ value: data['showList'] || "Y",
71
+ groupKey: 'content',
72
+ list: [
73
+ {label: "显示", value: "Y"},
74
+ {label: "隐藏", value: "N"}
75
+ ]
76
+ },
77
+ data['showList'] === 'Y'&& {
78
+ label: '影院列表自定义名称:',
79
+ ele: 'el-input',
80
+ type: 'text',
81
+ groupKey:'content',
82
+ valueKey: 'showListName',
83
+ value: data['showListName'] || '',
84
+ notice: '即将上映自定义名称设置,默认值:<span style="color:red">影院列表</span>',
85
+ inline: false,
86
+ className: 'input60',
87
+ },
88
+ {
89
+ ele: 'title',
90
+ label: '广告设置',
91
+ size: 'small',
92
+ groupKey:'content',
93
+ },
94
+
95
+ {
96
+ label: '广告位置配置:',
97
+ ele: 'xd-site-poster',
98
+ valueKey: 'poster',
99
+ className: 'input80',
100
+ value: poster,
101
+ groupKey:'content',
102
+ setting: {
103
+ count: 1,
104
+ scene: {label: '广告', value: 'normal'},
105
+ sizeDisabled: {
106
+ wDisabled:true,
107
+ hDisabled: false,
108
+ },
109
+ typeDisabled: true
110
+ },
111
+ handleCustom({action, data}) {
112
+ //设置场景参数
113
+ if(data) {
114
+ data.params = Object.assign({}, {scene: 'normal'}, data.params || {})
115
+ }
116
+ console.log(action,data,'hjhjhjhjhj');
117
+
118
+ //获取显示内容
119
+ if (action === 'screenList') {
120
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
121
+ .then(res => {
122
+ data.cb(res['list'])
123
+ })
124
+ .catch(error => {
125
+ console.error(error);
126
+ });
127
+ return
128
+ }
129
+
130
+ //获取返回参数(广告位高度必选项)
131
+ if (action === 'getPosterInfo') {
132
+ XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
133
+ .then(res => {
134
+ data.cb({list: res.list, selectId: res.selected})
135
+ })
136
+ .catch(error => {
137
+ console.error(error);
138
+ });
139
+ return
140
+ }
141
+
142
+ //使用内容分类
143
+ if (action === 'cmsPublishEditxContent') {
144
+ XdBus.getParentApi('cmsPublishEditxContent')(data.params)
145
+ .then(res => {
146
+ data.cb(res)
147
+ })
148
+ .catch(error => {
149
+ console.error(error);
150
+ });
151
+ return
152
+ }
153
+
154
+ let loading = XdBus.getParentApi('loading')({});
155
+ //位置列表
156
+ if (action === 'getListPostion') {
157
+ XdBus.getParentApi('getListPosterPosition')(data.params)
158
+ .then(res => {
159
+ loading.close();
160
+ data.cb(res)
161
+ })
162
+ .catch(error => {
163
+ loading.close();
164
+ console.error(error);
165
+ });
166
+ }
167
+
168
+ //位置创建
169
+ if (action === 'addPostion') {
170
+ XdBus.getParentApi('addPosterPosition')(data.params)
171
+ .then(res => {
172
+ loading.close();
173
+ data.cb(true)
174
+ })
175
+ .catch(error => {
176
+ console.error(error);
177
+ loading.close();
178
+ data.cb(false)
179
+ });
180
+ }
181
+
182
+ //位置编辑
183
+ if (action === 'editPostion') {
184
+ XdBus.getParentApi('updatePosterPosition')(data.params)
185
+ .then(res => {
186
+ loading.close();
187
+ data.cb(true)
188
+ })
189
+ .catch(error => {
190
+ console.error(error);
191
+ loading.close();
192
+ data.cb(false)
193
+ });
194
+ }
195
+
196
+ //位置删除
197
+ if (action === 'deleltePostion') {
198
+ XdBus.getParentApi('deletePosterPosition')(data.params)
199
+ .then(res => {
200
+ loading.close();
201
+ data.cb(true)
202
+ })
203
+ .catch(error => {
204
+ console.error(error);
205
+ loading.close();
206
+ data.cb(false)
207
+ });
208
+ }
209
+
210
+ //获取广告位内容列表
211
+ if (action === 'getListContent') {
212
+ XdBus.getParentApi('getListPosterContent')(data.params)
213
+ .then(res => {
214
+ loading.close();
215
+ data.cb(res)
216
+ })
217
+ .catch(error => {
218
+ loading.close();
219
+ console.error(error);
220
+ });
221
+ }
222
+
223
+ //广告内容创建
224
+ if (action === 'addContent') {
225
+ XdBus.getParentApi('addPosterContent')(data.params)
226
+ .then(res => {
227
+ loading.close();
228
+ data.cb(true)
229
+ })
230
+ .catch(error => {
231
+ console.error(error);
232
+ loading.close();
233
+ data.cb(false)
234
+ });
235
+ }
236
+
237
+ //广告内容编辑
238
+ if (action === 'editContent') {
239
+ XdBus.getParentApi('updatePosterContent')(data.params)
240
+ .then(res => {
241
+ loading.close();
242
+ data.cb(true)
243
+ })
244
+ .catch(error => {
245
+ console.error(error);
246
+ loading.close();
247
+ data.cb(false)
248
+ });
249
+ }
250
+
251
+ //广告内容删除
252
+ if (action === 'deleteContent') {
253
+ XdBus.getParentApi('deletePosterContent')(data.params)
254
+ .then(res => {
255
+ loading.close();
256
+ data.cb(true)
257
+ })
258
+ .catch(error => {
259
+ console.error(error);
260
+ loading.close();
261
+ data.cb(false)
262
+ });
263
+ }
264
+
265
+ //获取广告内容跳转地址类型
266
+ if (action === 'jumpPosterContentType') {
267
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
268
+ .then(res => {
269
+ loading.close();
270
+ data.cb(res['redirect_type'])
271
+ })
272
+ .catch(error => {
273
+ loading.close();
274
+ console.error(error);
275
+ });
276
+ }
277
+
278
+ //发布
279
+ if (action === 'publish') {
280
+ console.log('publish', data.params)
281
+ XdBus.getParentApi('cmsPublishContent')(data.params)
282
+ .then(res => {
283
+ loading.close();
284
+ data.cb(res)
285
+ })
286
+ .catch(error => {
287
+ loading.close();
288
+ console.error(error);
289
+ });
290
+ }
291
+
292
+ //获取站内页面地址
293
+ if (action === 'router') {
294
+ loading.close()
295
+ return XdBus.getParentApi('getPagesTree');
296
+
297
+ }
298
+
299
+ //通知页面进行刷新
300
+ if(action === 'update') {
301
+ XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
302
+ loading.close()
303
+ }
304
+ },
305
+ },
306
+ {
307
+ label: '广告位置使用张数:',
308
+ ele: 'el-input',
309
+ type: 'number',
310
+ valueKey: 'posterNum',
311
+ groupKey:'content',
312
+ value: data.posterNum || 1,
313
+ placeholder: '请输入广告位置使用张数',
314
+ className: 'input40',
315
+ unit: '张',
316
+ },
317
+
318
+
319
+ {
320
+ label: '外边间距:',
321
+ ele: 'el-input',
322
+ type: 'number',
323
+ groupKey:'style',
324
+ valueKey: 'outSpacing',
325
+ value: outSpacing,
326
+ notice: '外边间距设置,单位:像素,默认值:<span style="color:red">20</span> px',
327
+ inline: false,
328
+ className: 'input60',
329
+ },
330
+
331
+ {
332
+ ele: 'title',
333
+ label: '切换标签样式设置',
334
+ size: 'small',
335
+ groupKey:'style',
336
+ },
337
+ {
338
+ label: '文字背景:',
339
+ ele: 'xd-text-and-bgc',
340
+ groupKey:'style',
341
+ valueKey: 'tabStyle',
342
+ value: data['tabStyle'] || null,
343
+ setting: {
344
+ fontSize: true,
345
+ weight:true,
346
+ },
347
+ handleCustom({action, data}) {
348
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
349
+ .then(res => {
350
+ data.cb(res.list)
351
+ })
352
+ .catch(error => {
353
+ console.error(error);
354
+ data.cb([])
355
+ });
356
+ },
357
+ },
358
+ {
359
+ label: '当前投影设置:',
360
+ ele: 'xd-shadow',
361
+ groupKey:'style',
362
+ valueKey: 'tabShadow',
363
+ value: data['tabShadow'] || '',
364
+ setting: {
365
+ selected: 'Y',
366
+ },
367
+ handleCustom({action, data}) {
368
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
369
+ .then(res => {
370
+ data.cb(res.list)
371
+ })
372
+ .catch(error => {
373
+ console.error(error);
374
+ data.cb([])
375
+ });
376
+ },
377
+ },
378
+ {
379
+ label: '选中投影设置:',
380
+ ele: 'xd-shadow',
381
+ groupKey:'style',
382
+ valueKey: 'tabActShadow',
383
+ value: data['tabActShadow'] || '',
384
+ setting: {
385
+ selected: 'Y',
386
+ },
387
+ handleCustom({action, data}) {
388
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
389
+ .then(res => {
390
+ data.cb(res.list)
391
+ })
392
+ .catch(error => {
393
+ console.error(error);
394
+ data.cb([])
395
+ });
396
+ },
397
+ },
398
+ {
399
+ label: '当前边框设置:',
400
+ ele: 'xd-border',
401
+ groupKey:'style',
402
+ valueKey: 'tabBorder',
403
+ value: data['tabBorder'] || '',
404
+ setting: {
405
+ selected:'N'
406
+ },
407
+ },
408
+ {
409
+ label: '选中边框设置:',
410
+ ele: 'xd-border',
411
+ groupKey:'style',
412
+ valueKey: 'tabActBorder',
413
+ value: data['tabActBorder'] || '',
414
+ setting: {
415
+ selected:'N'
416
+ },
417
+ },
418
+ {
419
+ label: '圆角设置:',
420
+ ele: 'xd-site-select-list',
421
+ valueKey: 'tabRradius',
422
+ value: data['tabRradius'] || '10',
423
+ groupKey:'style',
424
+ placeholder: '请选择内容圆角设置',
425
+ multiple: false,
426
+ className: 'input80',
427
+ handleCustom({action, data}) {
428
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
429
+ .then(res => {
430
+ data.cb(res.list)
431
+ })
432
+ .catch(error => {
433
+ console.error(error);
434
+ });
435
+ },
436
+ },
437
+ {
438
+ ele: 'title',
439
+ label: '列表样式设置',
440
+ size: 'small',
441
+ groupKey:'style',
442
+ },
443
+ {
444
+ label: '填充设置:',
445
+ ele: 'xd-margin-padding',
446
+ groupKey:'style',
447
+ valueKey: 'contMargin',
448
+ value: data['contMargin'] || null,
449
+ setting: {
450
+ type: 'margin',
451
+ },
452
+ inline: false,
453
+ notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
454
+ },
10
455
  {
11
456
  label: '背景颜色:',
12
457
  ele: 'xd-color',
13
- valueKey: 'bgcolor',
14
- value: data.bgcolor || '',
15
- placeholder: '请输入占位框背景颜色',
458
+ valueKey: 'contBgColor',
459
+ value: data['contBgColor'] || '',
460
+ placeholder: '请选择背景颜色',
16
461
  classNmae: 'input80',
17
- rules: [
18
- {
19
- required: true,
20
- message: '请输入占位框背景颜色',
21
- trigger: 'blur'
22
- },
23
- ]
462
+ groupKey:'style',
463
+ },
464
+ {
465
+ label: '当前投影设置:',
466
+ ele: 'xd-shadow',
467
+ groupKey:'style',
468
+ valueKey: 'contShadow',
469
+ value: data['contShadow'] || '',
470
+ setting: {
471
+ selected: 'N',
472
+ },
473
+ handleCustom({action, data}) {
474
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
475
+ .then(res => {
476
+ data.cb(res.list)
477
+ })
478
+ .catch(error => {
479
+ console.error(error);
480
+ data.cb([])
481
+ });
482
+ },
483
+ },
484
+ {
485
+ label: '当前边框设置:',
486
+ ele: 'xd-border',
487
+ groupKey:'style',
488
+ valueKey: 'contBorder',
489
+ value: data['contBorder'] || '',
490
+ setting: {
491
+ selected:'N'
492
+ },
493
+ },
494
+ {
495
+ label: '圆角设置:',
496
+ ele: 'xd-site-select-list',
497
+ valueKey: 'contRradius',
498
+ value: data['contRradius'] || '10',
499
+ groupKey:'style',
500
+ placeholder: '请选择内容圆角设置',
501
+ multiple: false,
502
+ className: 'input80',
503
+ handleCustom({action, data}) {
504
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
505
+ .then(res => {
506
+ data.cb(res.list)
507
+ })
508
+ .catch(error => {
509
+ console.error(error);
510
+ });
511
+ },
512
+ },
513
+
514
+ {
515
+ ele: 'title',
516
+ label: '图片样式设置',
517
+ size: 'small',
518
+ groupKey:'style',
24
519
  },
25
520
  {
26
- label: '选中路径:',
521
+ label: '圆角设置:',
522
+ ele: 'xd-site-select-list',
523
+ valueKey: 'imgRradius',
524
+ value: data['imgRradius'] || '10',
525
+ groupKey:'style',
526
+ placeholder: '请选择内容圆角设置',
527
+ multiple: false,
528
+ className: 'input80',
529
+ handleCustom({action, data}) {
530
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
531
+ .then(res => {
532
+ data.cb(res.list)
533
+ })
534
+ .catch(error => {
535
+ console.error(error);
536
+ });
537
+ },
538
+ },
539
+ {
540
+ ele: 'title',
541
+ label: '影片选择路径设置',
542
+ size: 'small',
543
+ groupKey:'advanced',
544
+ },
545
+ {
546
+ label: '影片详情访问地址:',
27
547
  ele: 'xd-select-pages-path',
28
- valueKey: 'select-pages-path',
29
- value: data['select-pages-path'] || null,
548
+ valueKey: 'fimeDetailPath',
549
+ groupKey:'advanced',
550
+ value: data['fimeDetailPath'] || null,
551
+ className: 'input100',
30
552
  setting: {
31
553
  router: XdBus.getParentApi('getPagesTree')
32
554
  },
33
555
  },
34
- data.bgcolor && {
35
- label: '高度:',
36
- ele: 'el-input',
37
- type: 'number',
38
- valueKey: 'height',
39
- value: data.height || 100,
40
- placeholder: '请输入占位框高度,单位像素,默认:10px',
41
- className: 'input80',
42
- rules: [
43
- {
44
- required: true,
45
- message: '请输入占位框高度',
46
- trigger: 'blur'
47
- },
48
- ]
556
+ {
557
+ label: '选择影院访问地址:',
558
+ ele: 'xd-select-pages-path',
559
+ groupKey:'advanced',
560
+ valueKey: 'buyPath',
561
+ value: data['buyPath'] || null,
562
+ className: 'input100',
563
+ setting: {
564
+ router: XdBus.getParentApi('getPagesTree')
565
+ },
49
566
  },
50
567
  {
51
- label: '', //label
52
- ele: 'slot', //package 名称
53
- slot: 'is_reference',
568
+ ele: 'title',
569
+ label: '影院选择路径设置',
570
+ size: 'small',
571
+ groupKey:'advanced',
572
+ },
573
+ {
574
+ label: '选择影院排期访问地址:',
575
+ ele: 'xd-select-pages-path',
576
+ valueKey: 'onlinePath',
577
+ groupKey:'advanced',
578
+ value: data['onlinePath'] || null,
579
+ className: 'input100',
580
+ setting: {
581
+ router: XdBus.getParentApi('getPagesTree')
582
+ },
583
+ },
584
+ {
585
+ label: '选择电子码详情访问地址:',
586
+ ele: 'xd-select-pages-path',
587
+ groupKey:'advanced',
588
+ valueKey: 'codePath',
589
+ value: data['codePath'] || null,
590
+ className: 'input100',
591
+ setting: {
592
+ router: XdBus.getParentApi('getPagesTree')
593
+ },
594
+ },
595
+ {
596
+ label: '选择线下核销访问地址:',
597
+ ele: 'xd-select-pages-path',
598
+ groupKey:'advanced',
599
+ valueKey: 'cashierPath',
600
+ value: data['cashierPath'] || null,
601
+ className: 'input100',
602
+ setting: {
603
+ router: XdBus.getParentApi('getPagesTree')
604
+ },
54
605
  },
55
606
  ].filter(i=>i)
56
607
  },
57
608
  advanced: [],
58
609
  };
610
+