jufubao-base 1.0.158 → 1.0.159-beta10
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 +1 -1
- package/src/common/authorize.js +201 -70
- package/src/components/JfbBaseAddress/JfbBaseAddress.vue +7 -6
- package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +5 -3
- package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +3 -2
- package/src/components/JfbBaseBack/JfbBaseBack.vue +10 -8
- package/src/components/JfbBaseBackground/JfbBaseBackground.vue +3 -2
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +3 -2
- package/src/components/JfbBaseCard/JfbBaseCard.vue +10 -6
- package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +57 -26
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +14 -15
- package/src/components/JfbBaseCardDetailEntry/Attr.js +22 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +393 -424
- package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +4 -4
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +7 -9
- package/src/components/JfbBaseCardEntry/Attr.js +22 -1
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +90 -35
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +39 -22
- package/src/components/JfbBaseCardInfoEntry/Attr.js +22 -0
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +287 -263
- package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +4 -3
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +23 -18
- package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +4 -11
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +16 -19
- package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +3 -2
- package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +34 -18
- package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +14 -14
- package/src/components/JfbBaseCity/JfbBaseCity.vue +3 -2
- package/src/components/JfbBaseClear/JfbBaseClear.vue +3 -2
- package/src/components/JfbBaseConList/JfbBaseConList.vue +4 -5
- package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +3 -2
- package/src/components/JfbBaseEntry/Attr.js +22 -0
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +80 -16
- package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetail.vue +3 -4
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +31 -20
- package/src/components/JfbBaseFastLink/XdFastNav.vue +2 -2
- package/src/components/JfbBaseFooter/JfbBaseFooter.vue +0 -1
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +3 -2
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +28 -11
- package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +7 -9
- package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +9 -6
- package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +19 -5
- package/src/components/JfbBaseMapOverlay/XdMapOverlay.vue +52 -37
- package/src/components/JfbBaseMapSearch/JfbBaseMapSearch.vue +3 -2
- package/src/components/JfbBaseMergeUserCard/JfbBaseMergeUserCard.vue +28 -27
- package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +5 -5
- package/src/components/JfbBaseMy/JfbBaseMy.vue +3 -3
- package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +6 -4
- package/src/components/JfbBaseNotice/Attr.js +0 -2
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +36 -14
- package/src/components/JfbBaseNotice/XdNoticeBar.vue +17 -1
- package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottom.vue +3 -2
- package/src/components/JfbBaseNoticeTop/JfbBaseNoticeTop.vue +3 -2
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +20 -31
- package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +9 -4
- package/src/components/JfbBasePay/JfbBasePay.vue +3 -2
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +22 -7
- package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +23 -7
- package/src/components/JfbBasePoster/JfbBasePoster.vue +118 -18
- package/src/components/JfbBasePoster/MoreScreen.vue +155 -37
- package/src/components/JfbBasePosterBigSmall/Attr.js +1 -4
- package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +191 -67
- package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +90 -20
- package/src/components/JfbBasePosterType/FourScreen.vue +162 -18
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +0 -35
- package/src/components/JfbBaseRecharge/JfbBaseRecharge.vue +4 -4
- package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +3 -4
- package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetail.vue +4 -7
- package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccess.vue +6 -9
- package/src/components/JfbBaseSearch/JfbBaseSearch.vue +3 -2
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +5 -4
- package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +3 -2
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +5 -3
- package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +4 -3
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +14 -11
- package/src/components/JfbBaseVideo/XdVideo.vue +0 -4
- package/src/components/JfbBaseWallet/JfbBaseWallet.vue +3 -2
- package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetail.vue +5 -8
- package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffective.vue +5 -8
- package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +7 -17
- package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +13 -21
- package/src/components/JfbBaseWebview/JfbBaseWebview.vue +4 -3
- package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +5 -4
- package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeError.vue +3 -4
- package/src/mixins/colorCardMixins.js +1 -1
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
</view>
|
|
18
18
|
<!-- #endif -->
|
|
19
19
|
<view class="jfb-base-phone-login__body">
|
|
20
|
-
<view
|
|
21
|
-
class="panel-login-password"
|
|
22
|
-
>
|
|
20
|
+
<view class="panel-login-password">
|
|
23
21
|
<xd-form label-width="128"
|
|
24
22
|
style="margin-top: 40rpx;"
|
|
25
23
|
label-align="right"
|
|
@@ -61,7 +59,7 @@
|
|
|
61
59
|
:localdata="[{value: 1, text: '登录即同意《隐私政策》《用户服务协议》'}]"
|
|
62
60
|
>
|
|
63
61
|
<template slot="a1">
|
|
64
|
-
<view>
|
|
62
|
+
<view class="text-content">
|
|
65
63
|
<text>请阅读并同意</text>
|
|
66
64
|
<text @click.stop="handlePrivacy('privacy_privacy')" :style="{color: mainColor}">《隐私政策》</text>
|
|
67
65
|
<text @click.stop="handlePrivacy('privacy_service')" :style="{color: mainColor}">《用户服务协议》</text>
|
|
@@ -102,6 +100,10 @@
|
|
|
102
100
|
import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox"
|
|
103
101
|
|
|
104
102
|
export default {
|
|
103
|
+
// #ifdef MP-WEIXIN
|
|
104
|
+
options: { styleIsolation: 'shared' },
|
|
105
|
+
// #endif
|
|
106
|
+
|
|
105
107
|
name: "JfbBasePhoneLogin",
|
|
106
108
|
components: {
|
|
107
109
|
XdFontIcon,
|
|
@@ -133,8 +135,9 @@
|
|
|
133
135
|
}
|
|
134
136
|
},
|
|
135
137
|
watch: {
|
|
136
|
-
container(value) {
|
|
137
|
-
|
|
138
|
+
container(value,oldValue) {
|
|
139
|
+
if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
140
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
138
141
|
},
|
|
139
142
|
"accountForm.verification_code"(value) {
|
|
140
143
|
if (value && value.length >= 8 && value.length % 2 === 0) {
|
|
@@ -167,7 +170,7 @@
|
|
|
167
170
|
* @description 监听事件变化
|
|
168
171
|
* @param container {object} 业务组件对象自己
|
|
169
172
|
*/
|
|
170
|
-
init(
|
|
173
|
+
init(container) {
|
|
171
174
|
//this.bgcolor = getContainerPropsValue(value, 'content.bgcolor', '#fff');
|
|
172
175
|
//this.height = getContainerPropsValue(value, 'content.height', 10);
|
|
173
176
|
},
|
|
@@ -362,4 +365,17 @@
|
|
|
362
365
|
.align-center{
|
|
363
366
|
align-items: center;
|
|
364
367
|
}
|
|
368
|
+
/* #ifdef MP-WEIXIN */
|
|
369
|
+
/deep/ .xd-form-checkbox .checklist-group {
|
|
370
|
+
justify-content: center;
|
|
371
|
+
display: flex;
|
|
372
|
+
align-items: center;
|
|
373
|
+
}
|
|
374
|
+
.text-content {
|
|
375
|
+
width: 100%;
|
|
376
|
+
& > text {
|
|
377
|
+
font-size: 26rpx;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/* #endif */
|
|
365
381
|
</style>
|
|
@@ -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
|
-
|
|
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
|
|
392
|
-
|
|
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(
|
|
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)
|
|
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
|
-
|
|
498
|
+
console.error(`广告跳转外站配置错误: ${url.url}`)
|
|
413
499
|
}
|
|
414
500
|
} catch (e) {
|
|
415
|
-
console.error(
|
|
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.
|
|
508
|
+
this.$xdUniHelper.redirectTo(url, false)
|
|
423
509
|
} catch (e) {
|
|
424
|
-
console.error(
|
|
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', {});
|
|
@@ -33,8 +33,45 @@
|
|
|
33
33
|
field="content_name"
|
|
34
34
|
:mode="config.mode"
|
|
35
35
|
:dots-styles="config.dotStyleData"
|
|
36
|
-
:style="{height:(getHeight + 46 * $rpxNum) + 'px'}"
|
|
36
|
+
:style="{height:(getHeight + 46 * $rpxNum) + 'px', width:'100%'}"
|
|
37
37
|
>
|
|
38
|
+
<!--#ifdef MP-WEIXIN-->
|
|
39
|
+
<swiper
|
|
40
|
+
class="swiper xd-swiper-content"
|
|
41
|
+
:style="{width: '100%', height: getHeight + 'px'}"
|
|
42
|
+
:indicator-dots="false"
|
|
43
|
+
:autoplay="config.carouselTime>0"
|
|
44
|
+
:interval="config.carouselTime"
|
|
45
|
+
:duration="500"
|
|
46
|
+
:current="current"
|
|
47
|
+
circular
|
|
48
|
+
@animationfinish="handleAnimationfinish"
|
|
49
|
+
>
|
|
50
|
+
<swiper-item v-for="(item,index) in list" :key="index">
|
|
51
|
+
<view
|
|
52
|
+
class="sreen__box-list"
|
|
53
|
+
:class="{s3:config.cell === 3,s4:config.cell === 4}"
|
|
54
|
+
:style="{ height: getHeight + 'px' }"
|
|
55
|
+
>
|
|
56
|
+
<view
|
|
57
|
+
v-for="(it, indext) in item"
|
|
58
|
+
:key="it['content_id']"
|
|
59
|
+
@click="handleClick(it)"
|
|
60
|
+
:style="{
|
|
61
|
+
borderRadius: config.radius + 'rpx',
|
|
62
|
+
width: config.width + 'px',
|
|
63
|
+
height: config.height + 'px',
|
|
64
|
+
marginRight: (indext+1) % config.cell === 0 ? 0: config.padding + 'rpx',
|
|
65
|
+
marginTop: indext < config.cell ? 0 : config.padding + 'rpx',
|
|
66
|
+
}"
|
|
67
|
+
>
|
|
68
|
+
<image :style="{ width: width + 'px', height: height + 'px'}" :src="it.image_url" mode="widthFix"></image>
|
|
69
|
+
</view>
|
|
70
|
+
</view>
|
|
71
|
+
</swiper-item>
|
|
72
|
+
</swiper>
|
|
73
|
+
<!--#endif-->
|
|
74
|
+
<!--#ifdef H5-->
|
|
38
75
|
<xd-swiper
|
|
39
76
|
:indicator-dots="false"
|
|
40
77
|
:interval="config.carouselTime"
|
|
@@ -45,31 +82,32 @@
|
|
|
45
82
|
@onClickItem="handleClick"
|
|
46
83
|
@animationfinish="handleAnimationfinish"
|
|
47
84
|
>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
85
|
+
<template slot-scope="{ item, index}">
|
|
86
|
+
<view
|
|
87
|
+
class="sreen__box-list"
|
|
51
88
|
:class="{s3:config.cell === 3,s4:config.cell === 4}"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
89
|
+
:style="{
|
|
90
|
+
height: getHeight + 'px'
|
|
91
|
+
}"
|
|
92
|
+
>
|
|
93
|
+
<view
|
|
94
|
+
v-for="(it, indext) in item"
|
|
95
|
+
:key="it['content_id']"
|
|
96
|
+
:style="{
|
|
97
|
+
borderRadius: config.radius + 'rpx',
|
|
98
|
+
width: config.width + 'px',
|
|
99
|
+
height: config.height + 'px',
|
|
100
|
+
marginRight: (indext+1) % config.cell === 0 ? 0: config.padding + 'rpx',
|
|
101
|
+
marginTop: indext < config.cell ? 0 : config.padding + 'rpx',
|
|
102
|
+
}"
|
|
103
|
+
@click="handleClick(it)"
|
|
104
|
+
>
|
|
105
|
+
<image :style="{ width: width + 'px', height: height + 'px'}" :src="it.image_url" mode="widthFix"></image>
|
|
106
|
+
</view>
|
|
107
|
+
</view>
|
|
108
|
+
</template>
|
|
72
109
|
</xd-swiper>
|
|
110
|
+
<!--#endif-->
|
|
73
111
|
</xd-swiper-dot>
|
|
74
112
|
</view>
|
|
75
113
|
<view v-if="isPreview" class="carousel-mask"></view>
|
|
@@ -133,6 +171,64 @@
|
|
|
133
171
|
handleAnimationfinish(e) {
|
|
134
172
|
this.current = e.detail.current;
|
|
135
173
|
},
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @description 过滤不可以用
|
|
177
|
+
* 当前项目未H5时,过滤所有小程序应用
|
|
178
|
+
* 当前项目未小程序时,过滤所有非当前小程序应用
|
|
179
|
+
* 站外地址直接返回
|
|
180
|
+
* 站内地址未选值直接返回
|
|
181
|
+
* 预览模式全过
|
|
182
|
+
*/
|
|
183
|
+
filterItem(){
|
|
184
|
+
let content = this.content.filter(item=>{
|
|
185
|
+
//预览模式
|
|
186
|
+
if( this.$configProject.isPreview) return true;
|
|
187
|
+
|
|
188
|
+
//非内部应用
|
|
189
|
+
if(item.redirect_type !== 'INN') return true
|
|
190
|
+
|
|
191
|
+
//没有配置链接
|
|
192
|
+
if(!item.redirect_data) return true;
|
|
193
|
+
|
|
194
|
+
//内部应用
|
|
195
|
+
else {
|
|
196
|
+
let redirect_data;
|
|
197
|
+
try {
|
|
198
|
+
redirect_data = JSON.parse(item.redirect_data);
|
|
199
|
+
if(!item['app_type']) item['app_type']= 'h5';
|
|
200
|
+
|
|
201
|
+
//#ifdef H5
|
|
202
|
+
return item['app_type'] !== 'wxmp';
|
|
203
|
+
//#endif
|
|
204
|
+
|
|
205
|
+
//#ifdef MP-WEIXIN
|
|
206
|
+
let actDir = this.$parent.projectAttr.deploy_dir;
|
|
207
|
+
let dir = this.getPathDir(redirect_data.page);
|
|
208
|
+
if(item['app_type'] === 'wxmp'){
|
|
209
|
+
return actDir === dir;
|
|
210
|
+
}
|
|
211
|
+
else if(item['app_type'] === 'h5') return true;
|
|
212
|
+
else return true
|
|
213
|
+
//#endif
|
|
214
|
+
}
|
|
215
|
+
catch (e) {
|
|
216
|
+
return true
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
console.warn(`PostersList:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
|
|
221
|
+
return content;
|
|
222
|
+
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
getPathDir(pathDir){
|
|
226
|
+
if(pathDir.indexOf('@site_domain@/') === 0) {
|
|
227
|
+
return pathDir.replace('@site_domain@/','').split('/')[0]
|
|
228
|
+
}
|
|
229
|
+
return ''
|
|
230
|
+
},
|
|
231
|
+
|
|
136
232
|
init() {
|
|
137
233
|
if (this.timer) clearTimeout(this.timer);
|
|
138
234
|
this.timer = setTimeout(() => {
|
|
@@ -140,6 +236,9 @@
|
|
|
140
236
|
this.height = Number(this.config.height);
|
|
141
237
|
this.padding = Number(this.config.padding);
|
|
142
238
|
|
|
239
|
+
//过滤不可以用
|
|
240
|
+
const content = this.filterItem();
|
|
241
|
+
|
|
143
242
|
//静态图显示
|
|
144
243
|
if(this.config.isCarousel === 1) {
|
|
145
244
|
this.list = this.content
|
|
@@ -156,50 +255,64 @@
|
|
|
156
255
|
}
|
|
157
256
|
}, 100)
|
|
158
257
|
},
|
|
258
|
+
|
|
159
259
|
handleClick(item) {
|
|
260
|
+
if(!item.redirect_data) {
|
|
261
|
+
console.warn(`未配置链接地址: ${item.redirect_data}`);
|
|
262
|
+
console.error(`未配置链接地址: ${item.redirect_data}`);
|
|
263
|
+
return
|
|
264
|
+
}
|
|
265
|
+
|
|
160
266
|
//内部链接跳转地址
|
|
161
267
|
if (item.redirect_type === 'INN') {
|
|
162
268
|
try {
|
|
163
269
|
let url = JSON.parse(item.redirect_data);
|
|
164
270
|
let params = '';
|
|
165
|
-
if
|
|
166
|
-
|
|
167
|
-
url: url.page + params
|
|
168
|
-
}
|
|
271
|
+
if(url.page) {
|
|
272
|
+
if (item['redirect_params']) params = `?${item['redirect_params']}`;
|
|
273
|
+
this.$xdUniHelper.navigateTo({url: url.page + params})
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
console.error(`应用链接配置错误: ${url.page}`)
|
|
277
|
+
}
|
|
169
278
|
} catch (e) {
|
|
170
|
-
console.error(
|
|
279
|
+
console.error(`应用链接配置错误: ${item.redirect_data}`)
|
|
171
280
|
}
|
|
172
281
|
}
|
|
173
282
|
|
|
174
283
|
//外部链接
|
|
175
284
|
if (item.redirect_type === 'URL') {
|
|
176
285
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
286
|
+
let spReg = /(-apiuri\/v)/;
|
|
177
287
|
//#ifdef MP-WEIXIN
|
|
178
288
|
try {
|
|
179
289
|
let url = JSON.parse(item.redirect_data);
|
|
180
|
-
if (reg.test(url.url)
|
|
290
|
+
if (reg.test(url.url) || spReg.test(url.url)) {
|
|
181
291
|
console.warn(`广告跳转外站: ${url.url}`)
|
|
182
|
-
this.$xdUniHelper.navigateTo(
|
|
183
|
-
url: `${this.$configProject.extras.webview}?seatUrl=${Base64.encodeURI(url.url)}`
|
|
184
|
-
});
|
|
292
|
+
this.$xdUniHelper.navigateTo(url);
|
|
185
293
|
} else {
|
|
186
|
-
|
|
294
|
+
console.error(`广告跳转外站配置错误: ${url.url}`)
|
|
187
295
|
}
|
|
188
296
|
} catch (e) {
|
|
189
|
-
console.error(
|
|
297
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
190
298
|
}
|
|
191
299
|
//#endif
|
|
192
300
|
//#ifdef H5
|
|
193
301
|
try {
|
|
194
302
|
let url = JSON.parse(item.redirect_data);
|
|
195
303
|
console.warn(`广告跳转外站: ${url.url}`);
|
|
196
|
-
this.$xdUniHelper.
|
|
304
|
+
this.$xdUniHelper.redirectTo(url, false)
|
|
197
305
|
} catch (e) {
|
|
198
|
-
console.error(
|
|
306
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
199
307
|
}
|
|
200
308
|
//#endif
|
|
201
309
|
|
|
202
310
|
}
|
|
311
|
+
|
|
312
|
+
//无跳转地址
|
|
313
|
+
if(item.redirect_type === 'EMP') {
|
|
314
|
+
console.warn(`无跳转地址`);
|
|
315
|
+
}
|
|
203
316
|
},
|
|
204
317
|
}
|
|
205
318
|
}
|
|
@@ -209,6 +322,7 @@
|
|
|
209
322
|
.sreen {
|
|
210
323
|
width: calc(100% + 4px); /**防止宽度不够问**/
|
|
211
324
|
position: relative;
|
|
325
|
+
height: 100%;
|
|
212
326
|
|
|
213
327
|
& .carousel-mask {
|
|
214
328
|
position: absolute;
|
|
@@ -226,6 +340,7 @@
|
|
|
226
340
|
flex-wrap: wrap;
|
|
227
341
|
overflow: hidden;
|
|
228
342
|
width: calc(100% + 20px); /**防止宽度不够问**/
|
|
343
|
+
height: 100%;
|
|
229
344
|
|
|
230
345
|
& > view {
|
|
231
346
|
display: flex;
|
|
@@ -238,6 +353,8 @@
|
|
|
238
353
|
}
|
|
239
354
|
|
|
240
355
|
&__box.carousel {
|
|
356
|
+
width: 100%;
|
|
357
|
+
height: 100%;
|
|
241
358
|
display: flex;
|
|
242
359
|
justify-content: flex-start;
|
|
243
360
|
align-items: flex-start;
|
|
@@ -247,6 +364,7 @@
|
|
|
247
364
|
|
|
248
365
|
& .sreen__box-list {
|
|
249
366
|
width: calc(100% + 20px); /**防止宽度不够问**/
|
|
367
|
+
height: 100%;
|
|
250
368
|
display: flex;
|
|
251
369
|
justify-content: flex-start;
|
|
252
370
|
align-items: flex-start;
|
|
@@ -50,7 +50,6 @@ export default {
|
|
|
50
50
|
value: params.height || 500,
|
|
51
51
|
className: 'input40',
|
|
52
52
|
placeholder: '请广告位内容间距设置',
|
|
53
|
-
disabled:xiugai,
|
|
54
53
|
notice: '广告位选取内容后,将无法修改,单位:像素,默认: <span style="color:red">500</span>像素',
|
|
55
54
|
inline: false,
|
|
56
55
|
},
|
|
@@ -60,7 +59,6 @@ export default {
|
|
|
60
59
|
groupKey:'style',
|
|
61
60
|
valueKey: 'margin',
|
|
62
61
|
value: params.margin || null,
|
|
63
|
-
disabled: xiugai,
|
|
64
62
|
setting: { type: 'margin'},
|
|
65
63
|
placeholder: '请设置广告位边距设置',
|
|
66
64
|
notice: '广告位选取内容后,将无法修改,单位:像素',
|
|
@@ -72,10 +70,9 @@ export default {
|
|
|
72
70
|
type: 'number',
|
|
73
71
|
valueKey: 'msMargin',
|
|
74
72
|
groupKey:'style',
|
|
75
|
-
value: params.msMargin
|
|
73
|
+
value: params.msMargin,
|
|
76
74
|
className: 'input40',
|
|
77
75
|
placeholder: '请广告位内容间距设置',
|
|
78
|
-
disabled: xiugai,
|
|
79
76
|
notice: '广告位选取内容后,将无法修改,单位:像素,默认: <span style="color:red">10</span>像素',
|
|
80
77
|
inline: false,
|
|
81
78
|
},
|