jufubao-movie 1.0.39-beta9 → 1.0.40

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.
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ import PosterAttr from "./PosterAttr.js";
4
+
3
5
  /**
4
6
  * @description 当表单组件中有联动操作时候,使用方法进行返回
5
7
  */
@@ -8,15 +10,7 @@ export default {
8
10
  content: (data) => {
9
11
  let outSpacing = 20;
10
12
  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
- };
13
+
20
14
  return [
21
15
 
22
16
  {
@@ -112,236 +106,9 @@ export default {
112
106
  });
113
107
  },
114
108
  },
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
109
 
110
+ //广告属性配置
111
+ ...PosterAttr(data,outSpacing),
345
112
 
346
113
  {
347
114
  label: '外边间距:',
@@ -101,11 +101,11 @@
101
101
  },
102
102
  handleDetail(item){
103
103
  console.log('handleDetail.item',item,item.id);
104
- this.$emit('on-film-detail',item.id);
104
+ this.$emit('on-film-detail',item);
105
105
  },
106
106
  handleBuy(item){
107
107
  console.log('handleDetail.item',item,item.id);
108
- this.$emit('on-buy',item.id);
108
+ this.$emit('on-buy',item);
109
109
  }
110
110
  }
111
111
  }