jufubao-base 1.0.157-beta5 → 1.0.157-beta7

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 (36) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +4 -4
  3. package/src/components/JfbBaseBack/JfbBaseBack.vue +7 -6
  4. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +14 -14
  5. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +1 -1
  6. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +1 -1
  7. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +5 -4
  8. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +9 -19
  9. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +2 -2
  10. package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +1 -1
  11. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +13 -15
  12. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +1 -1
  13. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +1 -1
  14. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +1 -7
  15. package/src/components/JfbBaseEntry/Attr.js +22 -0
  16. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +76 -13
  17. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +2 -2
  18. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +1 -1
  19. package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +3 -3
  20. package/src/components/JfbBaseNotice/Attr.js +0 -2
  21. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +8 -9
  22. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +1 -1
  23. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +1 -1
  24. package/src/components/JfbBasePoster/JfbBasePoster.vue +118 -18
  25. package/src/components/JfbBasePoster/MoreScreen.vue +155 -37
  26. package/src/components/JfbBasePosterBigSmall/Attr.js +1 -4
  27. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +184 -42
  28. package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +90 -20
  29. package/src/components/JfbBasePosterType/FourScreen.vue +156 -18
  30. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +0 -35
  31. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -1
  32. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +8 -7
  33. package/src/components/JfbBaseVideo/XdVideo.vue +0 -4
  34. package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +4 -13
  35. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +2 -2
  36. package/src/mixins/colorCardMixins.js +1 -1
@@ -49,7 +49,7 @@
49
49
  import componentsMixins from "@/mixins/componentsMixins";
50
50
  import extsMixins from "@/mixins/extsMixins";
51
51
  import getServiceUrl from "@/common/getServiceUrl";
52
- import {base64} from 'js-base64';
52
+ import {mapState} from "vuex";
53
53
  export default {
54
54
  name: "JfbBaseEntry",
55
55
  components: {
@@ -66,9 +66,11 @@
66
66
  paddingInput: 20,
67
67
  loadingList: true,
68
68
  margin: {},
69
+ entryType: '',
69
70
  }
70
71
  },
71
72
  computed: {
73
+ ...mapState(['brandInfo']),
72
74
  bodyStyle(){
73
75
  return {
74
76
  backgroundColor: this.bgcolor,
@@ -111,17 +113,67 @@
111
113
  this.rowNum = getContainerPropsValue(container, 'content.rowNum', 1);
112
114
  this.paddingInput = getContainerPropsValue(container, 'content.paddingInput', 20);
113
115
  this.margin = getContainerPropsValue(container, 'content.margin', {});
116
+ this.entryType = getContainerPropsValue(container, 'content.entryType', 'default');
117
+ },
118
+
119
+ getCardPath(custom_redirect_data = {}){
120
+ //#ifdef H5
121
+ return null;
122
+ //#endif
123
+ //#ifdef MP-WEIXIN
124
+ const dir = custom_redirect_data.dir;
125
+ const actDir = this.projectAttr['deploy_dir'];
126
+ if(custom_redirect_data.appType === 'wxmp') {
127
+ if(dir === actDir) {
128
+ return {
129
+ cardPath: custom_redirect_data.path,
130
+ cardSelf: 'wxmp',
131
+ };
132
+ }
133
+ else return null;
134
+ }
135
+ else if(custom_redirect_data.appType === 'h5'){
136
+ return {
137
+ cardPath: custom_redirect_data.site_url,
138
+ cardSelf: 'h5',
139
+ };
140
+ }
141
+ else return null;
142
+ //#endif
114
143
  },
115
144
  getEntrySetting(){
116
145
  this.$xdShowLoading({});
117
146
  jfbRootExec("getEntrySetting", {
118
147
  vm: this,
119
- data: {}
148
+ data: {
149
+ group_id:this.entryType || 'default'
150
+ }
120
151
  }).then(res => {
121
152
  this.loadingList = false;
122
153
  this.$xdHideLoading();
123
- this.entryList = res.list.map(item => {
124
- const {dir, path, host} = item['redirect_data'];
154
+ let isH5FilterEntryList = [];
155
+ let isMpFilterEntryList = [];
156
+ this.entryList = res.list.filter(item=>{
157
+ //#ifdef H5
158
+ //在H5平台应用中不可跳转到微信小程序应用
159
+ if(item.redirect_data.appType === 'wxmp'){
160
+ isH5FilterEntryList.push(item)
161
+ }
162
+ return item.redirect_data.appType !== 'wxmp';
163
+ //#endif
164
+
165
+ //#ifdef MP-WEIXIN
166
+ const dir = item['redirect_data'].dir;
167
+ const actDir = this.projectAttr['deploy_dir'];
168
+ if(item.redirect_data.appType === 'wxmp') {
169
+ if(dir !== actDir) isMpFilterEntryList.push(item)
170
+ return dir === actDir;
171
+ }
172
+ return true
173
+ //#endif
174
+ }).map(item => {
175
+ const {dir, path, host,appType} = item['redirect_data'];
176
+ if(appType === undefined) item.redirect_data.appType = 'h5';
125
177
  item['image_url'] = getServiceUrl(item.image_url);
126
178
  item['image_url2'] = item.image_url2 ? getServiceUrl(item.image_url2) : "";
127
179
  item['image_url3'] = item.image_url3 ? getServiceUrl(item.image_url3) : "";
@@ -139,24 +191,35 @@
139
191
  let jumpUrl = path;
140
192
 
141
193
  //域名相同并且应用路径不相同时候处理
142
- if(host === this.projectAttr.host
143
- && this.projectAttr['deploy_dir'] !== dir
144
- ){
194
+ if(host === this.projectAttr.host && this.projectAttr['deploy_dir'] !== dir){
145
195
  jumpUrl = `//${host}/${dir}${path}`;
146
196
  //#ifdef MP-WEIXIN
147
197
  jumpUrl = `https:${jumpUrl}`;
148
198
  //#endif
149
199
  }
150
200
 
151
- if(item['redirect_data']['fixed_business_code'] === '') {
152
- item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
153
- }
154
- else{
155
- item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
201
+ //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
202
+ let cardPathStr = '';
203
+ //#ifdef MP-WEIXIN
204
+ if(item.redirect_data.appType === 'h5') {
205
+ const custom_redirect_data = this.$xdUniHelper.checkVarType(item['custom_redirect_data']) === 'object'?item['custom_redirect_data']:{};
206
+ const cardPathObject = this.getCardPath(custom_redirect_data);
207
+ if(cardPathObject !== null) {
208
+ const {cardPath, cardSelf} =cardPathObject
209
+ if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
210
+ }
156
211
  }
212
+ //#endif
213
+ item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
157
214
  return item;
158
215
  });
159
- console.log( this.entryList)
216
+ //#ifdef MP-WEIXIN
217
+ console.warn(`微信小程序端被过滤的入口列表:${JSON.stringify(isMpFilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
218
+ //#endif
219
+ //#ifdef H5
220
+ console.warn(`H5端被过滤的入口列表:${JSON.stringify(isH5FilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
221
+ //#endif
222
+ console.warn(`福利入口链接列表:${JSON.stringify(this.entryList.map(item=> `${item.redirect_data.appType}:${item.redirect_data['path']}`),null,2)}`);
160
223
  if(res.list.length === 1) this.toLink(this.entryList[0]);
161
224
  if(res.list.length === 0) {
162
225
  this.$xdAlert({content: '当前票券暂无支持服务'})
@@ -90,7 +90,7 @@
90
90
  </view>
91
91
  <view style="margin-top: 40rpx">
92
92
  <xd-form
93
- label-width="130"
93
+ label-width="150"
94
94
  label-align="right"
95
95
  content-align="left"
96
96
  :border="true"
@@ -695,7 +695,7 @@ export default {
695
695
  content: "请阅读并勾选读用户协议与隐私协议",
696
696
  cancel: false,
697
697
  confirmText: "我知道了",
698
- $vm: this,
698
+ styles: this.styles,
699
699
  });
700
700
  return;
701
701
  }
@@ -27,7 +27,7 @@
27
27
  >
28
28
  </view>
29
29
  <xd-form
30
- label-width="130"
30
+ label-width="170"
31
31
  label-align="right"
32
32
  content-align="left"
33
33
  :border="true"
@@ -25,7 +25,7 @@
25
25
  <view style="font-size:26rpx;color:#999;margin-top:20rpx;">请输入{{pwd_type_text}}并牢记</view>
26
26
  </view>
27
27
  <xd-form
28
- label-width="130"
28
+ label-width="170"
29
29
  label-align="right"
30
30
  content-align="left"
31
31
  :border="true"
@@ -77,8 +77,8 @@
77
77
  import XdForm from "@/components/XdForm/XdForm";
78
78
  import XdFormInput from "@/components/XdFormInput/XdFormInput";
79
79
  import XdButton from "@/components/XdButton/XdButton";
80
-
81
-
80
+
81
+
82
82
  export default {
83
83
  name: "JfbBaseLoginSetPwd",
84
84
  components: {
@@ -261,8 +261,6 @@ export default {
261
261
  {"label": "滚动显示", "value": '2'},
262
262
  {"label": "弹窗显示", "value": '3'},
263
263
  ],
264
- inline:false,
265
- notice:'预览模式点击使用“<span style="color:red">弹窗显示</span>”会重新触发页面刷新,可点击弹出遮罩层进行关闭功能'
266
264
  },
267
265
  {
268
266
  label: '是否隐藏弹框(仅预览模式生效):',
@@ -235,7 +235,13 @@
235
235
  this.speedKey = Date.now()
236
236
  }, 400)
237
237
 
238
- }
238
+ },
239
+ is_hide_dailog(value){
240
+ if(value === 'N') {
241
+ storage.remove(this.containerId);
242
+ this.onJfbLoad();
243
+ }
244
+ },
239
245
  },
240
246
  computed:{
241
247
  marginUi() {
@@ -281,13 +287,6 @@
281
287
  return this.num > 1
282
288
  },
283
289
 
284
- is_hide_dailog(value){
285
- if(value === 'N') {
286
- storage.remove(this.containerId);
287
- this.onJfbLoad();
288
- }
289
- },
290
-
291
290
  },
292
291
  created() {
293
292
  this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
@@ -334,7 +333,7 @@
334
333
  console.log('this.time', this.time * 60 + '分钟');
335
334
  storage.set(this.containerId, 1, this.time);
336
335
  this.$xdConfirm({
337
- $vm: this,
336
+ styles: this.styles,
338
337
  title: this.title || this.ajaxTitle,
339
338
  content: this.content,
340
339
  isHtml: true,
@@ -1252,7 +1252,7 @@ export default {
1252
1252
  });
1253
1253
  } else {
1254
1254
  this.$xdConfirm({
1255
- $vm: this,
1255
+ styles: this.styles,
1256
1256
  content: "是否取消订单",
1257
1257
  success: (action) => {
1258
1258
  if (action.confirm) {
@@ -389,7 +389,7 @@ export default {
389
389
 
390
390
  cancelUnPayOrder(main_order_id) {
391
391
  this.$xdConfirm({
392
- $vm: this,
392
+ styles: this.styles,
393
393
  content: "是否取消订单?",
394
394
  success: (res) => {
395
395
  if (res.confirm) {
@@ -15,7 +15,6 @@
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-poster__body" v-if="noData">
17
17
  <view class="x-line"></view>
18
-
19
18
  <view class="jfb-base-poster-cont" :style="getBodyStyle">
20
19
  <!--一分屏-->
21
20
  <template v-if="posterType === '1'">
@@ -50,6 +49,7 @@
50
49
  }"
51
50
  >
52
51
  <xd-swiper-dot
52
+ :style="{width: getOneWidth + 'rpx', height: getOneHeight + 'rpx'}"
53
53
  v-if="pageSwiperShow"
54
54
  :current="current"
55
55
  :info="info"
@@ -57,6 +57,24 @@
57
57
  :mode="mode"
58
58
  :dots-styles="dotStyleData"
59
59
  >
60
+ <!--#ifdef MP-WEIXIN-->
61
+ <swiper
62
+ class="swiper xd-swiper-content"
63
+ :style="{width: getOneWidth + 'rpx', height: getOneHeight + 'rpx'}"
64
+ :indicator-dots="false"
65
+ :autoplay="carouselTime>0"
66
+ :interval="carouselTime"
67
+ :duration="500"
68
+ :current="current"
69
+ circular
70
+ @animationfinish="handleAnimationfinish"
71
+ >
72
+ <swiper-item v-for="(item,index) in info" :key="index" @click.stop="handleClick(item,index)">
73
+ <image :style="{width: getOneWidth + 'rpx', height: getOneHeight + 'rpx'}" :src="item['image_url']" mode="aspectFill"></image>
74
+ </swiper-item>
75
+ </swiper>
76
+ <!--#endif-->
77
+ <!--#ifdef H5-->
60
78
  <xd-swiper
61
79
  :indicator-dots="false"
62
80
  :list="info"
@@ -71,6 +89,7 @@
71
89
  <image :src="item['image_url']" mode="aspectFill"></image>
72
90
  </template>
73
91
  </xd-swiper>
92
+ <!--#endif-->
74
93
  </xd-swiper-dot>
75
94
  <view v-if="isPreview" class="carousel-mask"></view>
76
95
  </view>
@@ -78,6 +97,7 @@
78
97
  <!--一分屏-->
79
98
  <!--多分屏-->
80
99
  <more-screen
100
+ style="width: 100%; height: 100%"
81
101
  v-if="posterType !== '1'"
82
102
  :config="getConfig"
83
103
  :content="info"
@@ -158,11 +178,11 @@
158
178
  backgroundSize: '100%',
159
179
  backgroundRepeat: 'no-repeat',
160
180
  }
161
- return {
162
- ...image,
181
+ image = Object.assign({},image,{
163
182
  margin: this.margin,
164
183
  padding: this.outPadding
165
- }
184
+ })
185
+ return this.styleObjectToString(image)
166
186
  },
167
187
  getOneWidth(){
168
188
  let margin = this.checkValue(this.mS.left, 0) + this.checkValue(this.mS.right, 0);
@@ -332,9 +352,9 @@
332
352
  },
333
353
  },
334
354
  created() {
335
- this.init(this.container);
336
355
  this.isPreview = this.$configProject.isPreview;
337
356
  this.pageSwiperShow = this.$root.$isShow;
357
+ this.init(this.container);
338
358
  },
339
359
 
340
360
  destroyed() {
@@ -345,6 +365,63 @@
345
365
  },
346
366
 
347
367
  methods: {
368
+ /**
369
+ * @description 过滤不可以用
370
+ * 当前项目未H5时,过滤所有小程序应用
371
+ * 当前项目未小程序时,过滤所有非当前小程序应用
372
+ * 站外地址直接返回
373
+ * 站内地址未选值直接返回
374
+ * 预览模式全过
375
+ */
376
+ filterItem(list){
377
+ let content = list.filter(item=>{
378
+ //预览模式
379
+ if( this.$configProject.isPreview) return true;
380
+
381
+ //非内部应用
382
+ if(item.redirect_type !== 'INN') return true
383
+
384
+ //没有配置链接
385
+ if(!item.redirect_data) return true;
386
+
387
+ //内部应用
388
+ else {
389
+ let redirect_data;
390
+ try {
391
+ redirect_data = JSON.parse(item.redirect_data);
392
+ if(!item['app_type']) item['app_type']= 'h5';
393
+
394
+ //#ifdef H5
395
+ return item['app_type'] !== 'wxmp';
396
+ //#endif
397
+
398
+ //#ifdef MP-WEIXIN
399
+ let actDir = this.$parent.projectAttr.deploy_dir;
400
+ let dir = this.getPathDir(redirect_data.page);
401
+ if(item['app_type'] === 'wxmp'){
402
+ return actDir === dir;
403
+ }
404
+ else if(item['app_type'] === 'h5') return true;
405
+ else return true
406
+ //#endif
407
+ }
408
+ catch (e) {
409
+ return true
410
+ }
411
+ }
412
+ });
413
+ console.warn(`PostersList:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
414
+ return content;
415
+
416
+ },
417
+
418
+ getPathDir(pathDir){
419
+ if(pathDir.indexOf('@site_domain@/') === 0) {
420
+ return pathDir.replace('@site_domain@/','').split('/')[0]
421
+ }
422
+ return ''
423
+ },
424
+
348
425
  getTestData(){
349
426
  let temp = [];
350
427
  for (let i = 0; i< this.useNumber; i++) {
@@ -382,52 +459,70 @@
382
459
  this.current = e.detail.current;
383
460
  }
384
461
  },
462
+
385
463
  handleClick(item) {
464
+ if(!item.redirect_data) {
465
+ console.warn(`未配置链接地址: ${item.redirect_data}`);
466
+ console.error(`未配置链接地址: ${item.redirect_data}`);
467
+ return
468
+ }
469
+
386
470
  //内部链接跳转地址
387
471
  if (item.redirect_type === 'INN') {
388
472
  try {
389
473
  let url = JSON.parse(item.redirect_data);
390
474
  let params = '';
391
- if (item['redirect_params']) params = `?${item['redirect_params']}`;
392
- this.$xdUniHelper.navigateTo({
393
- url: url.page + params
394
- })
475
+ if(url.page) {
476
+ if (item['redirect_params']) params = `?${item['redirect_params']}`;
477
+ this.$xdUniHelper.navigateTo({url: url.page + params})
478
+ }
479
+ else {
480
+ console.error(`应用链接配置错误: ${url.page}`)
481
+ }
395
482
  } catch (e) {
396
- console.error(e)
483
+ console.error(`应用链接配置错误: ${item.redirect_data}`)
397
484
  }
398
485
  }
399
486
 
400
487
  //外部链接
401
488
  if (item.redirect_type === 'URL') {
402
489
  let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
490
+ let spReg = /(-apiuri\/v)/;
403
491
  //#ifdef MP-WEIXIN
404
492
  try {
405
493
  let url = JSON.parse(item.redirect_data);
406
- if (reg.test(url.url) && this.$configProject.extras.webview) {
494
+ if (reg.test(url.url) || spReg.test(url.url)) {
407
495
  console.warn(`广告跳转外站: ${url.url}`)
408
- this.$xdUniHelper.navigateTo({
409
- url: `${this.$configProject.extras.webview}?seatUrl=${Base64.encodeURI(url.url)}`
410
- });
496
+ this.$xdUniHelper.navigateTo(url);
411
497
  } else {
412
- throw Error('地址错误')
498
+ console.error(`广告跳转外站配置错误: ${url.url}`)
413
499
  }
414
500
  } catch (e) {
415
- console.error(e)
501
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
416
502
  }
417
503
  //#endif
418
504
  //#ifdef H5
419
505
  try {
420
506
  let url = JSON.parse(item.redirect_data);
421
507
  console.warn(`广告跳转外站: ${url.url}`);
422
- this.$xdUniHelper.navigateTo(url)
508
+ this.$xdUniHelper.redirectTo(url, false)
423
509
  } catch (e) {
424
- console.error(e)
510
+ console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
425
511
  }
426
512
  //#endif
427
513
 
428
514
  }
515
+
516
+ //无跳转地址
517
+ if(item.redirect_type === 'EMP') {
518
+ console.warn(`无跳转地址`);
519
+ }
429
520
  },
521
+
522
+
430
523
  handleImage(list){
524
+ list = this.filterItem(list);
525
+
431
526
  return list.map((item,index) => {
432
527
  return {
433
528
  ...item,
@@ -463,6 +558,11 @@
463
558
  this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1);
464
559
  this.radius = getContainerPropsValue(container, 'content.radius', 0);
465
560
  this.padding = getContainerPropsValue(container, 'content.padding', 0);
561
+
562
+ //静态图,一分屏并且间距为0设置
563
+ if(this.isCarousel === 1 && this.posterType === '1' && this.padding === 0) {
564
+ this.padding = 20;
565
+ }
466
566
  this.rows = getContainerPropsValue(container, 'content.rows', 1);
467
567
  if(this.posterType === '1' && this.isCarousel === 2) this.isSupport = getContainerPropsValue(container, 'content.isSupport', 'Y');
468
568
  this.mS = getContainerPropsValue(container, 'content.margin', {});