jufubao-base 1.0.118 → 1.0.119-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.
Files changed (74) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseCard/Attr.js +380 -287
  3. package/src/components/JfbBaseCard/JfbBaseCard.vue +51 -2
  4. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +0 -4
  5. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +6 -1
  6. package/src/components/JfbBaseConFlashHome/Api.js +60 -0
  7. package/src/components/JfbBaseConFlashHome/Attr.js +129 -0
  8. package/src/components/JfbBaseConFlashHome/JfbBaseConFlashHome.vue +388 -0
  9. package/src/components/JfbBaseConFlashHome/JfbBaseConFlashHomeLess.less +80 -0
  10. package/src/components/JfbBaseConFlashHome/JfbBaseConFlashHomeMixin.js +30 -0
  11. package/src/components/JfbBaseConFlashHome/Mock.js +5 -0
  12. package/src/components/JfbBaseConFlashList/Api.js +60 -0
  13. package/src/components/JfbBaseConFlashList/Attr.js +117 -0
  14. package/src/components/JfbBaseConFlashList/JfbBaseConFlashList.vue +656 -0
  15. package/src/components/JfbBaseConFlashList/JfbBaseConFlashListLess.less +80 -0
  16. package/src/components/JfbBaseConFlashList/JfbBaseConFlashListMixin.js +30 -0
  17. package/src/components/JfbBaseConFlashList/Mock.js +5 -0
  18. package/src/components/JfbBaseConList/JfbBaseConList.vue +4 -2
  19. package/src/components/JfbBaseConPhone/Api.js +70 -0
  20. package/src/components/JfbBaseConPhone/Attr.js +10 -0
  21. package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +486 -0
  22. package/src/components/JfbBaseConPhone/JfbBaseConPhoneLess.less +80 -0
  23. package/src/components/JfbBaseConPhone/JfbBaseConPhoneMixin.js +30 -0
  24. package/src/components/JfbBaseConPhone/Mock.js +26 -0
  25. package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +2 -2
  26. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +1 -1
  27. package/src/components/JfbBaseSaasBlessDetail/Api.js +59 -0
  28. package/src/components/JfbBaseSaasBlessDetail/Attr.js +24 -0
  29. package/src/components/JfbBaseSaasBlessDetail/JfbBaseSaasBlessDetail.vue +315 -0
  30. package/src/components/JfbBaseSaasBlessDetail/JfbBaseSaasBlessDetailLess.less +80 -0
  31. package/src/components/JfbBaseSaasBlessDetail/JfbBaseSaasBlessDetailMixin.js +30 -0
  32. package/src/components/JfbBaseSaasBlessDetail/Mock.js +5 -0
  33. package/src/components/JfbBaseSaasBlessDialog/Api.js +25 -0
  34. package/src/components/JfbBaseSaasBlessDialog/Attr.js +50 -0
  35. package/src/components/JfbBaseSaasBlessDialog/JfbBaseSaasBlessDialog.vue +274 -0
  36. package/src/components/JfbBaseSaasBlessDialog/JfbBaseSaasBlessDialogLess.less +80 -0
  37. package/src/components/JfbBaseSaasBlessDialog/JfbBaseSaasBlessDialogMixin.js +30 -0
  38. package/src/components/JfbBaseSaasBlessDialog/Mock.js +5 -0
  39. package/src/components/JfbBaseSaasBlessReceive/Api.js +25 -0
  40. package/src/components/JfbBaseSaasBlessReceive/Attr.js +24 -0
  41. package/src/components/JfbBaseSaasBlessReceive/JfbBaseSaasBlessReceive.vue +183 -0
  42. package/src/components/JfbBaseSaasBlessReceive/JfbBaseSaasBlessReceiveLess.less +80 -0
  43. package/src/components/JfbBaseSaasBlessReceive/JfbBaseSaasBlessReceiveMixin.js +30 -0
  44. package/src/components/JfbBaseSaasBlessReceive/Mock.js +5 -0
  45. package/src/components/JfbBaseSaasHome/Api.js +48 -0
  46. package/src/components/JfbBaseSaasHome/Attr.js +35 -0
  47. package/src/components/JfbBaseSaasHome/JfbBaseSaasHome.vue +356 -0
  48. package/src/components/JfbBaseSaasHome/JfbBaseSaasHomeLess.less +80 -0
  49. package/src/components/JfbBaseSaasHome/JfbBaseSaasHomeMixin.js +30 -0
  50. package/src/components/JfbBaseSaasHome/Mock.js +5 -0
  51. package/src/components/JfbBaseSaasLogin/Api.js +39 -0
  52. package/src/components/JfbBaseSaasLogin/Attr.js +37 -0
  53. package/src/components/JfbBaseSaasLogin/JfbBaseSaasLogin.vue +410 -0
  54. package/src/components/JfbBaseSaasLogin/JfbBaseSaasLoginLess.less +80 -0
  55. package/src/components/JfbBaseSaasLogin/JfbBaseSaasLoginMixin.js +30 -0
  56. package/src/components/JfbBaseSaasLogin/Mock.js +5 -0
  57. package/src/components/JfbBaseSaasNewsDetail/Api.js +27 -0
  58. package/src/components/JfbBaseSaasNewsDetail/Attr.js +14 -0
  59. package/src/components/JfbBaseSaasNewsDetail/JfbBaseSaasNewsDetail.vue +144 -0
  60. package/src/components/JfbBaseSaasNewsDetail/JfbBaseSaasNewsDetailLess.less +80 -0
  61. package/src/components/JfbBaseSaasNewsDetail/JfbBaseSaasNewsDetailMixin.js +30 -0
  62. package/src/components/JfbBaseSaasNewsDetail/Mock.js +5 -0
  63. package/src/components/JfbBaseSaasNewsList/Api.js +26 -0
  64. package/src/components/JfbBaseSaasNewsList/Attr.js +24 -0
  65. package/src/components/JfbBaseSaasNewsList/JfbBaseSaasNewsList.vue +181 -0
  66. package/src/components/JfbBaseSaasNewsList/JfbBaseSaasNewsListLess.less +80 -0
  67. package/src/components/JfbBaseSaasNewsList/JfbBaseSaasNewsListMixin.js +30 -0
  68. package/src/components/JfbBaseSaasNewsList/Mock.js +5 -0
  69. package/src/components/JfbBaseSassPhoneCollect/Api.js +39 -0
  70. package/src/components/JfbBaseSassPhoneCollect/Attr.js +438 -0
  71. package/src/components/JfbBaseSassPhoneCollect/JfbBaseSassPhoneCollect.vue +266 -0
  72. package/src/components/JfbBaseSassPhoneCollect/JfbBaseSassPhoneCollectLess.less +80 -0
  73. package/src/components/JfbBaseSassPhoneCollect/JfbBaseSassPhoneCollectMixin.js +30 -0
  74. package/src/components/JfbBaseSassPhoneCollect/Mock.js +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.118",
3
+ "version": "1.0.119-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -3,309 +3,402 @@
3
3
  export default {
4
4
  style: [],
5
5
  advanced: [],
6
- content: [
7
- {
8
- label: "票券布局",
9
- ele: "xd-radio",
10
- valueKey: "cardLayout",
11
- value: "1",
12
- list: [
13
- {label: "布局1", value: "1"},
14
- {label: "布局2", value: "2"},
15
- ]
16
- },
17
- {
18
- label: '票券登陆文案:',
19
- ele: 'el-input',
20
- type: 'text',
21
- valueKey: 'login_name',
22
- value: '',
23
- placeholder: '请输入票券登陆文案',
24
- className: 'input80',
25
- inline: false,
26
- notice: '当未设置文案时候,前台页面显示为"<span style="color:red">登录</span>"'
27
- },
28
- {
29
- label: '失效卡列表地址:', //label
30
- ele: 'xd-select-pages-path', //package 名称
31
- valueKey: 'disabled_url', //form[valueKey]
32
- placeholder: '请选择失效卡列表地址',
33
- value: null,
34
- setting: {
35
- router: XdBus.getParentApi('getPagesTree'),
6
+ content: (data) => {
7
+ return [
8
+ {
9
+ label: "票券布局",
10
+ ele: "xd-radio",
11
+ valueKey: "cardLayout",
12
+ value: data.cardLayout || "1",
13
+ list: [
14
+ {label: "布局1", value: "1"},
15
+ {label: "布局2", value: "2"},
16
+ ]
36
17
  },
37
- inline: false,
38
- },
39
- {
40
- label: '卡券详情地址:', //label
41
- ele: 'xd-select-pages-path', //package 名称
42
- valueKey: 'detail_url', //form[valueKey]
43
- placeholder: '请选择卡券详情地址',
44
- value: null,
45
- setting: {
46
- router: XdBus.getParentApi('getPagesTree'),
18
+ {
19
+ label: '票券登陆文案:',
20
+ ele: 'el-input',
21
+ type: 'text',
22
+ valueKey: 'login_name',
23
+ value: data.login_name || '',
24
+ placeholder: '请输入票券登陆文案',
25
+ className: 'input80',
26
+ inline: false,
27
+ notice: '当未设置文案时候,前台页面显示为"<span style="color:red">登录</span>"'
47
28
  },
48
- inline: false,
49
- },
50
- {
51
- label: '卡券转换地址:', //label
52
- ele: 'xd-select-pages-path', //package 名称
53
- valueKey: 'change_url', //form[valueKey]
54
- placeholder: '请选择卡券转换地址',
55
- value: null,
56
- setting: {
57
- router: XdBus.getParentApi('getPagesTree'),
29
+ {
30
+ label: "登录文字大小",
31
+ ele: "el-input",
32
+ type: "number",
33
+ valueKey: "login_text_size",
34
+ value: data.login_text_size || 24,
35
+ placeholder: "请输入登录文字大小",
36
+ className: "input80",
37
+ inline: false,
58
38
  },
59
- inline: false,
60
- },
61
- {
62
- label: '卡券密码绑定地址:', //label
63
- ele: 'xd-select-pages-path', //package 名称
64
- valueKey: 'bind_url', //form[valueKey]
65
- placeholder: '请选择卡券密码绑定地址',
66
- value: null,
67
- setting: {
68
- router: XdBus.getParentApi('getPagesTree'),
39
+ {
40
+ label: "登录字体颜色配置",
41
+ ele: 'xd-color',
42
+ valueKey: "login_text_color",
43
+ value: data.login_text_color || '',
44
+ className: "input80",
45
+ inline: false,
69
46
  },
70
- inline: false,
71
- },
72
- {
73
- label: '扫码绑定卡券确认地址:', //label
74
- ele: 'xd-select-pages-path', //package 名称
75
- valueKey: 'confirm_url', //form[valueKey]
76
- placeholder: '请选择扫码绑定卡券确认地址',
77
- value: null,
78
- setting: {
79
- router: XdBus.getParentApi('getPagesTree'),
47
+ {
48
+ label: "登录背景颜色配置",
49
+ ele: 'xd-color',
50
+ valueKey: "login_text_bg_color",
51
+ value: data.login_text_bg_color || '',
52
+ className: "input80",
53
+ inline: false,
80
54
  },
81
- inline: false,
82
- },
83
- {
84
- label: '综合福利入口页:',
85
- ele: 'xd-select-pages-path',
86
- valueKey: 'allEntryPath',
87
- placeholder: '请选择综合福利入口页',
88
- value: null,
89
- setting: {
90
- router: XdBus.getParentApi('getPagesTree'),
91
- },
92
- inline: false,
93
- },
94
- {
95
- label: '提示内容:',
96
- ele: 'xd-site-news',
97
- valueKey: 'notice',
98
- value: null,
99
- className: 'input70',
100
- setting: {
101
- config: {
102
- sort: true,
103
- maxlen: 100,
104
- action: 'aliyun',
105
- size: 5,
106
- tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
107
- uploadType: 'aliyun',
108
- type: ['jpg', 'png', 'jpeg']
109
- },
110
- },
111
- handleCustom({action, data}) {
112
- if (data && data.params) {
113
- //当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
114
- //data.params = Object.assign({}, data.params, {code: 'g_test_id'});
115
- }
116
-
117
- //获取返回参数(场景类型名称为必填)
118
- let loading = XdBus.getParentApi('loading')({});
119
-
120
- //获取显示内容
121
- if (action === 'screen') {
122
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
123
- .then(res => {
124
- loading.close();
125
- data.cb(res['list'])
126
- })
127
- .catch(error => {
128
- console.error(error);
129
- loading.close();
130
- });
131
-
132
- }
133
-
134
- //获取返回参数(广告位高度必选项)
135
- if (action === 'getNewsInfo') {
136
- XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
137
- .then(res => {
138
- loading.close()
139
- data.cb({list: res.list, selectId: res.selected})
140
- })
141
- .catch(error => {
142
- loading.close()
143
- console.error(error);
144
- });
145
- }
146
-
147
- //获取产品业务线列表
148
- if (action === 'namespace') {
149
- XdBus.getParentApi('getOptionsNamespaces')({})
150
- .then(res => {
151
- loading.close()
152
- data.cb(res['list'])
153
- })
154
- .catch(error => {
155
- loading.close()
156
- console.error(error);
157
- });
158
- }
159
-
160
- //使用内容分类
161
- if (action === 'cmsPublishEditxContent') {
162
- XdBus.getParentApi('cmsPublishEditxContent')(data.params)
55
+ {
56
+ label: "登录按钮圆角配置",
57
+ ele: 'xd-site-select-list',
58
+ valueKey: "login_text_radius",
59
+ value: data.login_text_radius || '',
60
+ placeholder: '请选择内容圆角设置',
61
+ multiple: false,
62
+ className: 'input80',
63
+ handleCustom({action, data}) {
64
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
163
65
  .then(res => {
164
- console.log('cmsPublishEditxContent', res)
165
- loading.close();
166
- data.cb(res)
66
+ data.cb(res.list)
167
67
  })
168
68
  .catch(error => {
169
- loading.close();
170
69
  console.error(error);
171
70
  });
172
- }
173
-
174
- //位置列表
175
- if (action === 'getListPostion') {
176
- XdBus.getParentApi('getListNewsPosition')(data.params)
177
- .then(res => {
178
- loading.close();
179
- data.cb(res)
180
- })
181
- .catch(error => {
182
- loading.close();
183
- console.error(error);
184
- });
185
- }
186
-
187
- //位置创建
188
- if (action === 'addPostion') {
189
- XdBus.getParentApi('addNewsPosition')(data.params)
190
- .then(res => {
191
- loading.close();
192
- data.cb(true)
193
- })
194
- .catch(error => {
195
- console.error(error);
196
- loading.close();
197
- data.cb(false)
198
- });
199
- }
200
-
201
- //位置编辑
202
- if (action === 'editPostion') {
203
- XdBus.getParentApi('updateNewsPosition')(data.params)
204
- .then(res => {
205
- loading.close();
206
- data.cb(true)
207
- })
208
- .catch(error => {
209
- console.error(error);
210
- loading.close();
211
- data.cb(false)
212
- });
213
- }
214
-
215
- //位置删除
216
- if (action === 'deleltePostion') {
217
- XdBus.getParentApi('deleteNewsPosition')(data.params)
218
- .then(res => {
219
- loading.close();
220
- data.cb(true)
221
- })
222
- .catch(error => {
223
- console.error(error);
224
- loading.close();
225
- data.cb(false)
226
- });
227
- }
228
-
229
- //获取广告位内容列表
230
- if (action === 'getListContent') {
231
- XdBus.getParentApi('getListNewsContent')(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 === 'addContent') {
244
- XdBus.getParentApi('addNewsContent')(data.params)
245
- .then(res => {
246
- loading.close();
247
- data.cb(true)
248
- })
249
- .catch(error => {
250
- console.error(error);
251
- loading.close();
252
- data.cb(false)
253
- });
254
- }
255
-
256
- //广告内容编辑
257
- if (action === 'editContent') {
258
- XdBus.getParentApi('updateNewsContent')(data.params)
259
- .then(res => {
260
- loading.close();
261
- data.cb(true)
262
- })
263
- .catch(error => {
264
- console.error(error);
265
- loading.close();
266
- data.cb(false)
267
- });
268
- }
269
-
270
- //广告内容删除
271
- if (action === 'deleteContent') {
272
- XdBus.getParentApi('deleteNewsContent')(data.params)
273
- .then(res => {
274
- loading.close();
275
- data.cb(true)
276
- })
277
- .catch(error => {
278
- console.error(error);
279
- loading.close();
280
- data.cb(false)
281
- });
282
- }
71
+ },
72
+ },
283
73
 
284
- //内容发布
285
- if (action === 'publish') {
286
- console.log('publish', data.params)
287
- XdBus.getParentApi('cmsPublishContent')(data.params)
74
+ {
75
+ label: "查看文字大小",
76
+ ele: "el-input",
77
+ type: "number",
78
+ valueKey: "look_text_size",
79
+ value: data.look_text_size || 24,
80
+ placeholder: "请输入登录文字大小",
81
+ className: "input80",
82
+ inline: false,
83
+ },
84
+ {
85
+ label: "查看字体颜色配置",
86
+ ele: 'xd-color',
87
+ valueKey: "look_text_color",
88
+ value: data.look_text_color || '',
89
+ className: "input80",
90
+ inline: false,
91
+ },
92
+ {
93
+ label: "查看背景颜色配置",
94
+ ele: 'xd-color',
95
+ valueKey: "look_text_bg_color",
96
+ value: data.look_text_bg_color || '',
97
+ className: "input80",
98
+ inline: false,
99
+ },
100
+ {
101
+ label: "查看按钮圆角配置",
102
+ ele: 'xd-site-select-list',
103
+ valueKey: "look_text_radius",
104
+ value: data.look_text_radius || '',
105
+ placeholder: '请选择内容圆角设置',
106
+ multiple: false,
107
+ className: 'input80',
108
+ handleCustom({action, data}) {
109
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
288
110
  .then(res => {
289
- loading.close();
290
- data.cb(res)
111
+ data.cb(res.list)
291
112
  })
292
113
  .catch(error => {
293
- loading.close();
294
114
  console.error(error);
295
115
  });
296
- }
116
+ },
117
+ },
297
118
 
298
- //通知页面进行刷新
299
- if (action === 'update') {
300
- XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
301
- loading.close()
302
- }
119
+
120
+ {
121
+ label: '失效卡列表地址:', //label
122
+ ele: 'xd-select-pages-path', //package 名称
123
+ valueKey: 'disabled_url', //form[valueKey]
124
+ placeholder: '请选择失效卡列表地址',
125
+ value: data.disabled_url || null,
126
+ setting: {
127
+ router: XdBus.getParentApi('getPagesTree'),
128
+ },
129
+ inline: false,
130
+ },
131
+ {
132
+ label: '卡券详情地址:', //label
133
+ ele: 'xd-select-pages-path', //package 名称
134
+ valueKey: 'detail_url', //form[valueKey]
135
+ placeholder: '请选择卡券详情地址',
136
+ value: data.detail_url || null,
137
+ setting: {
138
+ router: XdBus.getParentApi('getPagesTree'),
139
+ },
140
+ inline: false,
141
+ },
142
+ {
143
+ label: '卡券转换地址:', //label
144
+ ele: 'xd-select-pages-path', //package 名称
145
+ valueKey: 'change_url', //form[valueKey]
146
+ placeholder: '请选择卡券转换地址',
147
+ value: data.change_url || null,
148
+ setting: {
149
+ router: XdBus.getParentApi('getPagesTree'),
150
+ },
151
+ inline: false,
152
+ },
153
+ {
154
+ label: '卡券密码绑定地址:', //label
155
+ ele: 'xd-select-pages-path', //package 名称
156
+ valueKey: 'bind_url', //form[valueKey]
157
+ placeholder: '请选择卡券密码绑定地址',
158
+ value: data.bind_url || null,
159
+ setting: {
160
+ router: XdBus.getParentApi('getPagesTree'),
161
+ },
162
+ inline: false,
163
+ },
164
+ {
165
+ label: '扫码绑定卡券确认地址:', //label
166
+ ele: 'xd-select-pages-path', //package 名称
167
+ valueKey: 'confirm_url', //form[valueKey]
168
+ placeholder: '请选择扫码绑定卡券确认地址',
169
+ value: data.confirm_url || null,
170
+ setting: {
171
+ router: XdBus.getParentApi('getPagesTree'),
172
+ },
173
+ inline: false,
174
+ },
175
+ {
176
+ label: '综合福利入口页:',
177
+ ele: 'xd-select-pages-path',
178
+ valueKey: 'allEntryPath',
179
+ placeholder: '请选择综合福利入口页',
180
+ value: null,
181
+ setting: {
182
+ router: XdBus.getParentApi('getPagesTree'),
183
+ },
184
+ inline: false,
185
+ },
186
+ {
187
+ label: '提示内容:',
188
+ ele: 'xd-site-news',
189
+ valueKey: 'notice',
190
+ value: data.notice || null,
191
+ className: 'input70',
192
+ setting: {
193
+ config: {
194
+ sort: true,
195
+ maxlen: 100,
196
+ action: 'aliyun',
197
+ size: 5,
198
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
199
+ uploadType: 'aliyun',
200
+ type: ['jpg', 'png', 'jpeg']
201
+ },
202
+ },
203
+ handleCustom({action, data}) {
204
+ if (data && data.params) {
205
+ //当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
206
+ //data.params = Object.assign({}, data.params, {code: 'g_test_id'});
207
+ }
208
+
209
+ //获取返回参数(场景类型名称为必填)
210
+ let loading = XdBus.getParentApi('loading')({});
211
+
212
+ //获取显示内容
213
+ if (action === 'screen') {
214
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
215
+ .then(res => {
216
+ loading.close();
217
+ data.cb(res['list'])
218
+ })
219
+ .catch(error => {
220
+ console.error(error);
221
+ loading.close();
222
+ });
223
+
224
+ }
225
+
226
+ //获取返回参数(广告位高度必选项)
227
+ if (action === 'getNewsInfo') {
228
+ XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
229
+ .then(res => {
230
+ loading.close()
231
+ data.cb({list: res.list, selectId: res.selected})
232
+ })
233
+ .catch(error => {
234
+ loading.close()
235
+ console.error(error);
236
+ });
237
+ }
238
+
239
+ //获取产品业务线列表
240
+ if (action === 'namespace') {
241
+ XdBus.getParentApi('getOptionsNamespaces')({})
242
+ .then(res => {
243
+ loading.close()
244
+ data.cb(res['list'])
245
+ })
246
+ .catch(error => {
247
+ loading.close()
248
+ console.error(error);
249
+ });
250
+ }
251
+
252
+ //使用内容分类
253
+ if (action === 'cmsPublishEditxContent') {
254
+ XdBus.getParentApi('cmsPublishEditxContent')(data.params)
255
+ .then(res => {
256
+ console.log('cmsPublishEditxContent', res)
257
+ loading.close();
258
+ data.cb(res)
259
+ })
260
+ .catch(error => {
261
+ loading.close();
262
+ console.error(error);
263
+ });
264
+ }
265
+
266
+ //位置列表
267
+ if (action === 'getListPostion') {
268
+ XdBus.getParentApi('getListNewsPosition')(data.params)
269
+ .then(res => {
270
+ loading.close();
271
+ data.cb(res)
272
+ })
273
+ .catch(error => {
274
+ loading.close();
275
+ console.error(error);
276
+ });
277
+ }
278
+
279
+ //位置创建
280
+ if (action === 'addPostion') {
281
+ XdBus.getParentApi('addNewsPosition')(data.params)
282
+ .then(res => {
283
+ loading.close();
284
+ data.cb(true)
285
+ })
286
+ .catch(error => {
287
+ console.error(error);
288
+ loading.close();
289
+ data.cb(false)
290
+ });
291
+ }
292
+
293
+ //位置编辑
294
+ if (action === 'editPostion') {
295
+ XdBus.getParentApi('updateNewsPosition')(data.params)
296
+ .then(res => {
297
+ loading.close();
298
+ data.cb(true)
299
+ })
300
+ .catch(error => {
301
+ console.error(error);
302
+ loading.close();
303
+ data.cb(false)
304
+ });
305
+ }
306
+
307
+ //位置删除
308
+ if (action === 'deleltePostion') {
309
+ XdBus.getParentApi('deleteNewsPosition')(data.params)
310
+ .then(res => {
311
+ loading.close();
312
+ data.cb(true)
313
+ })
314
+ .catch(error => {
315
+ console.error(error);
316
+ loading.close();
317
+ data.cb(false)
318
+ });
319
+ }
320
+
321
+ //获取广告位内容列表
322
+ if (action === 'getListContent') {
323
+ XdBus.getParentApi('getListNewsContent')(data.params)
324
+ .then(res => {
325
+ loading.close();
326
+ data.cb(res)
327
+ })
328
+ .catch(error => {
329
+ loading.close();
330
+ console.error(error);
331
+ });
332
+ }
333
+
334
+ //广告内容创建
335
+ if (action === 'addContent') {
336
+ XdBus.getParentApi('addNewsContent')(data.params)
337
+ .then(res => {
338
+ loading.close();
339
+ data.cb(true)
340
+ })
341
+ .catch(error => {
342
+ console.error(error);
343
+ loading.close();
344
+ data.cb(false)
345
+ });
346
+ }
347
+
348
+ //广告内容编辑
349
+ if (action === 'editContent') {
350
+ XdBus.getParentApi('updateNewsContent')(data.params)
351
+ .then(res => {
352
+ loading.close();
353
+ data.cb(true)
354
+ })
355
+ .catch(error => {
356
+ console.error(error);
357
+ loading.close();
358
+ data.cb(false)
359
+ });
360
+ }
361
+
362
+ //广告内容删除
363
+ if (action === 'deleteContent') {
364
+ XdBus.getParentApi('deleteNewsContent')(data.params)
365
+ .then(res => {
366
+ loading.close();
367
+ data.cb(true)
368
+ })
369
+ .catch(error => {
370
+ console.error(error);
371
+ loading.close();
372
+ data.cb(false)
373
+ });
374
+ }
375
+
376
+ //内容发布
377
+ if (action === 'publish') {
378
+ console.log('publish', data.params)
379
+ XdBus.getParentApi('cmsPublishContent')(data.params)
380
+ .then(res => {
381
+ loading.close();
382
+ data.cb(res)
383
+ })
384
+ .catch(error => {
385
+ loading.close();
386
+ console.error(error);
387
+ });
388
+ }
389
+
390
+ //通知页面进行刷新
391
+ if (action === 'update') {
392
+ XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
393
+ loading.close()
394
+ }
395
+ },
396
+ inline: false,
397
+ notice: '',
398
+ rules: [
399
+ {required: true, message: '请配置温馨提示内容', trigger: 'change'},
400
+ ],
303
401
  },
304
- inline: false,
305
- notice: '',
306
- rules: [
307
- {required: true, message: '请配置温馨提示内容', trigger: 'change'},
308
- ],
309
- },
310
- ],
402
+ ].filter(i => i)
403
+ },
311
404
  };