jufubao-base 1.0.63-beta205 → 1.0.63-beta207
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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
mapFnName: 'getListBackgroundContent', //自定义方法名字(必选)
|
|
6
|
+
title: '获取内容',
|
|
7
|
+
path: '/cms/v1/ad-content',
|
|
8
|
+
isRule: false,
|
|
9
|
+
params: {
|
|
10
|
+
scene: ['使用场景', 'String', '选填'],
|
|
11
|
+
container_id: ['插件ID', 'String', '必填'],
|
|
12
|
+
page_id: ['页面ID', 'String', '必填'],
|
|
13
|
+
page_size: ['记录条数', 'Number', '必填'],
|
|
14
|
+
},
|
|
15
|
+
isConsole: true,
|
|
16
|
+
disabled: true,
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
];
|
|
@@ -4,103 +4,221 @@
|
|
|
4
4
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
7
|
-
style:
|
|
8
|
-
content:
|
|
7
|
+
style:[],
|
|
8
|
+
content:(params)=>{
|
|
9
9
|
return [
|
|
10
10
|
{
|
|
11
|
-
label: '
|
|
12
|
-
ele: 'xd-
|
|
13
|
-
valueKey: '
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
17
|
-
rules: [
|
|
18
|
-
{
|
|
19
|
-
required: true,
|
|
20
|
-
message: '请输入占位框背景颜色',
|
|
21
|
-
trigger: 'blur'
|
|
22
|
-
},
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: '选中路径:', //label
|
|
27
|
-
ele: 'xd-select-pages-path', //package 名称
|
|
28
|
-
valueKey: 'select-pages-path', //form[valueKey]
|
|
29
|
-
value: data['select-pages-path'] || {},
|
|
11
|
+
label: '背景图配置:', //label
|
|
12
|
+
ele: 'xd-site-poster', //package 名称
|
|
13
|
+
valueKey: 'background', //form[valueKey]
|
|
14
|
+
className: 'input80',
|
|
15
|
+
value: params.background || {size:{"width":"750","height":"1280"}},
|
|
30
16
|
setting: {
|
|
31
|
-
|
|
17
|
+
count: 1,
|
|
18
|
+
scene: {label: '背景', value: 'normal'},
|
|
19
|
+
width: 750,
|
|
20
|
+
height: 1280
|
|
21
|
+
},
|
|
22
|
+
handleCustom({action, data}) {
|
|
23
|
+
console.log(data,'datadata');
|
|
24
|
+
//设置场景参数
|
|
25
|
+
if(data) {
|
|
26
|
+
data.params = Object.assign({}, {scene: 'normal'}, data.params || {})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//获取显示内容
|
|
30
|
+
if (action === 'screenList') {
|
|
31
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
|
|
32
|
+
.then(res => {
|
|
33
|
+
data.cb(res['list'])
|
|
34
|
+
})
|
|
35
|
+
.catch(error => {
|
|
36
|
+
console.error(error);
|
|
37
|
+
});
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//获取返回参数(广告位高度必选项)
|
|
42
|
+
if (action === 'getPosterInfo') {
|
|
43
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
44
|
+
.then(res => {
|
|
45
|
+
data.cb({list: res.list, selectId: res.selected})
|
|
46
|
+
})
|
|
47
|
+
.catch(error => {
|
|
48
|
+
console.error(error);
|
|
49
|
+
});
|
|
50
|
+
return
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//使用内容分类
|
|
54
|
+
if (action === 'cmsPublishEditxContent') {
|
|
55
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
56
|
+
.then(res => {
|
|
57
|
+
data.cb(res)
|
|
58
|
+
})
|
|
59
|
+
.catch(error => {
|
|
60
|
+
console.error(error);
|
|
61
|
+
});
|
|
62
|
+
return
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let loading = XdBus.getParentApi('loading')({});
|
|
66
|
+
//位置列表
|
|
67
|
+
if (action === 'getListPostion') {
|
|
68
|
+
XdBus.getParentApi('getListPosterPosition')(data.params)
|
|
69
|
+
.then(res => {
|
|
70
|
+
loading.close();
|
|
71
|
+
data.cb(res)
|
|
72
|
+
})
|
|
73
|
+
.catch(error => {
|
|
74
|
+
loading.close();
|
|
75
|
+
console.error(error);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
//位置创建
|
|
80
|
+
if (action === 'addPostion') {
|
|
81
|
+
XdBus.getParentApi('addPosterPosition')(data.params)
|
|
82
|
+
.then(res => {
|
|
83
|
+
loading.close();
|
|
84
|
+
data.cb(true)
|
|
85
|
+
})
|
|
86
|
+
.catch(error => {
|
|
87
|
+
console.error(error);
|
|
88
|
+
loading.close();
|
|
89
|
+
data.cb(false)
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//位置编辑
|
|
94
|
+
if (action === 'editPostion') {
|
|
95
|
+
XdBus.getParentApi('updatePosterPosition')(data.params)
|
|
96
|
+
.then(res => {
|
|
97
|
+
loading.close();
|
|
98
|
+
data.cb(true)
|
|
99
|
+
})
|
|
100
|
+
.catch(error => {
|
|
101
|
+
console.error(error);
|
|
102
|
+
loading.close();
|
|
103
|
+
data.cb(false)
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
//位置删除
|
|
108
|
+
if (action === 'deleltePostion') {
|
|
109
|
+
XdBus.getParentApi('deletePosterPosition')(data.params)
|
|
110
|
+
.then(res => {
|
|
111
|
+
loading.close();
|
|
112
|
+
data.cb(true)
|
|
113
|
+
})
|
|
114
|
+
.catch(error => {
|
|
115
|
+
console.error(error);
|
|
116
|
+
loading.close();
|
|
117
|
+
data.cb(false)
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
//获取广告位内容列表
|
|
122
|
+
if (action === 'getListContent') {
|
|
123
|
+
XdBus.getParentApi('getListPosterContent')(data.params)
|
|
124
|
+
.then(res => {
|
|
125
|
+
loading.close();
|
|
126
|
+
data.cb(res)
|
|
127
|
+
})
|
|
128
|
+
.catch(error => {
|
|
129
|
+
loading.close();
|
|
130
|
+
console.error(error);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
//广告内容创建
|
|
135
|
+
if (action === 'addContent') {
|
|
136
|
+
XdBus.getParentApi('addPosterContent')(data.params)
|
|
137
|
+
.then(res => {
|
|
138
|
+
loading.close();
|
|
139
|
+
data.cb(true)
|
|
140
|
+
})
|
|
141
|
+
.catch(error => {
|
|
142
|
+
console.error(error);
|
|
143
|
+
loading.close();
|
|
144
|
+
data.cb(false)
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
//广告内容编辑
|
|
149
|
+
if (action === 'editContent') {
|
|
150
|
+
XdBus.getParentApi('updatePosterContent')(data.params)
|
|
151
|
+
.then(res => {
|
|
152
|
+
loading.close();
|
|
153
|
+
data.cb(true)
|
|
154
|
+
})
|
|
155
|
+
.catch(error => {
|
|
156
|
+
console.error(error);
|
|
157
|
+
loading.close();
|
|
158
|
+
data.cb(false)
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
//广告内容删除
|
|
163
|
+
if (action === 'deleteContent') {
|
|
164
|
+
XdBus.getParentApi('deletePosterContent')(data.params)
|
|
165
|
+
.then(res => {
|
|
166
|
+
loading.close();
|
|
167
|
+
data.cb(true)
|
|
168
|
+
})
|
|
169
|
+
.catch(error => {
|
|
170
|
+
console.error(error);
|
|
171
|
+
loading.close();
|
|
172
|
+
data.cb(false)
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
//获取广告内容跳转地址类型
|
|
177
|
+
if (action === 'jumpPosterContentType') {
|
|
178
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
|
|
179
|
+
.then(res => {
|
|
180
|
+
loading.close();
|
|
181
|
+
data.cb(res['redirect_type'])
|
|
182
|
+
})
|
|
183
|
+
.catch(error => {
|
|
184
|
+
loading.close();
|
|
185
|
+
console.error(error);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//发布
|
|
190
|
+
if (action === 'publish') {
|
|
191
|
+
console.log('publish', data.params)
|
|
192
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
193
|
+
.then(res => {
|
|
194
|
+
loading.close();
|
|
195
|
+
data.cb(res)
|
|
196
|
+
})
|
|
197
|
+
.catch(error => {
|
|
198
|
+
loading.close();
|
|
199
|
+
console.error(error);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
//获取站内页面地址
|
|
204
|
+
if (action === 'router') {
|
|
205
|
+
loading.close()
|
|
206
|
+
return XdBus.getParentApi('getPagesTree');
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
//通知页面进行刷新
|
|
211
|
+
if(action === 'update') {
|
|
212
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
213
|
+
loading.close()
|
|
214
|
+
}
|
|
32
215
|
},
|
|
33
216
|
inline: false,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
label: '高度:', //label
|
|
37
|
-
ele: 'el-input', //package 名称
|
|
38
|
-
type: 'number',
|
|
39
|
-
valueKey: 'height', //form[valueKey]
|
|
40
|
-
value: data.height || 100, //v-model
|
|
41
|
-
placeholder: '请输入占位框高度,单位像素,默认:10px',
|
|
42
|
-
className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
43
|
-
rules: [
|
|
44
|
-
{
|
|
45
|
-
required: true,
|
|
46
|
-
message: '请输入占位框高度',
|
|
47
|
-
trigger: 'blur'
|
|
48
|
-
},
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: '', //label
|
|
53
|
-
ele: 'slot', //package 名称
|
|
54
|
-
slot: 'is_reference',
|
|
55
|
-
},
|
|
217
|
+
notice: '',
|
|
218
|
+
}
|
|
56
219
|
].filter(i=>i)
|
|
57
220
|
},
|
|
58
221
|
advanced: [
|
|
59
|
-
|
|
60
|
-
label: '背景颜色:', //label
|
|
61
|
-
ele: 'xd-color', //package 名称
|
|
62
|
-
valueKey: 'bgcolor', //form[valueKey]
|
|
63
|
-
value: '', //v-model
|
|
64
|
-
placeholder: '请输入占位框背景颜色',
|
|
65
|
-
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
66
|
-
rules: [
|
|
67
|
-
{
|
|
68
|
-
required: true,
|
|
69
|
-
message: '请输入占位框背景颜色',
|
|
70
|
-
trigger: 'blur'
|
|
71
|
-
},
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: '选中路径:', //label
|
|
76
|
-
ele: 'xd-select-pages-path', //package 名称
|
|
77
|
-
valueKey: 'select-pages-path', //form[valueKey]
|
|
78
|
-
value: null,
|
|
79
|
-
setting: {
|
|
80
|
-
router: XdBus.getParentApi('getPagesTree')
|
|
81
|
-
},
|
|
82
|
-
inline: false,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label: '高度:', //label
|
|
86
|
-
ele: 'el-input', //package 名称
|
|
87
|
-
type: 'number',
|
|
88
|
-
valueKey: 'height', //form[valueKey]
|
|
89
|
-
value: null, //v-model
|
|
90
|
-
placeholder: '请输入占位框高度,单位像素,默认:10px',
|
|
91
|
-
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
92
|
-
rules: [
|
|
93
|
-
{
|
|
94
|
-
required: true,
|
|
95
|
-
message: '请输入占位框高度',
|
|
96
|
-
trigger: 'blur'
|
|
97
|
-
},
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
label: '', //label
|
|
102
|
-
ele: 'slot', //package 名称
|
|
103
|
-
slot: 'is_reference',
|
|
104
|
-
},
|
|
222
|
+
|
|
105
223
|
],
|
|
106
224
|
};
|