jufubao-base 1.0.311-beta1 → 1.0.311-beta101
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 +1 -1
- package/src/components/JfbBaseBlock/Attr.js +167 -34
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +12 -9
- package/src/components/JfbBaseCardDetail/Attr.js +0 -12
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +1 -162
- package/src/components/JfbBaseCardDetailEntry/Attr.js +0 -12
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +2 -163
- package/src/components/JfbBaseEntry/Attr.js +5 -72
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +183 -47
- package/src/components/JfbBaseEntry/cusAttr/content.js +77 -0
- package/src/components/JfbBaseEntry/cusAttr/style.js +288 -0
- package/src/components/JfbBaseImageBlock/Attr.js +150 -23
- package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +29 -27
- package/src/components/JfbBaseNotice/Attr.js +5 -512
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +188 -181
- package/src/components/JfbBaseNotice/cusAttr/content.js +308 -0
- package/src/components/JfbBaseNotice/cusAttr/cssOne.js +395 -0
- package/src/components/JfbBaseNotice/cusAttr/cssThree.js +101 -0
- package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +208 -0
- package/src/components/JfbBaseNotice/cusAttr/style.js +31 -0
- package/src/components/JfbBaseVideo/Attr.js +5 -297
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +36 -62
- package/src/components/JfbBaseVideo/cusAttr/content.js +236 -0
- package/src/components/JfbBaseVideo/cusAttr/image.js +213 -0
- package/src/components/JfbBaseVideo/cusAttr/style.js +172 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import {dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
|
|
4
|
+
export default function (data, gValue, gColor, oldData) {
|
|
5
|
+
let style = '1';
|
|
6
|
+
if(data['style'] !== undefined) style = data['style'];
|
|
7
|
+
let defBtnFields = ['btnConfirmWidth','','btnConfirmBgColor','btnConfirmTextColor']
|
|
8
|
+
return [
|
|
9
|
+
style ==='3' && {
|
|
10
|
+
ele: 'title',
|
|
11
|
+
label: '风格三(弹窗显示)',
|
|
12
|
+
size: 'small',
|
|
13
|
+
groupKey:'style',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: '弹窗间隔',
|
|
17
|
+
ele: 'xd-radio',
|
|
18
|
+
groupKey: 'style',
|
|
19
|
+
valueKey: 'timeStatus',
|
|
20
|
+
value: statusDataVal({data, key:'timeStatus', fields:['time'],gValue}),
|
|
21
|
+
labelInline:true,
|
|
22
|
+
hidden: style !== '3',
|
|
23
|
+
list: [
|
|
24
|
+
{label: '默认', value: 'D'},
|
|
25
|
+
{label: '自定义', value: 'C'},
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{ele: 'group_start'},
|
|
29
|
+
{
|
|
30
|
+
label: '',
|
|
31
|
+
ele: 'el-input',
|
|
32
|
+
type: 'text',
|
|
33
|
+
groupKey:'style',
|
|
34
|
+
valueKey: 'time',
|
|
35
|
+
value: dataVal({data, key:'time', dValue:3, gValue}),
|
|
36
|
+
hidden: style !== '3'|| !statusShow({data, key: 'timeStatus', fields:['time'], gValue}),
|
|
37
|
+
className: 'input100',
|
|
38
|
+
notice: '弹窗间隔,单位:小时。默认值:<span style="color: red">3</span>小时',
|
|
39
|
+
unit: '小时',
|
|
40
|
+
},
|
|
41
|
+
{ele: 'group_end'},
|
|
42
|
+
{
|
|
43
|
+
label: '按钮样式',
|
|
44
|
+
ele: 'xd-radio',
|
|
45
|
+
groupKey: 'style',
|
|
46
|
+
valueKey: 'btnStatus',
|
|
47
|
+
value: statusDataVal({data, key:'btnStatus', fields:defBtnFields,gValue}),
|
|
48
|
+
labelInline:true,
|
|
49
|
+
hidden: style !== '3',
|
|
50
|
+
list: [
|
|
51
|
+
{label: '默认', value: 'D'},
|
|
52
|
+
{label: '自定义', value: 'C'},
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{ele: 'group_start'},
|
|
56
|
+
{
|
|
57
|
+
label: "按钮长度",
|
|
58
|
+
ele: "el-input",
|
|
59
|
+
valueKey: "btnConfirmWidth",
|
|
60
|
+
value: dataVal({data, key:'btnConfirmWidth', dValue:'', gValue}),
|
|
61
|
+
hidden: style !== '3'|| !statusShow({data, key: 'btnStatus', fields:defBtnFields, gValue}),
|
|
62
|
+
placeholder: '请输入按钮长度',
|
|
63
|
+
className: 'inpu100',
|
|
64
|
+
groupKey: "style",
|
|
65
|
+
labelInline: true,
|
|
66
|
+
setting: {
|
|
67
|
+
showAlpha: true
|
|
68
|
+
},
|
|
69
|
+
unit:'px'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: "按钮背景",
|
|
73
|
+
ele: "xd-color",
|
|
74
|
+
valueKey: "btnConfirmBgColor",
|
|
75
|
+
groupKey:'style',
|
|
76
|
+
className: 'inpu100',
|
|
77
|
+
labelInline: true,
|
|
78
|
+
value: dataVal({data, key:'btnConfirmBgColor', dValue:'', gValue}),
|
|
79
|
+
hidden: style !== '3'|| !statusShow({data, key: 'btnStatus', fields:defBtnFields, gValue}),
|
|
80
|
+
setting: {
|
|
81
|
+
showAlpha: true
|
|
82
|
+
},
|
|
83
|
+
placeholder: '请选择按钮背景颜色',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: "按钮文字",
|
|
87
|
+
ele: "xd-color",
|
|
88
|
+
valueKey: "btnConfirmTextColor",
|
|
89
|
+
groupKey:'style',
|
|
90
|
+
className: 'inpu100',
|
|
91
|
+
labelInline: true,
|
|
92
|
+
value: dataVal({data, key:'btnConfirmTextColor', dValue:'', gValue}),
|
|
93
|
+
hidden: style !== '3'|| !statusShow({data, key: 'btnStatus', fields:defBtnFields, gValue}),
|
|
94
|
+
setting: {
|
|
95
|
+
showAlpha: true
|
|
96
|
+
},
|
|
97
|
+
placeholder: '请选择按钮文字颜色',
|
|
98
|
+
},
|
|
99
|
+
{ele: 'group_end'},
|
|
100
|
+
].filter(i=>i)
|
|
101
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
dataVal,
|
|
5
|
+
statusDataVal,
|
|
6
|
+
statusShow,
|
|
7
|
+
cRaBorShadow
|
|
8
|
+
} from "@/utils/AttrTools";
|
|
9
|
+
export default function (data, gValue, gColor, oldData) {
|
|
10
|
+
let style = '1';
|
|
11
|
+
if(data['style'] !== undefined) style = data['style'];
|
|
12
|
+
|
|
13
|
+
let defScrollBorder = cRaBorShadow( data, 'scrollBorder', {dValue:'N', cValue: 'N'},gValue);
|
|
14
|
+
let defScrollShadow = cRaBorShadow( data, 'scrollShadow', {dValue:'N', cValue: 'N'},gValue);
|
|
15
|
+
|
|
16
|
+
return [
|
|
17
|
+
style === '2' && {
|
|
18
|
+
ele: 'title',
|
|
19
|
+
label: '风格二(滚动显示)',
|
|
20
|
+
size: 'small',
|
|
21
|
+
groupKey:'style',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: '滚动条件',
|
|
25
|
+
ele: 'xd-radio',
|
|
26
|
+
groupKey: 'style',
|
|
27
|
+
valueKey: 'numStatus',
|
|
28
|
+
value: statusDataVal({data, key:'numStatus', fields:['num'],gValue}),
|
|
29
|
+
labelInline:true,
|
|
30
|
+
hidden: style !== '2',
|
|
31
|
+
list: [
|
|
32
|
+
{label: '默认', value: 'D'},
|
|
33
|
+
{label: '自定义', value: 'C'},
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{ele: 'group_start'},
|
|
37
|
+
{
|
|
38
|
+
label: '',
|
|
39
|
+
ele: 'el-input',
|
|
40
|
+
groupKey:'style',
|
|
41
|
+
type: 'number',
|
|
42
|
+
valueKey: 'num',
|
|
43
|
+
value: dataVal({data, key:'num', dValue:1, gValue}),
|
|
44
|
+
hidden: style !== '2' || !statusShow({data, key: 'numStatus', fields:['num'], gValue}),
|
|
45
|
+
placeholder: '请输入滚动显示条数,默认:1',
|
|
46
|
+
className: 'input100',
|
|
47
|
+
unit: '条'
|
|
48
|
+
},
|
|
49
|
+
{ele: 'group_end'},
|
|
50
|
+
|
|
51
|
+
{
|
|
52
|
+
label: '滚动速度',
|
|
53
|
+
ele: 'xd-radio',
|
|
54
|
+
groupKey: 'style',
|
|
55
|
+
valueKey: 'speedStatus',
|
|
56
|
+
value: statusDataVal({data, key:'speedStatus', fields:['speed'],gValue}),
|
|
57
|
+
labelInline:true,
|
|
58
|
+
hidden: style !== '2',
|
|
59
|
+
list: [
|
|
60
|
+
{label: '默认', value: 'D'},
|
|
61
|
+
{label: '自定义', value: 'C'},
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{ele: 'group_start'},
|
|
65
|
+
{
|
|
66
|
+
label: '',
|
|
67
|
+
ele: 'el-input',
|
|
68
|
+
type: 'number',
|
|
69
|
+
groupKey:'style',
|
|
70
|
+
valueKey: 'speed',
|
|
71
|
+
value: dataVal({data, key:'speed', dValue:20, gValue}),
|
|
72
|
+
hidden: style !== '2' || !statusShow({data, key: 'speedStatus', fields:['speed'], gValue}),
|
|
73
|
+
placeholder: '请输入滚动速度值,默认:20',
|
|
74
|
+
className: 'input100',
|
|
75
|
+
notice: '建议取值:20-60, 值越大越快',
|
|
76
|
+
inline: false,
|
|
77
|
+
},
|
|
78
|
+
{ele: 'group_end'},
|
|
79
|
+
{
|
|
80
|
+
label: '圆角',
|
|
81
|
+
ele: 'xd-radio',
|
|
82
|
+
groupKey: 'style',
|
|
83
|
+
valueKey: 'scrollRadiusStatus',
|
|
84
|
+
value: statusDataVal({data, key:'scrollRadiusStatus', cValue: 'N', dValue:'N', fields:['scrollRadius'],gValue}),
|
|
85
|
+
labelInline:true,
|
|
86
|
+
hidden: style !== '2',
|
|
87
|
+
list: [
|
|
88
|
+
{label: '默认', value: 'D'},
|
|
89
|
+
{label: '无圆角', value: 'N'},
|
|
90
|
+
{label: '自定义', value: 'C'},
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{ele: 'group_start'},
|
|
94
|
+
{
|
|
95
|
+
label: '',
|
|
96
|
+
ele: 'xd-site-select-list',
|
|
97
|
+
labelInline: true,
|
|
98
|
+
valueKey: 'scrollRadius',
|
|
99
|
+
value: dataVal({data, key:'scrollRadius', dValue:'10', gValue}),
|
|
100
|
+
hidden: style !== '2' || !statusShow({data, key: 'scrollRadiusStatus', fields:['scrollRadius'], gValue}),
|
|
101
|
+
placeholder: '请选择圆角',
|
|
102
|
+
multiple: false,
|
|
103
|
+
className: 'input100',
|
|
104
|
+
groupKey:'style',
|
|
105
|
+
handleCustom({action, data}) {
|
|
106
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
107
|
+
setting_id: 'edtix_style_radius',
|
|
108
|
+
key: Date.now()
|
|
109
|
+
})
|
|
110
|
+
.then(res => {
|
|
111
|
+
res.list = res.list.filter(item=>{
|
|
112
|
+
return item.label !== '无';
|
|
113
|
+
});
|
|
114
|
+
data.cb(res.list)
|
|
115
|
+
})
|
|
116
|
+
.catch(error => {
|
|
117
|
+
console.error(error);
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{ele: 'group_end'},
|
|
122
|
+
|
|
123
|
+
{
|
|
124
|
+
label: '描边',
|
|
125
|
+
ele: 'xd-border',
|
|
126
|
+
labelInline: true,
|
|
127
|
+
groupKey:'style',
|
|
128
|
+
valueKey: 'scrollBorder',
|
|
129
|
+
value: defScrollBorder,
|
|
130
|
+
hidden: style !== '2',
|
|
131
|
+
setting: {
|
|
132
|
+
selected:defScrollBorder.type,
|
|
133
|
+
isRadio: true,//启用editx默认
|
|
134
|
+
isDef: true, //启动默认选项
|
|
135
|
+
//==设置默认值==
|
|
136
|
+
color: '#fff',
|
|
137
|
+
width: '0',
|
|
138
|
+
style: 'solid'
|
|
139
|
+
//==设置默认值==
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: '投影',
|
|
144
|
+
ele: 'xd-shadow',
|
|
145
|
+
labelInline: true,
|
|
146
|
+
groupKey:'style',
|
|
147
|
+
valueKey: 'scrollShadow',
|
|
148
|
+
value: defScrollShadow,
|
|
149
|
+
className: 'input100',
|
|
150
|
+
hidden: style !== '2',
|
|
151
|
+
setting: {
|
|
152
|
+
selected: defScrollShadow.type,
|
|
153
|
+
isRadio:true,
|
|
154
|
+
isDef: true,
|
|
155
|
+
default: {
|
|
156
|
+
color:'rgba(0,0,0,0)',
|
|
157
|
+
width:'0',
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
handleCustom({action, data}) {
|
|
161
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
|
|
162
|
+
.then(res => {
|
|
163
|
+
res.list = res.list.filter(item=>{
|
|
164
|
+
return item.label !== '无';
|
|
165
|
+
});
|
|
166
|
+
data.cb(res.list)
|
|
167
|
+
})
|
|
168
|
+
.catch(error => {
|
|
169
|
+
console.error(error);
|
|
170
|
+
data.cb([])
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
{
|
|
176
|
+
label: '外边距',
|
|
177
|
+
ele: 'xd-radio',
|
|
178
|
+
groupKey: 'style',
|
|
179
|
+
valueKey: 'scrollMarginStatus',
|
|
180
|
+
value: statusDataVal({data, key:'scrollMarginStatus', fields:['scrollMargin'],gValue}),
|
|
181
|
+
labelInline:true,
|
|
182
|
+
hidden: style !== '2',
|
|
183
|
+
list: [
|
|
184
|
+
{label: '默认', value: 'D'},
|
|
185
|
+
{label: '自定义', value: 'C'},
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{ele: 'group_start'},
|
|
189
|
+
{
|
|
190
|
+
label: '',
|
|
191
|
+
ele: 'xd-margin-padding',
|
|
192
|
+
groupKey:'style',
|
|
193
|
+
valueKey: 'scrollMargin',
|
|
194
|
+
value: dataVal({
|
|
195
|
+
data,
|
|
196
|
+
key:'scrollMargin',
|
|
197
|
+
dValue:0,
|
|
198
|
+
gValue,
|
|
199
|
+
isPM: true,
|
|
200
|
+
}),
|
|
201
|
+
hidden: style !== '2' || !statusShow({data, key: 'scrollMarginStatus', fields:['scrollMargin'], gValue}),
|
|
202
|
+
setting: {
|
|
203
|
+
type: 'margin',
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{ele: 'group_end'},
|
|
207
|
+
].filter(i=>i)
|
|
208
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import cssThree from "./cssThree";
|
|
4
|
+
import cssTwo from "./cssTwo";
|
|
5
|
+
import cssOne from "./cssOne";
|
|
6
|
+
export default function (data, gValue, gColor, oldData) {
|
|
7
|
+
return [
|
|
8
|
+
...cssOne(data, gValue, gColor, oldData),
|
|
9
|
+
...cssTwo(data, gValue, gColor, oldData),
|
|
10
|
+
...cssThree(data, gValue, gColor, oldData),
|
|
11
|
+
{
|
|
12
|
+
label: '版本号:',
|
|
13
|
+
ele: 'el-input',
|
|
14
|
+
type: 'text',
|
|
15
|
+
groupKey: 'content',
|
|
16
|
+
valueKey: 'version',
|
|
17
|
+
value: 'v2.0',
|
|
18
|
+
hidden: true,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '过滤引用模版字段:',
|
|
22
|
+
ele: 'el-input',
|
|
23
|
+
type: 'text',
|
|
24
|
+
groupKey: 'content',
|
|
25
|
+
valueKey: 'refFilterKey',
|
|
26
|
+
value: '[]',
|
|
27
|
+
hidden: true,
|
|
28
|
+
},
|
|
29
|
+
].filter(i=>i);
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -1,309 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import content from "./cusAttr/content";
|
|
4
|
+
import style from "./cusAttr/style";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
7
8
|
*/
|
|
8
9
|
export default {
|
|
9
10
|
style:[],
|
|
10
|
-
content:(
|
|
11
|
-
let size = {width:750};
|
|
12
|
-
let video = {
|
|
13
|
-
size: Object.assign({},(params.video && params.video.size),size),
|
|
14
|
-
type:'1',
|
|
15
|
-
position: Object.assign({},params.video && params.video.position)
|
|
16
|
-
};
|
|
11
|
+
content:(data, gValue, gColor, oldData={})=>{
|
|
17
12
|
return [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
ele: 'xd-site-poster',
|
|
21
|
-
valueKey: 'video',
|
|
22
|
-
groupKey:'content',
|
|
23
|
-
className: 'input80',
|
|
24
|
-
value:video,
|
|
25
|
-
setting: {
|
|
26
|
-
count: 1,
|
|
27
|
-
scene: {label: '视频', value: 'video'},
|
|
28
|
-
sizeDisabled: {
|
|
29
|
-
wDisabled:true,
|
|
30
|
-
hDisabled: false,
|
|
31
|
-
},
|
|
32
|
-
typeDisabled: true
|
|
33
|
-
},
|
|
34
|
-
handleCustom({action, data}) {
|
|
35
|
-
//设置场景参数
|
|
36
|
-
if(data) {
|
|
37
|
-
data.params = Object.assign({}, {scene: 'video'}, data.params || {})
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
//获取显示内容
|
|
41
|
-
if (action === 'screenList') {
|
|
42
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
|
|
43
|
-
.then(res => {
|
|
44
|
-
data.cb(res['list'])
|
|
45
|
-
})
|
|
46
|
-
.catch(error => {
|
|
47
|
-
console.error(error);
|
|
48
|
-
});
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
//获取返回参数(广告位高度必选项)
|
|
53
|
-
if (action === 'getPosterInfo') {
|
|
54
|
-
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
55
|
-
.then(res => {
|
|
56
|
-
data.cb({list: res.list, selectId: res.selected})
|
|
57
|
-
})
|
|
58
|
-
.catch(error => {
|
|
59
|
-
console.error(error);
|
|
60
|
-
});
|
|
61
|
-
return
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//使用内容分类
|
|
65
|
-
if (action === 'cmsPublishEditxContent') {
|
|
66
|
-
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
67
|
-
.then(res => {
|
|
68
|
-
data.cb(res)
|
|
69
|
-
})
|
|
70
|
-
.catch(error => {
|
|
71
|
-
console.error(error);
|
|
72
|
-
});
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
let loading = XdBus.getParentApi('loading')({});
|
|
77
|
-
//位置列表
|
|
78
|
-
if (action === 'getListPostion') {
|
|
79
|
-
XdBus.getParentApi('getListPosterPosition')(data.params)
|
|
80
|
-
.then(res => {
|
|
81
|
-
loading.close();
|
|
82
|
-
data.cb(res)
|
|
83
|
-
})
|
|
84
|
-
.catch(error => {
|
|
85
|
-
loading.close();
|
|
86
|
-
console.error(error);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
//位置创建
|
|
91
|
-
if (action === 'addPostion') {
|
|
92
|
-
XdBus.getParentApi('addPosterPosition')(data.params)
|
|
93
|
-
.then(res => {
|
|
94
|
-
loading.close();
|
|
95
|
-
data.cb(true)
|
|
96
|
-
})
|
|
97
|
-
.catch(error => {
|
|
98
|
-
console.error(error);
|
|
99
|
-
loading.close();
|
|
100
|
-
data.cb(false)
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
//位置编辑
|
|
105
|
-
if (action === 'editPostion') {
|
|
106
|
-
XdBus.getParentApi('updatePosterPosition')(data.params)
|
|
107
|
-
.then(res => {
|
|
108
|
-
loading.close();
|
|
109
|
-
data.cb(true)
|
|
110
|
-
})
|
|
111
|
-
.catch(error => {
|
|
112
|
-
console.error(error);
|
|
113
|
-
loading.close();
|
|
114
|
-
data.cb(false)
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
//位置删除
|
|
119
|
-
if (action === 'deleltePostion') {
|
|
120
|
-
XdBus.getParentApi('deletePosterPosition')(data.params)
|
|
121
|
-
.then(res => {
|
|
122
|
-
loading.close();
|
|
123
|
-
data.cb(true)
|
|
124
|
-
})
|
|
125
|
-
.catch(error => {
|
|
126
|
-
console.error(error);
|
|
127
|
-
loading.close();
|
|
128
|
-
data.cb(false)
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
//获取广告位内容列表
|
|
133
|
-
if (action === 'getListContent') {
|
|
134
|
-
XdBus.getParentApi('getListPosterContent')(data.params)
|
|
135
|
-
.then(res => {
|
|
136
|
-
loading.close();
|
|
137
|
-
data.cb(res)
|
|
138
|
-
})
|
|
139
|
-
.catch(error => {
|
|
140
|
-
loading.close();
|
|
141
|
-
console.error(error);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
//广告内容创建
|
|
146
|
-
if (action === 'addContent') {
|
|
147
|
-
XdBus.getParentApi('addPosterContent')(data.params)
|
|
148
|
-
.then(res => {
|
|
149
|
-
loading.close();
|
|
150
|
-
data.cb(true)
|
|
151
|
-
})
|
|
152
|
-
.catch(error => {
|
|
153
|
-
console.error(error);
|
|
154
|
-
loading.close();
|
|
155
|
-
data.cb(false)
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
//广告内容编辑
|
|
160
|
-
if (action === 'editContent') {
|
|
161
|
-
XdBus.getParentApi('updatePosterContent')(data.params)
|
|
162
|
-
.then(res => {
|
|
163
|
-
loading.close();
|
|
164
|
-
data.cb(true)
|
|
165
|
-
})
|
|
166
|
-
.catch(error => {
|
|
167
|
-
console.error(error);
|
|
168
|
-
loading.close();
|
|
169
|
-
data.cb(false)
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
//广告内容删除
|
|
174
|
-
if (action === 'deleteContent') {
|
|
175
|
-
XdBus.getParentApi('deletePosterContent')(data.params)
|
|
176
|
-
.then(res => {
|
|
177
|
-
loading.close();
|
|
178
|
-
data.cb(true)
|
|
179
|
-
})
|
|
180
|
-
.catch(error => {
|
|
181
|
-
console.error(error);
|
|
182
|
-
loading.close();
|
|
183
|
-
data.cb(false)
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
//获取广告内容跳转地址类型
|
|
188
|
-
if (action === 'jumpPosterContentType') {
|
|
189
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
|
|
190
|
-
.then(res => {
|
|
191
|
-
loading.close();
|
|
192
|
-
data.cb(res['redirect_type'])
|
|
193
|
-
})
|
|
194
|
-
.catch(error => {
|
|
195
|
-
loading.close();
|
|
196
|
-
console.error(error);
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
//发布
|
|
201
|
-
if (action === 'publish') {
|
|
202
|
-
console.log('publish', data.params)
|
|
203
|
-
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
204
|
-
.then(res => {
|
|
205
|
-
loading.close();
|
|
206
|
-
data.cb(res)
|
|
207
|
-
})
|
|
208
|
-
.catch(error => {
|
|
209
|
-
loading.close();
|
|
210
|
-
console.error(error);
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
//获取站内页面地址
|
|
215
|
-
if (action === 'router') {
|
|
216
|
-
loading.close()
|
|
217
|
-
return XdBus.getParentApi('getPagesTree');
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
//通知页面进行刷新
|
|
222
|
-
if(action === 'update') {
|
|
223
|
-
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
224
|
-
loading.close()
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
rules: [
|
|
228
|
-
{
|
|
229
|
-
required: true,
|
|
230
|
-
validator: (rule, value, callback) => {
|
|
231
|
-
let message = '请设置视频位置相关内容';
|
|
232
|
-
if(!value) {
|
|
233
|
-
callback(message);
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
if(value.size && !value.size.height){
|
|
237
|
-
callback(message);
|
|
238
|
-
return
|
|
239
|
-
}
|
|
240
|
-
// if(value.position && (!value.position['position_name'] || !value.position['position_id'])) {
|
|
241
|
-
// callback(message);
|
|
242
|
-
// return
|
|
243
|
-
// }
|
|
244
|
-
callback()
|
|
245
|
-
},trigger: ['blur', 'change']
|
|
246
|
-
}
|
|
247
|
-
],
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
label: '背景颜色:',
|
|
251
|
-
ele: 'xd-color',
|
|
252
|
-
valueKey: 'bgColor',
|
|
253
|
-
groupKey:'style',
|
|
254
|
-
value: params.bgColor || '',
|
|
255
|
-
placeholder: '请选择背景颜色',
|
|
256
|
-
classNmae: 'input80',
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
label: '内容圆角设置:',
|
|
260
|
-
ele: 'xd-site-select-list',
|
|
261
|
-
valueKey: 'radius',
|
|
262
|
-
groupKey:'style',
|
|
263
|
-
value: params['radius'] || '0',
|
|
264
|
-
placeholder: '请选择内容圆角设置',
|
|
265
|
-
multiple: false,
|
|
266
|
-
className: 'input60',
|
|
267
|
-
handleCustom({action, data}) {
|
|
268
|
-
XdBus.getParentApi('getOptionsSettingList')({
|
|
269
|
-
setting_id: 'edtix_style_radius',
|
|
270
|
-
key: Date.now()
|
|
271
|
-
})
|
|
272
|
-
.then(res => {
|
|
273
|
-
data.cb(res.list)
|
|
274
|
-
})
|
|
275
|
-
.catch(error => {
|
|
276
|
-
console.error(error);
|
|
277
|
-
});
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
label: '视频位边距设置:',
|
|
282
|
-
ele: 'xd-margin-padding',
|
|
283
|
-
valueKey: 'margin',
|
|
284
|
-
groupKey:'style',
|
|
285
|
-
value: params.margin || null,
|
|
286
|
-
setting: {
|
|
287
|
-
type: 'margin',
|
|
288
|
-
},
|
|
289
|
-
placeholder: '请设置视频位边距设置',
|
|
290
|
-
inline: false,
|
|
291
|
-
notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
label: '视频位填充设置:',
|
|
295
|
-
ele: 'xd-margin-padding',
|
|
296
|
-
valueKey: 'padding',
|
|
297
|
-
groupKey:'style',
|
|
298
|
-
value: params.padding || null,
|
|
299
|
-
setting: {
|
|
300
|
-
type: 'padding',
|
|
301
|
-
},
|
|
302
|
-
placeholder: '请设置视频位填充设置',
|
|
303
|
-
inline: false,
|
|
304
|
-
notice: '设置填充设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
|
|
305
|
-
},
|
|
306
|
-
|
|
13
|
+
...content(data, gValue,gColor,oldData),
|
|
14
|
+
...style(data, gValue, gColor, oldData)
|
|
307
15
|
].filter(i=>i)
|
|
308
16
|
},
|
|
309
17
|
advanced: [
|