jufubao-movie 1.0.39-beta8 → 1.0.39

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.
@@ -0,0 +1,257 @@
1
+ 'use strict';
2
+
3
+ export default (data,outSpacing)=>{
4
+ let size = {width:750 - outSpacing*2,height:null};
5
+ if(data.poster && data.poster.size && data.poster.size.height) {
6
+ size['height'] = data.poster.size.height
7
+ }
8
+ let poster = {
9
+ size: size,
10
+ type:'1',
11
+ position: Object.assign({},data.poster && data.poster.position)
12
+ };
13
+
14
+ return [
15
+ {
16
+ ele: 'title',
17
+ label: '广告设置',
18
+ size: 'small',
19
+ groupKey:'content',
20
+ },
21
+
22
+ {
23
+ label: '广告位置配置:',
24
+ ele: 'xd-site-poster',
25
+ valueKey: 'poster',
26
+ className: 'input80',
27
+ value: poster,
28
+ groupKey:'content',
29
+ setting: {
30
+ count: 1,
31
+ scene: {label: '广告', value: 'normal'},
32
+ sizeDisabled: {
33
+ wDisabled:true,
34
+ hDisabled: false,
35
+ },
36
+ typeDisabled: true
37
+ },
38
+ handleCustom({action, data}) {
39
+ //设置场景参数
40
+ if(data) {
41
+ data.params = Object.assign({}, {scene: 'normal'}, data.params || {})
42
+ }
43
+ console.log(action,data,'hjhjhjhjhj');
44
+
45
+ //获取显示内容
46
+ if (action === 'screenList') {
47
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
48
+ .then(res => {
49
+ data.cb(res['list'])
50
+ })
51
+ .catch(error => {
52
+ console.error(error);
53
+ });
54
+ return
55
+ }
56
+
57
+ //获取返回参数(广告位高度必选项)
58
+ if (action === 'getPosterInfo') {
59
+ XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
60
+ .then(res => {
61
+ data.cb({list: res.list, selectId: res.selected})
62
+ })
63
+ .catch(error => {
64
+ console.error(error);
65
+ });
66
+ return
67
+ }
68
+
69
+ //使用内容分类
70
+ if (action === 'cmsPublishEditxContent') {
71
+ XdBus.getParentApi('cmsPublishEditxContent')(data.params)
72
+ .then(res => {
73
+ data.cb(res)
74
+ })
75
+ .catch(error => {
76
+ console.error(error);
77
+ });
78
+ return
79
+ }
80
+
81
+ let loading = XdBus.getParentApi('loading')({});
82
+ //位置列表
83
+ if (action === 'getListPostion') {
84
+ XdBus.getParentApi('getListPosterPosition')(data.params)
85
+ .then(res => {
86
+ loading.close();
87
+ data.cb(res)
88
+ })
89
+ .catch(error => {
90
+ loading.close();
91
+ console.error(error);
92
+ });
93
+ }
94
+
95
+ //位置创建
96
+ if (action === 'addPostion') {
97
+ XdBus.getParentApi('addPosterPosition')(data.params)
98
+ .then(res => {
99
+ loading.close();
100
+ data.cb(true)
101
+ })
102
+ .catch(error => {
103
+ console.error(error);
104
+ loading.close();
105
+ data.cb(false)
106
+ });
107
+ }
108
+
109
+ //位置编辑
110
+ if (action === 'editPostion') {
111
+ XdBus.getParentApi('updatePosterPosition')(data.params)
112
+ .then(res => {
113
+ loading.close();
114
+ data.cb(true)
115
+ })
116
+ .catch(error => {
117
+ console.error(error);
118
+ loading.close();
119
+ data.cb(false)
120
+ });
121
+ }
122
+
123
+ //位置删除
124
+ if (action === 'deleltePostion') {
125
+ XdBus.getParentApi('deletePosterPosition')(data.params)
126
+ .then(res => {
127
+ loading.close();
128
+ data.cb(true)
129
+ })
130
+ .catch(error => {
131
+ console.error(error);
132
+ loading.close();
133
+ data.cb(false)
134
+ });
135
+ }
136
+
137
+ //获取广告位内容列表
138
+ if (action === 'getListContent') {
139
+ XdBus.getParentApi('getListPosterContent')(data.params)
140
+ .then(res => {
141
+ loading.close();
142
+ data.cb(res)
143
+ })
144
+ .catch(error => {
145
+ loading.close();
146
+ console.error(error);
147
+ });
148
+ }
149
+
150
+ //广告内容创建
151
+ if (action === 'addContent') {
152
+ XdBus.getParentApi('addPosterContent')(data.params)
153
+ .then(res => {
154
+ loading.close();
155
+ data.cb(true)
156
+ })
157
+ .catch(error => {
158
+ console.error(error);
159
+ loading.close();
160
+ data.cb(false)
161
+ });
162
+ }
163
+
164
+ //广告内容编辑
165
+ if (action === 'editContent') {
166
+ XdBus.getParentApi('updatePosterContent')(data.params)
167
+ .then(res => {
168
+ loading.close();
169
+ data.cb(true)
170
+ })
171
+ .catch(error => {
172
+ console.error(error);
173
+ loading.close();
174
+ data.cb(false)
175
+ });
176
+ }
177
+
178
+ //广告内容删除
179
+ if (action === 'deleteContent') {
180
+ XdBus.getParentApi('deletePosterContent')(data.params)
181
+ .then(res => {
182
+ loading.close();
183
+ data.cb(true)
184
+ })
185
+ .catch(error => {
186
+ console.error(error);
187
+ loading.close();
188
+ data.cb(false)
189
+ });
190
+ }
191
+
192
+ //获取广告内容跳转地址类型
193
+ if (action === 'jumpPosterContentType') {
194
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
195
+ .then(res => {
196
+ loading.close();
197
+ data.cb(res['redirect_type'])
198
+ })
199
+ .catch(error => {
200
+ loading.close();
201
+ console.error(error);
202
+ });
203
+ }
204
+
205
+ //发布
206
+ if (action === 'publish') {
207
+ console.log('publish', data.params)
208
+ XdBus.getParentApi('cmsPublishContent')(data.params)
209
+ .then(res => {
210
+ loading.close();
211
+ data.cb(res)
212
+ })
213
+ .catch(error => {
214
+ loading.close();
215
+ console.error(error);
216
+ });
217
+ }
218
+
219
+ //获取站内页面地址
220
+ if (action === 'router') {
221
+ loading.close()
222
+ return XdBus.getParentApi('getPagesTree');
223
+
224
+ }
225
+
226
+ //通知页面进行刷新
227
+ if(action === 'update') {
228
+ XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
229
+ loading.close()
230
+ }
231
+ },
232
+ },
233
+ {
234
+ label: '广告位置使用张数:',
235
+ ele: 'el-input',
236
+ type: 'number',
237
+ valueKey: 'posterNum',
238
+ groupKey:'content',
239
+ value: data.posterNum || 1,
240
+ placeholder: '请输入广告位置使用张数',
241
+ className: 'input40',
242
+ unit: '张',
243
+ },
244
+ {
245
+ label: '广告轮播周期:',
246
+ ele: 'el-input',
247
+ type: 'number',
248
+ valueKey: 'carouselTime',
249
+ groupKey:'content',
250
+ value: data.carouselTime || 5,
251
+ placeholder: '广告轮播周期,默认5秒',
252
+ className: 'input40',
253
+ unit: '秒',
254
+ },
255
+ ]
256
+ }
257
+
@@ -0,0 +1,160 @@
1
+ <template>
2
+ <view
3
+ class="list-poster a"
4
+ v-if="posterList !== null && posterList.length > 0"
5
+ :style="{marginTop:styleObj.outSpacing + 'rpx'}"
6
+ >
7
+ <view
8
+ :style="{width: styleObj.posterSize.width + 'rpx', height: styleObj.posterSize.height + 'rpx' }"
9
+ class="list-poster-one"
10
+ v-if="posterList.length === 1"
11
+ >
12
+ <image
13
+ @click.stop="handlePosterClick(posterList[0],0)"
14
+ :style="{width: styleObj.posterSize.width + 'rpx', height: styleObj.posterSize.height + 'rpx' }"
15
+ :src="posterList[0].image_url"
16
+ :alt="posterList[0].content_name"
17
+ mode="aspectFill"
18
+ ></image>
19
+ </view>
20
+ <view class="list-poster-more" v-else>
21
+ <xd-swiper-dot
22
+ :style="{width: styleObj.posterSize.width + 'rpx', height: styleObj.posterSize.height + 'rpx' }"
23
+ :current="current"
24
+ :info="posterList"
25
+ field="content_name"
26
+ :mode="mode"
27
+ :dots-styles="dotStyleData"
28
+ >
29
+ <swiper
30
+ class="swiper xd-swiper-content"
31
+ :style="{width: styleObj.posterSize.width + 'rpx', height: styleObj.posterSize.height + 'rpx' }"
32
+ :indicator-dots="false"
33
+ :autoplay="styleObj.carouselTime >0"
34
+ :interval="styleObj.carouselTime"
35
+ :duration="500"
36
+ :current="current"
37
+ circular
38
+ @animationfinish="handleAnimationfinish"
39
+ >
40
+ <swiper-item v-for="(item,index) in posterList" :key="index" @click.stop="handlePosterClick(item,index)">
41
+ <image
42
+ :style="{width: styleObj.posterSize.width + 'rpx', height: styleObj.posterSize.height + 'rpx' }"
43
+ :src="item['image_url']"
44
+ mode="aspectFill"
45
+ ></image>
46
+ </swiper-item>
47
+ </swiper>
48
+ </xd-swiper-dot>
49
+ </view>
50
+ </view>
51
+ </template>
52
+
53
+ <script>
54
+
55
+ import XdSwiperDot from "./XdSwiperDot.vue";
56
+
57
+ export default {
58
+ name: "XdPoster",
59
+ props:{
60
+ styleObj:{
61
+ type: Object,
62
+ default(){
63
+ return {}
64
+ }
65
+ },
66
+ posterList:{
67
+ type: Array|null,
68
+ default: null
69
+ },
70
+ dotStyleData:{
71
+ type: Object,
72
+ default(){
73
+ return {}
74
+ }
75
+ },
76
+ mode:{
77
+ type: String,
78
+ default:''
79
+ }
80
+ },
81
+ components: {
82
+ XdSwiperDot
83
+ },
84
+ data(){
85
+ return {
86
+ current:0
87
+ }
88
+ },
89
+ methods:{
90
+ handlePosterClick(item,index){
91
+ if(!item.redirect_data) {
92
+ console.warn(`未配置链接地址: ${item.redirect_data}`);
93
+ console.error(`未配置链接地址: ${item.redirect_data}`);
94
+ return
95
+ }
96
+
97
+ //内部链接跳转地址
98
+ if (item.redirect_type === 'INN') {
99
+ try {
100
+ let url = JSON.parse(item.redirect_data);
101
+ let params = '';
102
+ if(url.page) {
103
+ if (item['redirect_params']) params = `?${item['redirect_params']}`;
104
+ this.$xdUniHelper.navigateTo({url: url.page + params})
105
+ }
106
+ else {
107
+ console.error(`应用链接配置错误: ${url.page}`)
108
+ }
109
+ } catch (e) {
110
+ console.error(`应用链接配置错误: ${item.redirect_data}`)
111
+ }
112
+ }
113
+
114
+ //外部链接
115
+ if (item.redirect_type === 'URL') {
116
+ let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
117
+ let spReg = /(-apiuri\/v)/;
118
+ //#ifdef MP-WEIXIN
119
+ try {
120
+ let url = JSON.parse(item.redirect_data);
121
+ if (reg.test(url.url) || spReg.test(url.url)) {
122
+ console.warn(`广告跳转外站: ${url.url}`)
123
+ this.$xdUniHelper.navigateTo(url);
124
+ } else {
125
+ console.error(`广告跳转外站配置错误: ${url.url}`)
126
+ }
127
+ } catch (e) {
128
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
129
+ }
130
+ //#endif
131
+ //#ifdef H5
132
+ try {
133
+ let url = JSON.parse(item.redirect_data);
134
+ console.warn(`广告跳转外站: ${url.url}`);
135
+ this.$xdUniHelper.redirectTo(url, false)
136
+ } catch (e) {
137
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
138
+ }
139
+ //#endif
140
+
141
+ }
142
+
143
+ //无跳转地址
144
+ if(item.redirect_type === 'EMP') {
145
+ console.warn(`无跳转地址`);
146
+ }
147
+ },
148
+
149
+ handleAnimationfinish(e){
150
+ this.current = e.detail.current;
151
+ },
152
+ }
153
+ }
154
+
155
+ </script>
156
+
157
+
158
+ <style scoped lang="less">
159
+
160
+ </style>
@@ -46,7 +46,7 @@ export default {
46
46
 
47
47
  <style lang="less" scoped>
48
48
  .xd-query-filter {
49
- box-shadow: 0 5rpx 20rpx 0 rgba(0,0,0, .1);
49
+ box-shadow: 0 10rpx 20rpx 0 rgba(0,0,0, .1);
50
50
  background: #fff;
51
51
  border-radius: 0 0 20rpx 20rpx;
52
52
  }
@@ -54,6 +54,7 @@ export default {
54
54
  min-height: 500rpx;
55
55
  max-height: 600rpx;
56
56
  overflow-y: auto;
57
+ padding: 0 20rpx;
57
58
 
58
59
  .filter_item {
59
60
  border-top: 6rpx dotted #F7F7F7;
@@ -103,6 +103,7 @@
103
103
  </view>
104
104
  <scroll-view class="tfk-scroll" scroll-x enable-flex v-else>
105
105
  <view
106
+ v-if="dataList.length > 0"
106
107
  class="tfk-scroll-item"
107
108
  v-for="item in dataList"
108
109
  :key="item.id"
@@ -144,6 +145,7 @@
144
145
  </template>
145
146
  </view>
146
147
  </view>
148
+ <xd-no-data v-if="dataList && dataList.length ===0" height="100%" icon-type="film">暂无影片数据</xd-no-data>
147
149
  </scroll-view>
148
150
  </view>
149
151
  </view>
@@ -161,6 +163,7 @@
161
163
  <script>
162
164
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
163
165
  import XdButton from "@/components/XdButton/XdButton.vue";
166
+ import XdNoData from "@/components/XdNoData/XdNoData.vue";
164
167
  import { jfbRootExec } from "@/utils/xd.event";
165
168
  import JfbMovieTfkFilmRecommendMixin from "./JfbMovieTfkFilmRecommendMixin";
166
169
  import { getContainerPropsValue } from "@/utils/xd.base";
@@ -175,7 +178,8 @@
175
178
  name: "JfbMovieTfkFilmRecommend",
176
179
  components: {
177
180
  XdFontIcon,
178
- XdButton
181
+ XdButton,
182
+ XdNoData
179
183
  },
180
184
  mixins: [
181
185
  componentsMixins, extsMixins, JfbMovieTfkFilmRecommendMixin
@@ -358,7 +362,7 @@
358
362
  }
359
363
  if( this.isPreview) return;
360
364
  this.$xdUniHelper.navigateTo({
361
- url: this.fimeListPath
365
+ url: this.fimeListPath+'?tab_id=' + this.type
362
366
  })
363
367
  },
364
368
  onJfbLoad(options) {