jufubao-movie 1.0.38 → 1.0.39-beta2

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