jufubao-base 1.0.311-beta101 → 1.0.311-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.
- package/package.json +1 -1
- package/src/components/JfbBaseBlock/Attr.js +34 -167
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +9 -12
- package/src/components/JfbBaseCardDetail/Attr.js +12 -0
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +162 -1
- package/src/components/JfbBaseCardDetailEntry/Attr.js +12 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +163 -2
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +2 -2
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +3 -3
- package/src/components/JfbBaseEntry/Attr.js +72 -5
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +47 -183
- package/src/components/JfbBaseImageBlock/Attr.js +23 -150
- package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +27 -29
- package/src/components/JfbBaseNotice/Attr.js +512 -5
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +181 -188
- package/src/components/JfbBaseVideo/Attr.js +297 -5
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +62 -36
- package/src/components/JfbBaseEntry/cusAttr/content.js +0 -77
- package/src/components/JfbBaseEntry/cusAttr/style.js +0 -288
- package/src/components/JfbBaseNotice/cusAttr/content.js +0 -308
- package/src/components/JfbBaseNotice/cusAttr/cssOne.js +0 -395
- package/src/components/JfbBaseNotice/cusAttr/cssThree.js +0 -101
- package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +0 -208
- package/src/components/JfbBaseNotice/cusAttr/style.js +0 -31
- package/src/components/JfbBaseVideo/cusAttr/content.js +0 -236
- package/src/components/JfbBaseVideo/cusAttr/image.js +0 -213
- package/src/components/JfbBaseVideo/cusAttr/style.js +0 -172
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
import {
|
|
3
|
-
dataVal ,
|
|
4
|
-
statusShow,
|
|
5
|
-
statusDataVal,
|
|
6
|
-
customVal,
|
|
7
|
-
cusDisabled ,
|
|
8
|
-
getCustomAttr,
|
|
9
|
-
} from "@/utils/AttrTools";
|
|
10
|
-
|
|
11
|
-
export default function (data, gValue, gColor, oldData) {
|
|
12
|
-
const width = 750, height = 1334;
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
ele: 'title',
|
|
16
|
-
label: '常规',
|
|
17
|
-
size: 'small',
|
|
18
|
-
groupKey:'style',
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
label: '外边距',
|
|
23
|
-
ele: 'xd-radio',
|
|
24
|
-
groupKey: 'style',
|
|
25
|
-
valueKey: 'marginStatus',
|
|
26
|
-
value: statusDataVal({data, key:'marginStatus', fields:['margin'],gValue}),
|
|
27
|
-
labelInline:true,
|
|
28
|
-
list: [
|
|
29
|
-
{label: '默认', value: 'D'},
|
|
30
|
-
{label: '自定义', value: 'C'},
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
{ele: 'group_start'},
|
|
34
|
-
{
|
|
35
|
-
label: '',
|
|
36
|
-
ele: 'xd-margin-padding',
|
|
37
|
-
groupKey:'style',
|
|
38
|
-
valueKey: 'margin',
|
|
39
|
-
value: dataVal({
|
|
40
|
-
data,
|
|
41
|
-
key:'margin',
|
|
42
|
-
dValue:0,
|
|
43
|
-
gValue,
|
|
44
|
-
isPM: true,
|
|
45
|
-
}),
|
|
46
|
-
hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
|
|
47
|
-
setting: {
|
|
48
|
-
type: 'margin',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{ele: 'group_end'},
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
label: '圆角',
|
|
55
|
-
ele: 'xd-radio',
|
|
56
|
-
groupKey: 'style',
|
|
57
|
-
valueKey: 'radiusStatus',
|
|
58
|
-
value: statusDataVal({data, key:'radiusStatus', fields:['radius'],gValue}),
|
|
59
|
-
labelInline:true,
|
|
60
|
-
list: [
|
|
61
|
-
{label: '默认', value: 'D'},
|
|
62
|
-
{label: '无圆角', value: 'N'},
|
|
63
|
-
{label: '自定义', value: 'C'},
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
{ele: 'group_start'},
|
|
67
|
-
{
|
|
68
|
-
label: '',
|
|
69
|
-
ele: 'xd-site-select-list',
|
|
70
|
-
labelInline: true,
|
|
71
|
-
valueKey: 'radius',
|
|
72
|
-
value: dataVal({data, key:'radius', dValue:'10', gValue}),
|
|
73
|
-
hidden: !statusShow({data, key: 'radiusStatus', fields:['radius'], gValue}),
|
|
74
|
-
placeholder: '请选择图标圆角',
|
|
75
|
-
multiple: false,
|
|
76
|
-
className: 'input80',
|
|
77
|
-
groupKey:'style',
|
|
78
|
-
handleCustom({action, data}) {
|
|
79
|
-
XdBus.getParentApi('getOptionsSettingList')({
|
|
80
|
-
setting_id: 'edtix_style_radius',
|
|
81
|
-
key: Date.now()
|
|
82
|
-
})
|
|
83
|
-
.then(res => {
|
|
84
|
-
let list = (res.list || [])
|
|
85
|
-
.filter(item=>{
|
|
86
|
-
return item.label !== '无'
|
|
87
|
-
});
|
|
88
|
-
data.cb(list)
|
|
89
|
-
})
|
|
90
|
-
.catch(error => {
|
|
91
|
-
console.error(error);
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
{ele: 'group_end'},
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
ele: 'title',
|
|
99
|
-
label: '內容区',
|
|
100
|
-
size: 'small',
|
|
101
|
-
groupKey:'style',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
label: '内容区背景',
|
|
105
|
-
ele: 'xd-radio',
|
|
106
|
-
groupKey: 'style',
|
|
107
|
-
valueKey: 'bgStatus',
|
|
108
|
-
value: statusDataVal({data, key:'bgStatus', fields:['bgcolor','bgImage'],gValue}),
|
|
109
|
-
labelInline:true,
|
|
110
|
-
list: [
|
|
111
|
-
{label: '默认', value: 'D'},
|
|
112
|
-
{label: '自定义', value: 'C'},
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
|
-
{ele: 'group_start'},
|
|
116
|
-
{
|
|
117
|
-
label: '背景色',
|
|
118
|
-
ele: 'xd-color',
|
|
119
|
-
valueKey: 'bgcolor',
|
|
120
|
-
labelInline:true,
|
|
121
|
-
value: dataVal({data, key:'bgcolor', dValue:'rgba(0,0,0,0)', gValue}),
|
|
122
|
-
hidden: !statusShow({data, key: 'bgStatus', fields:['bgcolor','bgImage'], gValue}),
|
|
123
|
-
groupKey: 'style',
|
|
124
|
-
placeholder: '请输入背景颜色',
|
|
125
|
-
classNmae: 'input80',
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
label: '背景图',
|
|
129
|
-
ele: 'xd-upload',
|
|
130
|
-
labelInline: true,
|
|
131
|
-
valueKey: 'bgImage',
|
|
132
|
-
value: dataVal({
|
|
133
|
-
data,
|
|
134
|
-
key: 'bgImage',
|
|
135
|
-
dValue: {},
|
|
136
|
-
gValue,
|
|
137
|
-
}),
|
|
138
|
-
defaultValue: dataVal({
|
|
139
|
-
data,
|
|
140
|
-
key: 'bgImage',
|
|
141
|
-
dValue: {},
|
|
142
|
-
gValue,
|
|
143
|
-
}),
|
|
144
|
-
slot: true,
|
|
145
|
-
tipsformet: `<span style="font-size: 12px; color: #999">上传文件格式:@imageType@,不超过@size@MB.,建议宽度为:<span style="color:red">${width}*${height}</span></span>`,
|
|
146
|
-
type: ['jpg', 'png', 'jpeg'],
|
|
147
|
-
styleType: 'one',
|
|
148
|
-
uploadType: 'aliyun',
|
|
149
|
-
hidden: !statusShow({ data, key: 'bgStatus', fields: ['bgcolor', 'bgImage'], gValue }),
|
|
150
|
-
oneWidth: 200,
|
|
151
|
-
oneHeight: 200*height/width,
|
|
152
|
-
size: 5,
|
|
153
|
-
action: 'aliyun',
|
|
154
|
-
groupKey: 'style',
|
|
155
|
-
},
|
|
156
|
-
{ele: 'group_end'},
|
|
157
|
-
|
|
158
|
-
{
|
|
159
|
-
label: '内容区边距',
|
|
160
|
-
ele: 'xd-radio',
|
|
161
|
-
groupKey: 'style',
|
|
162
|
-
valueKey: 'paddingStatus',
|
|
163
|
-
value: statusDataVal({data, key:'paddingStatus', fields:['padding'],gValue}),
|
|
164
|
-
labelInline:true,
|
|
165
|
-
list: [
|
|
166
|
-
{label: '默认', value: 'D'},
|
|
167
|
-
{label: '自定义', value: 'C'},
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
|
-
{ele: 'group_start'},
|
|
171
|
-
{
|
|
172
|
-
label: '',
|
|
173
|
-
ele: 'xd-margin-padding',
|
|
174
|
-
groupKey:'style',
|
|
175
|
-
valueKey: 'padding',
|
|
176
|
-
value: dataVal({
|
|
177
|
-
data,
|
|
178
|
-
key:'padding',
|
|
179
|
-
dValue:0,
|
|
180
|
-
gValue,
|
|
181
|
-
isPM: true,
|
|
182
|
-
}),
|
|
183
|
-
hidden: !statusShow({data, key: 'paddingStatus', fields:['padding'], gValue}),
|
|
184
|
-
setting: {
|
|
185
|
-
type: 'margin',
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
{ele: 'group_end'},
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
label: '内容间距',
|
|
192
|
-
ele: 'xd-radio',
|
|
193
|
-
groupKey: 'style',
|
|
194
|
-
valueKey: 'paddingInputStatus',
|
|
195
|
-
value: statusDataVal({data, key:'paddingInputStatus', fields:['paddingInput'],gValue}),
|
|
196
|
-
labelInline:true,
|
|
197
|
-
list: [
|
|
198
|
-
{label: '默认', value: 'D'},
|
|
199
|
-
{label: '自定义', value: 'C'},
|
|
200
|
-
]
|
|
201
|
-
},
|
|
202
|
-
{ele: 'group_start'},
|
|
203
|
-
{
|
|
204
|
-
label: "",
|
|
205
|
-
groupKey: 'style',
|
|
206
|
-
ele: 'xd-slider',
|
|
207
|
-
valueKey: "paddingInput",
|
|
208
|
-
value: dataVal({data, key:'paddingInput', dValue:gValue.isFirst && gValue.isAdd ? 16: 20, gValue}),
|
|
209
|
-
hidden: !statusShow({data, key: 'paddingInputStatus', fields:['paddingInput'], gValue}),
|
|
210
|
-
className: "input80",
|
|
211
|
-
labelInline: true,
|
|
212
|
-
setting:{
|
|
213
|
-
min: 0,
|
|
214
|
-
max: 60,
|
|
215
|
-
step:1,
|
|
216
|
-
showStops:false,
|
|
217
|
-
showInput:false,
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
{ele: 'group_end'},
|
|
221
|
-
|
|
222
|
-
{
|
|
223
|
-
label: '内容圆角',
|
|
224
|
-
ele: 'xd-radio',
|
|
225
|
-
groupKey: 'style',
|
|
226
|
-
valueKey: 'contRadiusStatus',
|
|
227
|
-
value: statusDataVal({data, key:'contRadiusStatus', fields:['contRadius'],gValue}),
|
|
228
|
-
labelInline:true,
|
|
229
|
-
list: [
|
|
230
|
-
{label: '默认', value: 'D'},
|
|
231
|
-
{label: '无圆角', value: 'N'},
|
|
232
|
-
{label: '自定义', value: 'C'},
|
|
233
|
-
]
|
|
234
|
-
},
|
|
235
|
-
{ele: 'group_start'},
|
|
236
|
-
{
|
|
237
|
-
label: '',
|
|
238
|
-
ele: 'xd-site-select-list',
|
|
239
|
-
labelInline: true,
|
|
240
|
-
valueKey: 'contRadius',
|
|
241
|
-
value: dataVal({data, key:'contRadius', dValue:'10', gValue}),
|
|
242
|
-
hidden: !statusShow({data, key: 'contRadiusStatus', fields:['contRadius'], gValue}),
|
|
243
|
-
placeholder: '请选择图标圆角',
|
|
244
|
-
multiple: false,
|
|
245
|
-
className: 'input80',
|
|
246
|
-
groupKey:'style',
|
|
247
|
-
handleCustom({action, data}) {
|
|
248
|
-
XdBus.getParentApi('getOptionsSettingList')({
|
|
249
|
-
setting_id: 'edtix_style_radius',
|
|
250
|
-
key: Date.now()
|
|
251
|
-
})
|
|
252
|
-
.then(res => {
|
|
253
|
-
let list = (res.list || [])
|
|
254
|
-
.filter(item=>{
|
|
255
|
-
return item.label !== '无'
|
|
256
|
-
});
|
|
257
|
-
data.cb(list)
|
|
258
|
-
})
|
|
259
|
-
.catch(error => {
|
|
260
|
-
console.error(error);
|
|
261
|
-
});
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
{ele: 'group_end'},
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
{
|
|
269
|
-
label: '版本号:',
|
|
270
|
-
ele: 'el-input',
|
|
271
|
-
type: 'text',
|
|
272
|
-
groupKey: 'content',
|
|
273
|
-
valueKey: 'version',
|
|
274
|
-
value: 'v2.0',
|
|
275
|
-
hidden: true,
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
label: '过滤引用模版字段:',
|
|
279
|
-
ele: 'el-input',
|
|
280
|
-
type: 'text',
|
|
281
|
-
groupKey: 'content',
|
|
282
|
-
valueKey: 'refFilterKey',
|
|
283
|
-
value: '[]',
|
|
284
|
-
hidden: true,
|
|
285
|
-
},
|
|
286
|
-
].filter(i=>i);
|
|
287
|
-
}
|
|
288
|
-
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import {dataVal} from "@/utils/AttrTools";
|
|
4
|
-
|
|
5
|
-
export default (data, gValue, gColor, oldData)=>{
|
|
6
|
-
let show_tip_icon = 'N';
|
|
7
|
-
if(data['show_tip_icon'] !== undefined) show_tip_icon = data['show_tip_icon'];
|
|
8
|
-
|
|
9
|
-
let style = '1';
|
|
10
|
-
if(data['style'] !== undefined) style = data['style'];
|
|
11
|
-
|
|
12
|
-
let defNotice = {
|
|
13
|
-
type: 'notice',
|
|
14
|
-
position:{},
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return[
|
|
18
|
-
{
|
|
19
|
-
ele: 'title',
|
|
20
|
-
label: '基础',
|
|
21
|
-
size: 'small',
|
|
22
|
-
groupKey:'content',
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
label: '广告内容',
|
|
27
|
-
ele: 'xd-site-news',
|
|
28
|
-
valueKey: 'notice',
|
|
29
|
-
value: dataVal({data, key:'notice', dValue:defNotice, gValue}),
|
|
30
|
-
groupKey:'content',
|
|
31
|
-
className: 'input100',
|
|
32
|
-
labelInline: true,
|
|
33
|
-
setting: {
|
|
34
|
-
config: {
|
|
35
|
-
sort: true,
|
|
36
|
-
maxlen: 100,
|
|
37
|
-
action: 'aliyun',
|
|
38
|
-
size: 5,
|
|
39
|
-
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
|
|
40
|
-
uploadType: 'aliyun',
|
|
41
|
-
type: ['jpg', 'png', 'jpeg']
|
|
42
|
-
},
|
|
43
|
-
isNew: true,
|
|
44
|
-
},
|
|
45
|
-
handleCustom({action, data}) {
|
|
46
|
-
if (data && data.params) {
|
|
47
|
-
//当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
|
|
48
|
-
//data.params = Object.assign({}, data.params, {code: 'g_test_id'});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//获取返回参数(场景类型名称为必填)
|
|
52
|
-
let loading = { close(){}}
|
|
53
|
-
|
|
54
|
-
//获取显示内容
|
|
55
|
-
if (action === 'screen') {
|
|
56
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
|
|
57
|
-
.then(res => {
|
|
58
|
-
loading.close();
|
|
59
|
-
data.cb(res['list'])
|
|
60
|
-
})
|
|
61
|
-
.catch(error => {
|
|
62
|
-
console.error(error);
|
|
63
|
-
loading.close();
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
//获取返回参数(广告位高度必选项)
|
|
69
|
-
if (action === 'getNewsInfo') {
|
|
70
|
-
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
71
|
-
.then(res => {
|
|
72
|
-
loading.close()
|
|
73
|
-
data.cb({list: res.list, selectId: res.selected})
|
|
74
|
-
})
|
|
75
|
-
.catch(error => {
|
|
76
|
-
loading.close()
|
|
77
|
-
console.error(error);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
//获取产品业务线列表
|
|
82
|
-
if (action === 'namespace') {
|
|
83
|
-
XdBus.getParentApi('getOptionsNamespaces')({})
|
|
84
|
-
.then(res => {
|
|
85
|
-
loading.close()
|
|
86
|
-
data.cb(res['list'])
|
|
87
|
-
})
|
|
88
|
-
.catch(error => {
|
|
89
|
-
loading.close()
|
|
90
|
-
console.error(error);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
//使用内容分类
|
|
95
|
-
if (action === 'cmsPublishEditxContent') {
|
|
96
|
-
loading = XdBus.getParentApi('loading')({});
|
|
97
|
-
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
98
|
-
.then(res => {
|
|
99
|
-
console.log('cmsPublishEditxContent', res)
|
|
100
|
-
loading.close();
|
|
101
|
-
data.cb(res)
|
|
102
|
-
})
|
|
103
|
-
.catch(error => {
|
|
104
|
-
loading.close();
|
|
105
|
-
console.error(error);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
//位置列表
|
|
110
|
-
if (action === 'getListPostion') {
|
|
111
|
-
loading = XdBus.getParentApi('loading')({});
|
|
112
|
-
XdBus.getParentApi('getListNewsPosition')(data.params)
|
|
113
|
-
.then(res => {
|
|
114
|
-
loading.close();
|
|
115
|
-
data.cb(res)
|
|
116
|
-
})
|
|
117
|
-
.catch(error => {
|
|
118
|
-
loading.close();
|
|
119
|
-
console.error(error);
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
//位置创建
|
|
124
|
-
if (action === 'addPostion') {
|
|
125
|
-
loading = XdBus.getParentApi('loading')({});
|
|
126
|
-
XdBus.getParentApi('addNewsPosition')(data.params)
|
|
127
|
-
.then(res => {
|
|
128
|
-
loading.close();
|
|
129
|
-
data.cb(true)
|
|
130
|
-
})
|
|
131
|
-
.catch(error => {
|
|
132
|
-
console.error(error);
|
|
133
|
-
loading.close();
|
|
134
|
-
data.cb(false)
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
//位置编辑
|
|
139
|
-
if (action === 'editPostion') {
|
|
140
|
-
loading = XdBus.getParentApi('loading')({});
|
|
141
|
-
XdBus.getParentApi('updateNewsPosition')(data.params)
|
|
142
|
-
.then(res => {
|
|
143
|
-
loading.close();
|
|
144
|
-
data.cb(true)
|
|
145
|
-
})
|
|
146
|
-
.catch(error => {
|
|
147
|
-
console.error(error);
|
|
148
|
-
loading.close();
|
|
149
|
-
data.cb(false)
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
//位置删除
|
|
154
|
-
if (action === 'deleltePostion') {
|
|
155
|
-
loading = XdBus.getParentApi('loading')({});
|
|
156
|
-
XdBus.getParentApi('deleteNewsPosition')(data.params)
|
|
157
|
-
.then(res => {
|
|
158
|
-
loading.close();
|
|
159
|
-
data.cb(true)
|
|
160
|
-
})
|
|
161
|
-
.catch(error => {
|
|
162
|
-
console.error(error);
|
|
163
|
-
loading.close();
|
|
164
|
-
data.cb(false)
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
//获取广告位内容列表
|
|
169
|
-
if (action === 'getListContent') {
|
|
170
|
-
loading = XdBus.getParentApi('loading')({});
|
|
171
|
-
XdBus.getParentApi('getListNewsContent')(data.params)
|
|
172
|
-
.then(res => {
|
|
173
|
-
loading.close();
|
|
174
|
-
data.cb(res)
|
|
175
|
-
})
|
|
176
|
-
.catch(error => {
|
|
177
|
-
loading.close();
|
|
178
|
-
console.error(error);
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
//广告内容创建
|
|
183
|
-
if (action === 'addContent') {
|
|
184
|
-
loading = XdBus.getParentApi('loading')({});
|
|
185
|
-
XdBus.getParentApi('addNewsContent')(data.params)
|
|
186
|
-
.then(res => {
|
|
187
|
-
loading.close();
|
|
188
|
-
data.cb(true)
|
|
189
|
-
})
|
|
190
|
-
.catch(error => {
|
|
191
|
-
console.error(error);
|
|
192
|
-
loading.close();
|
|
193
|
-
data.cb(false)
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
//广告内容编辑
|
|
198
|
-
if (action === 'editContent') {
|
|
199
|
-
loading = XdBus.getParentApi('loading')({});
|
|
200
|
-
XdBus.getParentApi('updateNewsContent')(data.params)
|
|
201
|
-
.then(res => {
|
|
202
|
-
loading.close();
|
|
203
|
-
data.cb(true)
|
|
204
|
-
})
|
|
205
|
-
.catch(error => {
|
|
206
|
-
console.error(error);
|
|
207
|
-
loading.close();
|
|
208
|
-
data.cb(false)
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
//广告内容删除
|
|
213
|
-
if (action === 'deleteContent') {
|
|
214
|
-
loading = XdBus.getParentApi('loading')({});
|
|
215
|
-
XdBus.getParentApi('deleteNewsContent')(data.params)
|
|
216
|
-
.then(res => {
|
|
217
|
-
loading.close();
|
|
218
|
-
data.cb(true)
|
|
219
|
-
})
|
|
220
|
-
.catch(error => {
|
|
221
|
-
console.error(error);
|
|
222
|
-
loading.close();
|
|
223
|
-
data.cb(false)
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
//内容发布
|
|
228
|
-
if (action === 'publish') {
|
|
229
|
-
loading = XdBus.getParentApi('loading')({});
|
|
230
|
-
console.log('publish', data.params)
|
|
231
|
-
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
232
|
-
.then(res => {
|
|
233
|
-
loading.close();
|
|
234
|
-
data.cb(res)
|
|
235
|
-
})
|
|
236
|
-
.catch(error => {
|
|
237
|
-
loading.close();
|
|
238
|
-
console.error(error);
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
//通知页面进行刷新
|
|
243
|
-
if (action === 'update') {
|
|
244
|
-
loading = XdBus.getParentApi('loading')({});
|
|
245
|
-
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
246
|
-
loading.close()
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
inline: false,
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
label: "组件样式",
|
|
253
|
-
ele: "xd-style-image",
|
|
254
|
-
groupKey: 'content',
|
|
255
|
-
valueKey: "style",
|
|
256
|
-
value: style,
|
|
257
|
-
labelInline:true,
|
|
258
|
-
className: 'input100',
|
|
259
|
-
handleCustom(cusRes) {
|
|
260
|
-
XdBus.getParentApi('getCompStylesOptions')({
|
|
261
|
-
layout_ids: 'HW64GfWi8pNTiOZYk0b1o',
|
|
262
|
-
key: Date.now()
|
|
263
|
-
})
|
|
264
|
-
.then(res => {
|
|
265
|
-
cusRes.data.cb(res)
|
|
266
|
-
})
|
|
267
|
-
.catch(error => {
|
|
268
|
-
console.error(error);
|
|
269
|
-
});
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
{ele: 'group_start'},
|
|
274
|
-
{
|
|
275
|
-
label: "提示图标:",
|
|
276
|
-
ele: "xd-radio",
|
|
277
|
-
valueKey: "show_tip_icon",
|
|
278
|
-
value: show_tip_icon,
|
|
279
|
-
groupKey: 'content',
|
|
280
|
-
labelInline: true,
|
|
281
|
-
list: [
|
|
282
|
-
{ label: '显示', value: 'Y' },
|
|
283
|
-
{ label: '隐藏', value: 'N' }
|
|
284
|
-
],
|
|
285
|
-
cusStyle: { marginBottom: show_tip_icon === 'Y' ? 0: '10px!important'},
|
|
286
|
-
hidden: style !== '1',
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
label: "",
|
|
290
|
-
ele: 'xd-upload',
|
|
291
|
-
valueKey: 'staticTipIcon',
|
|
292
|
-
groupKey:'content',
|
|
293
|
-
value: data.staticTipIcon || {},
|
|
294
|
-
defaultValue: data.staticTipIcon || null,
|
|
295
|
-
slot: true,
|
|
296
|
-
tipsformet: '<span style="color: #666; font-size: 12px">上传文件格式:@imageType@,不超过@size@MB。</span>',
|
|
297
|
-
type: ['jpg', 'png', 'jpeg'],
|
|
298
|
-
styleType: 'one',
|
|
299
|
-
uploadType: 'aliyun',
|
|
300
|
-
size: .5,
|
|
301
|
-
action: 'action',
|
|
302
|
-
sort: true,
|
|
303
|
-
cusStyle: { paddingLeft: '92px'},
|
|
304
|
-
hidden: style !== '1' || show_tip_icon !== 'Y',
|
|
305
|
-
},
|
|
306
|
-
{ele: 'group_end'},
|
|
307
|
-
].filter(i=>i)
|
|
308
|
-
}
|