jufubao-base 1.0.65 → 1.0.66-beta1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.65",
3
+ "version": "1.0.66-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -23,7 +23,7 @@
23
23
  <!--一分屏-->
24
24
  <template v-if="posterType === '1'">
25
25
  <view
26
- v-if="isCarousel === false"
26
+ v-if="isCarousel === 1"
27
27
  class="jfb-base-poster__one notCarousel"
28
28
  :style="{
29
29
  width: width + 'rpx',
@@ -126,7 +126,7 @@
126
126
  posterPosition: null,
127
127
  posterType: '1',//分屏模式
128
128
  showType: '', //广告显示方式
129
- isCarousel: true, //是否轮播图
129
+ isCarousel: 1, //是否轮播图
130
130
  carouselTime: 5,//轮播图轮播周期
131
131
  useNumber: null, //广告使用张数
132
132
  height: 0, //广告高度
@@ -180,7 +180,7 @@
180
180
  dotStyleData: this.dotStyleData,
181
181
  poster: this.poster,
182
182
  showType: this.showType,
183
- isCarousel: this.isCarousel,
183
+ isCarousel: !!this.isCarousel,
184
184
  carouselTime: this.carouselTime,
185
185
  radius: this.radius,
186
186
  padding: this.padding,
@@ -412,6 +412,7 @@
412
412
  this.mS = getContainerPropsValue(container, 'content.margin', this.getDefualtValue('margin'));
413
413
 
414
414
  //content
415
+
415
416
  this.mode = getContainerPropsValue(container, 'content.dot_type', 'dot');
416
417
  this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1);
417
418
  this.carouselTime = Number(getContainerPropsValue(container, 'content.carouselTime', 5)) * 1000;
@@ -26,6 +26,7 @@
26
26
  ></image>
27
27
  </view>
28
28
  </view>
29
+
29
30
  <view class="sreen__box carousel" v-if="config.isCarousel === true">
30
31
  <xd-swiper-dot
31
32
  :current="current"
@@ -78,7 +79,7 @@
78
79
  <script>
79
80
  import XdSwiperDot from "./XdSwiperDot";
80
81
  import XdSwiper from "@/components/XdSwiper/XdSwiper";
81
-
82
+
82
83
  export default {
83
84
  components:{
84
85
  XdSwiperDot,
@@ -122,7 +123,7 @@
122
123
  content() {
123
124
  this.init();
124
125
  },
125
-
126
+
126
127
  },
127
128
  created() {
128
129
  this.isPreview = this.$configProject.isPreview;
@@ -138,7 +139,7 @@
138
139
  this.width = Number(this.config.width);
139
140
  this.height = Number(this.config.height);
140
141
  this.padding = Number(this.config.padding);
141
-
142
+
142
143
  //静态图显示
143
144
  if(this.config.isCarousel === false) {
144
145
  this.list = this.content
@@ -153,8 +154,8 @@
153
154
  }
154
155
  this.list = arr;
155
156
  }
156
-
157
-
157
+
158
+
158
159
  }, 100)
159
160
  },
160
161
  handleClick(item) {
@@ -214,7 +215,7 @@
214
215
  .sreen {
215
216
  width: calc(100% + 4px); /**防止宽度不够问**/
216
217
  position: relative;
217
-
218
+
218
219
  & .carousel-mask {
219
220
  position: absolute;
220
221
  left: 0;
@@ -223,7 +224,7 @@
223
224
  bottom: 0;
224
225
  background: rgba(0, 0, 0, 0);
225
226
  }
226
-
227
+
227
228
  &__box.notCarousel {
228
229
  display: flex;
229
230
  justify-content: flex-start;
@@ -231,7 +232,7 @@
231
232
  flex-wrap: wrap;
232
233
  overflow: hidden;
233
234
  width: calc(100% + 20px); /**防止宽度不够问**/
234
-
235
+
235
236
  & > view {
236
237
  display: flex;
237
238
  justify-content: center;
@@ -241,7 +242,7 @@
241
242
  overflow: hidden;
242
243
  }
243
244
  }
244
-
245
+
245
246
  &__box.carousel {
246
247
  display: flex;
247
248
  justify-content: flex-start;
@@ -249,7 +250,7 @@
249
250
  flex-wrap: wrap;
250
251
  overflow: hidden;
251
252
  }
252
-
253
+
253
254
  & .sreen__box-list {
254
255
  width: calc(100% + 20px); /**防止宽度不够问**/
255
256
  display: flex;
@@ -257,7 +258,7 @@
257
258
  align-items: flex-start;
258
259
  flex-wrap: wrap;
259
260
  overflow: hidden;
260
-
261
+
261
262
  & view {
262
263
  display: flex;
263
264
  justify-content: center;
@@ -265,17 +266,17 @@
265
266
  flex-shrink: 0;
266
267
  box-sizing: border-box;
267
268
  overflow: hidden;
268
-
269
+
269
270
  &:nth-child(4n) {
270
271
  margin-right: 0 !important;
271
272
  }
272
-
273
+
273
274
  & > image {
274
-
275
+
275
276
  }
276
277
  }
277
278
  }
278
279
  }
279
-
280
-
280
+
281
+
281
282
  </style>
@@ -41,7 +41,7 @@
41
41
  ></image>
42
42
  </view>
43
43
  </view>
44
-
44
+
45
45
  </view>
46
46
  </view>
47
47
  </template>
@@ -65,7 +65,7 @@
65
65
  return {
66
66
  noData: false,
67
67
  entry: null,
68
-
68
+
69
69
  //style
70
70
  type:'1',
71
71
  width: 0,
@@ -80,7 +80,7 @@
80
80
  right: 0
81
81
  },
82
82
  list: [],
83
-
83
+
84
84
  //测试数据
85
85
  test: {
86
86
  "content_id": "KpBbUKdj4aBejwe7Fh1ki",
@@ -146,7 +146,7 @@
146
146
  console.error(e)
147
147
  }
148
148
  }
149
-
149
+
150
150
  //外部链接
151
151
  if(item.redirect_type === 'URL') {
152
152
  let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
@@ -179,9 +179,10 @@
179
179
  console.error(e)
180
180
  }
181
181
  //#endif
182
-
182
+
183
183
  }
184
184
  },
185
+
185
186
  getTestData() {
186
187
  let temp = [];
187
188
  for (let i = 0; i < this.useNumber; i++) {
@@ -193,7 +194,7 @@
193
194
  }
194
195
  return temp
195
196
  },
196
-
197
+
197
198
  onJfbLoad(options) {
198
199
  this.params = options;
199
200
  jfbRootExec('getListPosterContent', {
@@ -209,7 +210,7 @@
209
210
  if (res.list.length === 0 && this.$configProject.isPreview) {
210
211
  res.list = this.getTestData();
211
212
  }
212
-
213
+
213
214
  let list = res.list.map(item=>{
214
215
  return {
215
216
  ...item,
@@ -222,7 +223,7 @@
222
223
  typeEmpty: true
223
224
  })
224
225
  }
225
-
226
+
226
227
  this.list = list;
227
228
  this.noData = this.list.length === 0;
228
229
  })
@@ -239,7 +240,7 @@
239
240
  this.radius = getContainerPropsValue(container, 'content.radius', '0');
240
241
  this.padding = getContainerPropsValue(container, 'content.padding', '0');
241
242
  this.margin = getContainerPropsValue(container, 'content.margin', { top: 0, bottom: 0, left: 0, right: 0});
242
-
243
+
243
244
  this.entry = getContainerPropsValue(container, 'content.entry', null);
244
245
  if(this.entry !== null) {
245
246
  this.width = this.entry.size.width;
@@ -247,11 +248,11 @@
247
248
  this.type = this.entry.type;
248
249
  }
249
250
  },
250
-
251
+
251
252
  onJfbUpdate() {
252
253
  this.onJfbLoad(this.params)
253
254
  },
254
-
255
+
255
256
  }
256
257
  }
257
258
 
@@ -267,26 +268,26 @@
267
268
  display: flex;
268
269
  align-items: center;
269
270
  flex-wrap: wrap;
270
-
271
+
271
272
  & > view {
272
273
  overflow: hidden;
273
274
  display: flex;
274
275
  justify-content: center;
275
276
  align-items: center;
276
-
277
+
277
278
  & > image {
278
279
  width: 100%;
279
280
  height: auto;
280
281
  }
281
282
  }
282
-
283
+
283
284
  &.one {
284
285
  justify-content: center;
285
286
  & > view:first-child {
286
287
  margin-top: 0!important;
287
288
  }
288
289
  }
289
-
290
+
290
291
  &.two {
291
292
  justify-content: center;
292
293
  & > view:nth-child(1), & > view:nth-child(2){
@@ -17,6 +17,7 @@
17
17
  <view class="float"></view>
18
18
  <view class="video" v-if="video !== null">
19
19
  <xd-video
20
+ :key="videoKey"
20
21
  :margin="margin"
21
22
  :poster="videoSetting"
22
23
  :video="video"
@@ -55,7 +56,8 @@
55
56
  videoSetting: null,
56
57
  margin:{},
57
58
  radius:0,
58
- $vm: {}
59
+ $vm: {},
60
+ videoKey : Date.now()
59
61
  }
60
62
  },
61
63
  computed: {
@@ -125,6 +127,7 @@
125
127
  if(res && res.list && res.list.length > 0) {
126
128
  this.video = res.list[0];
127
129
  }
130
+ this.videoKey = Date.now()
128
131
  })
129
132
  .catch(error => {
130
133
  this.$xdLog.catch(error)
@@ -14,7 +14,7 @@
14
14
  :style="{borderRadius: radius + 'rpx'}"
15
15
  >
16
16
  <image :src="imageUrl" v-if="imageUrl" />
17
- <view @click="handlePlay()">
17
+ <view v-if="videoUrl" @click="handlePlay()">
18
18
  <xd-font-icon
19
19
  :icon="iconFont"
20
20
  size="100"