jufubao-base 1.0.311-beta1 → 1.0.311-beta101
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/components/JfbBaseBlock/Attr.js +167 -34
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +12 -9
- package/src/components/JfbBaseCardDetail/Attr.js +0 -12
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +1 -162
- package/src/components/JfbBaseCardDetailEntry/Attr.js +0 -12
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +2 -163
- package/src/components/JfbBaseEntry/Attr.js +5 -72
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +183 -47
- package/src/components/JfbBaseEntry/cusAttr/content.js +77 -0
- package/src/components/JfbBaseEntry/cusAttr/style.js +288 -0
- package/src/components/JfbBaseImageBlock/Attr.js +150 -23
- package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +29 -27
- package/src/components/JfbBaseNotice/Attr.js +5 -512
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +188 -181
- package/src/components/JfbBaseNotice/cusAttr/content.js +308 -0
- package/src/components/JfbBaseNotice/cusAttr/cssOne.js +395 -0
- package/src/components/JfbBaseNotice/cusAttr/cssThree.js +101 -0
- package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +208 -0
- package/src/components/JfbBaseNotice/cusAttr/style.js +31 -0
- package/src/components/JfbBaseVideo/Attr.js +5 -297
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +36 -62
- package/src/components/JfbBaseVideo/cusAttr/content.js +236 -0
- package/src/components/JfbBaseVideo/cusAttr/image.js +213 -0
- package/src/components/JfbBaseVideo/cusAttr/style.js +172 -0
|
@@ -108,49 +108,6 @@
|
|
|
108
108
|
</view>
|
|
109
109
|
</view>
|
|
110
110
|
</view>
|
|
111
|
-
<xd-down-drawer
|
|
112
|
-
:show.sync="showDialog"
|
|
113
|
-
height="50vh"
|
|
114
|
-
>
|
|
115
|
-
<template>
|
|
116
|
-
<view class="top_title">请务必先关联,否则影响此卡使用</view>
|
|
117
|
-
<view class="method_item">
|
|
118
|
-
<view class="method_item_top">
|
|
119
|
-
<view class="method_title">方法一</view>
|
|
120
|
-
<view>复制文本,打开支付宝APP</view>
|
|
121
|
-
</view>
|
|
122
|
-
<view class="method_item_bottom">
|
|
123
|
-
<view class="method_item_bottom_left">吱口令:{{share_code}}</view>
|
|
124
|
-
<view class="method_item_bottom_right" @click="copy(share_code)">复制吱口令</view>
|
|
125
|
-
</view>
|
|
126
|
-
</view>
|
|
127
|
-
<view class="method_item">
|
|
128
|
-
<view class="method_item_top">
|
|
129
|
-
<view class="method_title">方法二</view>
|
|
130
|
-
<view>复制链接,在默认浏览器打开</view>
|
|
131
|
-
</view>
|
|
132
|
-
<view class="method_item_bottom">
|
|
133
|
-
<view class="method_item_bottom_left">{{sign_url}}</view>
|
|
134
|
-
<view class="method_item_bottom_right" @click="copy(sign_url)">复制链接</view>
|
|
135
|
-
</view>
|
|
136
|
-
</view>
|
|
137
|
-
<view class="method_item">
|
|
138
|
-
<view class="method_item_top">
|
|
139
|
-
<view class="method_title">方法三</view>
|
|
140
|
-
<view>保存图片,使用支付宝APP扫码</view>
|
|
141
|
-
</view>
|
|
142
|
-
<view class="method_item_bottom code_img">
|
|
143
|
-
<view>打开支付宝APP,点击扫一扫直接扫码或点击相册中保存图片</view>
|
|
144
|
-
<view class="code_box">
|
|
145
|
-
<view class="qr_code">
|
|
146
|
-
<image mode="aspectFit" :src="sign_url_qrcode"></image>
|
|
147
|
-
</view>
|
|
148
|
-
<view>长按保存二维码</view>
|
|
149
|
-
</view>
|
|
150
|
-
</view>
|
|
151
|
-
</view>
|
|
152
|
-
</template>
|
|
153
|
-
</xd-down-drawer>
|
|
154
111
|
</view>
|
|
155
112
|
</template>
|
|
156
113
|
|
|
@@ -169,7 +126,6 @@ import XdPwPay from "./XdPwPay";
|
|
|
169
126
|
import XdEditPwd from "./XdEditPwd";
|
|
170
127
|
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
171
128
|
import XdButton from '@/components/XdButton/XdButton'
|
|
172
|
-
import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer"
|
|
173
129
|
import {parsePath} from "@/utils/linkUrl";
|
|
174
130
|
export default {
|
|
175
131
|
name: "JfbBaseCardDetailEntry",
|
|
@@ -178,8 +134,7 @@ export default {
|
|
|
178
134
|
XdPwPay,
|
|
179
135
|
XdEditPwd,
|
|
180
136
|
XdUnit,
|
|
181
|
-
XdButton
|
|
182
|
-
XdDownDrawer,
|
|
137
|
+
XdButton
|
|
183
138
|
},
|
|
184
139
|
mixins: [
|
|
185
140
|
componentsMixins,extsMixins,JfbBaseCardDetailEntryMixin,colorCardMixins,
|
|
@@ -221,13 +176,7 @@ export default {
|
|
|
221
176
|
isBrandLogo: false,
|
|
222
177
|
isShowUnbind: false, //是否启动绑定按钮
|
|
223
178
|
headerBg: {},
|
|
224
|
-
give_url: ""
|
|
225
|
-
collect_phone_url: "",//收集手机号地址
|
|
226
|
-
showDialog:false,
|
|
227
|
-
sign_url:'',
|
|
228
|
-
share_code:'',
|
|
229
|
-
sign_url_qrcode:'',
|
|
230
|
-
toCollectPhoneUrl:'',
|
|
179
|
+
give_url: ""
|
|
231
180
|
};
|
|
232
181
|
},
|
|
233
182
|
watch: {
|
|
@@ -244,15 +193,6 @@ export default {
|
|
|
244
193
|
},
|
|
245
194
|
},
|
|
246
195
|
created() {
|
|
247
|
-
// ifDef小程序拼接问题
|
|
248
|
-
let url = this.$xdUniHelper.parseURL();
|
|
249
|
-
// #ifdef MP-WEIXIN
|
|
250
|
-
this.toCollectPhoneUrl = url.relative
|
|
251
|
-
// #endif
|
|
252
|
-
// #ifdef H5
|
|
253
|
-
this.toCollectPhoneUrl = '@site_domain@'+''+url.relative
|
|
254
|
-
// #endif
|
|
255
|
-
console.log(this.toCollectPhoneUrl,encodeURIComponent(this.toCollectPhoneUrl),'this.toCollectPhoneUrl')
|
|
256
196
|
this.init(this.container)
|
|
257
197
|
},
|
|
258
198
|
methods: {
|
|
@@ -288,8 +228,6 @@ export default {
|
|
|
288
228
|
this.backUrl = getContainerPropsValue(container, "content.back_url", { value: "" }).value;
|
|
289
229
|
this.shift_url = getContainerPropsValue(container, "content.shift_url", { value: "" }).value;
|
|
290
230
|
this.give_url = getContainerPropsValue(container, "content.give_url", { value: "" }).value;
|
|
291
|
-
this.collect_phone_url = getContainerPropsValue(container, "content.collect_phone_url", { value: "" }).value;
|
|
292
|
-
console.log(this.collect_phone_url,'collect_phone_url')
|
|
293
231
|
//'wechat_mini_program|default'
|
|
294
232
|
this.entryGroupId = getContainerPropsValue(container,"content.entryGroupId","default");
|
|
295
233
|
},
|
|
@@ -341,19 +279,6 @@ export default {
|
|
|
341
279
|
this.show = false;
|
|
342
280
|
console.log(this.getCardThemes(res.card_type_name),'this.getCardThemes(res.card_type_name)');
|
|
343
281
|
this.headerBg = this.getCardThemes(res.card_type_name);
|
|
344
|
-
//支付宝弹框
|
|
345
|
-
if(res.enterprise_info&&res.enterprise_info.is_need_activate==='Y'){
|
|
346
|
-
this.share_code = res.enterprise_info.share_code;
|
|
347
|
-
this.sign_url = res.enterprise_info.sign_url;
|
|
348
|
-
this.sign_url_qrcode = res.enterprise_info.sign_url_qrcode;
|
|
349
|
-
if(res.enterprise_info.is_need_collect_phone_number==='Y'){
|
|
350
|
-
let url = `${this.collect_phone_url}?callback_url=${encodeURIComponent(this.toCollectPhoneUrl)}`
|
|
351
|
-
this.$xdUniHelper.navigateTo({
|
|
352
|
-
url:url,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
this.showDialog = true;
|
|
356
|
-
}
|
|
357
282
|
})
|
|
358
283
|
.catch((err) => {
|
|
359
284
|
// this.$refs["pwPay"].clearPwd();
|
|
@@ -633,26 +558,6 @@ export default {
|
|
|
633
558
|
clearTimeout(this.refrushTimeer);
|
|
634
559
|
}
|
|
635
560
|
},
|
|
636
|
-
/**
|
|
637
|
-
*@description 复制功能
|
|
638
|
-
* @param text
|
|
639
|
-
*/
|
|
640
|
-
copy(text) {
|
|
641
|
-
// #ifdef H5
|
|
642
|
-
this.$copyText(text).then((res) => {
|
|
643
|
-
this.$xdAlert({ content: "复制成功" });
|
|
644
|
-
});
|
|
645
|
-
// #endif
|
|
646
|
-
// #ifndef H5
|
|
647
|
-
uni.setClipboardData({
|
|
648
|
-
data: text,
|
|
649
|
-
showToast: false,
|
|
650
|
-
success: () => {
|
|
651
|
-
//this.$xdAlert({ content: "复制成功" });
|
|
652
|
-
},
|
|
653
|
-
});
|
|
654
|
-
// #endif
|
|
655
|
-
},
|
|
656
561
|
},
|
|
657
562
|
};
|
|
658
563
|
</script>
|
|
@@ -1103,71 +1008,5 @@ export default {
|
|
|
1103
1008
|
|
|
1104
1009
|
}
|
|
1105
1010
|
}
|
|
1106
|
-
.method_item{
|
|
1107
|
-
padding: unit(32, rpx);
|
|
1108
|
-
border-bottom: 1px solid #F8F8F8;
|
|
1109
|
-
color: #333333;
|
|
1110
|
-
font-size: unit(28,rpx);
|
|
1111
|
-
&_top{
|
|
1112
|
-
display: flex;
|
|
1113
|
-
align-items: center;
|
|
1114
|
-
}
|
|
1115
|
-
&_bottom{
|
|
1116
|
-
display: flex;
|
|
1117
|
-
justify-content: space-between;
|
|
1118
|
-
align-items: flex-start;
|
|
1119
|
-
margin-top: unit(16, rpx);
|
|
1120
|
-
height: unit(32,rpx);
|
|
1121
|
-
line-height: unit(32,rpx);
|
|
1122
|
-
font-size: unit(24,rpx);
|
|
1123
|
-
color: #666666;
|
|
1124
|
-
&_right{
|
|
1125
|
-
min-width: unit(180,rpx);
|
|
1126
|
-
text-align: right;
|
|
1127
|
-
color: #FF8D1A;
|
|
1128
|
-
}
|
|
1129
|
-
&_left{
|
|
1130
|
-
color: #666666;
|
|
1131
|
-
white-space: nowrap;
|
|
1132
|
-
overflow: hidden;
|
|
1133
|
-
text-overflow: ellipsis;
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
.code_img{
|
|
1137
|
-
height: auto!important;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
}
|
|
1141
|
-
.method_title{
|
|
1142
|
-
color: #fff;
|
|
1143
|
-
background-color: #FF8D1A;
|
|
1144
|
-
width: unit(120,rpx);
|
|
1145
|
-
height: unit(50,rpx);
|
|
1146
|
-
line-height: unit(50,rpx);
|
|
1147
|
-
border-radius: unit(25,rpx);
|
|
1148
|
-
text-align: center;
|
|
1149
|
-
margin-right: unit(20,rpx);
|
|
1150
|
-
font-size: unit(24,rpx);
|
|
1151
|
-
}
|
|
1152
|
-
.top_title{
|
|
1153
|
-
height: unit(100,rpx);
|
|
1154
|
-
text-align: center;
|
|
1155
|
-
line-height:unit(100,rpx);
|
|
1156
|
-
color:#333333;
|
|
1157
|
-
font-size:unit(32,rpx);
|
|
1158
|
-
border-bottom: 1px solid #F8F8F8;
|
|
1159
|
-
}
|
|
1160
|
-
.code_box{
|
|
1161
|
-
text-align: center;
|
|
1162
|
-
.qr_code{
|
|
1163
|
-
width: unit(168,rpx);
|
|
1164
|
-
height: unit(168,rpx);
|
|
1165
|
-
image{
|
|
1166
|
-
width: 100%;
|
|
1167
|
-
height: 100%;
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
1011
|
}
|
|
1173
1012
|
</style>
|
|
@@ -1,83 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
import content from "./cusAttr/content";
|
|
3
|
+
import style from "./cusAttr/style";
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
7
|
*/
|
|
6
8
|
export default {
|
|
7
9
|
style: [],
|
|
8
|
-
content: (data) => {
|
|
10
|
+
content: (data, gValue, gColor, oldData={}) => {
|
|
9
11
|
return [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ele: 'xd-site-select-list',
|
|
13
|
-
valueKey: 'entryType',
|
|
14
|
-
value: data['entryType'],
|
|
15
|
-
placeholder: '请选择综合入口类型',
|
|
16
|
-
multiple: false,
|
|
17
|
-
groupKey:'content',
|
|
18
|
-
className: 'input50',
|
|
19
|
-
rules: [
|
|
20
|
-
{required: true, message: '请选择综合入口类型', trigger: ['blur', 'change']}
|
|
21
|
-
],
|
|
22
|
-
handleCustom({action, data}) {
|
|
23
|
-
XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
|
|
24
|
-
.then(res => {
|
|
25
|
-
data.cb(res.list)
|
|
26
|
-
})
|
|
27
|
-
.catch(error => {
|
|
28
|
-
console.error(error);
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: '每行显示数量',
|
|
34
|
-
ele: 'xd-radio',
|
|
35
|
-
valueKey: 'rowNum',
|
|
36
|
-
groupKey: 'content',
|
|
37
|
-
value: data.rowNum || 1,
|
|
38
|
-
rules: [
|
|
39
|
-
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
40
|
-
],
|
|
41
|
-
list: [
|
|
42
|
-
{"label": "一行一列", "value": 1},
|
|
43
|
-
{"label": "一行二列", "value": 2},
|
|
44
|
-
{"label": "一行三列", "value": 3},
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
label: '背景颜色:',
|
|
49
|
-
ele: 'xd-color',
|
|
50
|
-
valueKey: 'bgcolor',
|
|
51
|
-
value: data.bgcolor || '',
|
|
52
|
-
groupKey: 'style',
|
|
53
|
-
placeholder: '请输入背景颜色',
|
|
54
|
-
classNmae: 'input80',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: '间隔边距',
|
|
58
|
-
ele: 'el-input',
|
|
59
|
-
type: 'number',
|
|
60
|
-
valueKey: "paddingInput",
|
|
61
|
-
groupKey: 'style',
|
|
62
|
-
value: data.paddingInput || '',
|
|
63
|
-
placeholder: '请输入间隔边距',
|
|
64
|
-
inline: false,
|
|
65
|
-
className:'input60',
|
|
66
|
-
notice: '设置间隔边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: '边距设置:',
|
|
70
|
-
ele: 'xd-margin-padding',
|
|
71
|
-
valueKey: 'margin',
|
|
72
|
-
groupKey:'style',
|
|
73
|
-
value: data.margin || null,
|
|
74
|
-
setting: {
|
|
75
|
-
type: 'margin',
|
|
76
|
-
},
|
|
77
|
-
placeholder: '请设置边距设置',
|
|
78
|
-
inline: false,
|
|
79
|
-
notice: '设置边距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
|
|
80
|
-
},
|
|
12
|
+
...content(data, gValue, gColor, oldData),
|
|
13
|
+
...style(data, gValue, gColor, oldData),
|
|
81
14
|
].filter(i=>i)
|
|
82
15
|
},
|
|
83
16
|
advanced: [
|
|
@@ -13,30 +13,40 @@
|
|
|
13
13
|
<view class="jfb-base-entry__edit-icon" @click="delEdit">删除</view>
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
|
-
<view class="jfb-base-entry__body"
|
|
17
|
-
<view
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
<view class="jfb-base-entry__body">
|
|
17
|
+
<view class="x-line"></view>
|
|
18
|
+
<view :style="[contStyleComp]">
|
|
19
|
+
<view
|
|
20
|
+
v-if="entryList === null"
|
|
21
|
+
class="entry_list skeleton-wrap"
|
|
22
|
+
:class="{rowNum1: rowNum ===1,rowNum2: rowNum ===2,rowNum3: rowNum ===3}"
|
|
23
|
+
>
|
|
24
|
+
<view
|
|
25
|
+
v-for="i in 5"
|
|
26
|
+
:key="i"
|
|
20
27
|
:class="'row_num_'+rowNum"
|
|
21
28
|
class="entry_item"
|
|
29
|
+
:style="[entryItemSkeStyleComp]"
|
|
22
30
|
>
|
|
23
|
-
<image v-if="rowNum == 1" style="height: 260rpx;"/>
|
|
24
|
-
<image v-if="rowNum == 2" style="height: 200rpx;"/>
|
|
25
|
-
<image v-if="rowNum == 3" style="height: 150rpx;"/>
|
|
26
31
|
</view>
|
|
27
32
|
</view>
|
|
28
|
-
<view
|
|
33
|
+
<view
|
|
34
|
+
v-else
|
|
35
|
+
class="entry_list"
|
|
36
|
+
:class="{rowNum1: rowNum ===1,rowNum2: rowNum ===2,rowNum3: rowNum ===3}"
|
|
37
|
+
>
|
|
29
38
|
<view
|
|
39
|
+
:style="[entryItemStyleComp]"
|
|
30
40
|
v-if="entryList.length > 0"
|
|
31
41
|
v-for="(item,i) in entryList"
|
|
32
42
|
:key="i"
|
|
33
43
|
class="entry_item"
|
|
34
|
-
:class="'row_num_'+rowNum"
|
|
44
|
+
:class="'row_num_'+ rowNum"
|
|
35
45
|
@click="toLink(item)"
|
|
36
46
|
>
|
|
37
|
-
<image v-if="rowNum
|
|
38
|
-
<image v-if="rowNum
|
|
39
|
-
<image v-if="rowNum
|
|
47
|
+
<image v-if="rowNum === 1" :src="item.image_url" mode="widthFix"/>
|
|
48
|
+
<image v-if="rowNum === 2" :src="item.image_url2" mode="widthFix"/>
|
|
49
|
+
<image v-if="rowNum === 3" :src="item.image_url3" mode="widthFix"/>
|
|
40
50
|
</view>
|
|
41
51
|
<xd-no-data
|
|
42
52
|
icon-type="empty"
|
|
@@ -53,7 +63,7 @@
|
|
|
53
63
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
54
64
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
55
65
|
import JfbBaseEntryMixin from "./JfbBaseEntryMixin";
|
|
56
|
-
import {
|
|
66
|
+
import { gCPVal } from "@/utils/xd.base";
|
|
57
67
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
58
68
|
import extsMixins from "@/mixins/extsMixins";
|
|
59
69
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
@@ -70,61 +80,147 @@
|
|
|
70
80
|
],
|
|
71
81
|
data() {
|
|
72
82
|
return {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
closeMask: true,
|
|
84
|
+
entryList: null,
|
|
85
|
+
height: 0,
|
|
86
|
+
width: 0,
|
|
87
|
+
|
|
88
|
+
//content
|
|
89
|
+
rowNum: 1, //列数
|
|
79
90
|
entryType: '',
|
|
91
|
+
|
|
92
|
+
//style
|
|
93
|
+
radius:0,
|
|
94
|
+
bgcolor: "", //背景色
|
|
95
|
+
bgImage:{}, //背景图
|
|
96
|
+
paddingInput: 20, //间距
|
|
97
|
+
margin: {}, //边距
|
|
98
|
+
contRadius:0,//圆角
|
|
99
|
+
padding:{},//填充
|
|
80
100
|
}
|
|
81
101
|
},
|
|
82
102
|
computed: {
|
|
83
103
|
...mapState(['brandInfo']),
|
|
84
|
-
|
|
85
|
-
|
|
104
|
+
contStyleComp(){
|
|
105
|
+
let marginTB = this.getPMValue(this.margin, 'TB', 0);
|
|
106
|
+
let paddingTB = this.getPMValue(this.padding, 'TB', 0);
|
|
107
|
+
let bodyMinHeight = this.layoutInfo.bodyMinHeightRpx - (marginTB + paddingTB)
|
|
108
|
+
let url = {};
|
|
109
|
+
if(this.bgImage && this.bgImage.url) {
|
|
110
|
+
url = {
|
|
111
|
+
backgroundImage: `url(${getServiceUrl(this.bgImage.url)})`,
|
|
112
|
+
backgroundSize: '100%',
|
|
113
|
+
backgroundRepeat: 'repeat-y',
|
|
114
|
+
backgroundPosition: 'top center'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
86
118
|
backgroundColor: this.bgcolor,
|
|
87
|
-
minHeight:
|
|
88
|
-
|
|
119
|
+
minHeight: bodyMinHeight + 'rpx',
|
|
120
|
+
margin: this.getMarginAndPadding(this.margin, 0),
|
|
121
|
+
padding: this.getMarginAndPadding(this.padding, 0),
|
|
122
|
+
borderRadius: this.radius + 'rpx',
|
|
123
|
+
...url
|
|
124
|
+
}
|
|
89
125
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
126
|
+
getWidthComp(){
|
|
127
|
+
let marginRL = this.getPMValue(this.margin, 'RL', 0);
|
|
128
|
+
let paddingRL = this.getPMValue(this.padding, 'RL', 0);
|
|
129
|
+
return (750 - (Number(this.paddingInput)*(this.rowNum-1) + marginRL + paddingRL)) / this.rowNum
|
|
130
|
+
},
|
|
131
|
+
getMarginRight(){
|
|
132
|
+
let marginRight = 0;
|
|
133
|
+
if([2,3].includes(this.rowNum)) marginRight = this.paddingInput + 'rpx';
|
|
134
|
+
return marginRight
|
|
96
135
|
},
|
|
97
|
-
|
|
98
|
-
let
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
136
|
+
entryItemSkeStyleComp(){
|
|
137
|
+
let width = this.getWidthComp
|
|
138
|
+
let height = '260rpx';
|
|
139
|
+
if([2,3].includes(this.rowNum)) height = '300rpx';
|
|
140
|
+
return {
|
|
141
|
+
borderRadius: this.contRadius + 'rpx',
|
|
142
|
+
marginTop: this.paddingInput + 'rpx',
|
|
143
|
+
marginRight: this.getMarginRight,
|
|
144
|
+
height,
|
|
145
|
+
width: width + 'rpx'
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
entryItemStyleComp(){
|
|
149
|
+
let width = this.getWidthComp
|
|
150
|
+
return {
|
|
151
|
+
borderRadius: this.contRadius + 'rpx',
|
|
152
|
+
marginTop: this.paddingInput + 'rpx',
|
|
153
|
+
width: width + 'rpx',
|
|
154
|
+
marginRight: this.getMarginRight,
|
|
155
|
+
height: width * this.height/this.width + 'rpx',
|
|
156
|
+
overflow: 'hidden'
|
|
157
|
+
}
|
|
103
158
|
}
|
|
104
159
|
},
|
|
105
160
|
watch: {
|
|
106
161
|
container(value,oldValue) {
|
|
107
162
|
if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
108
|
-
if (this.$configProject['isPreview'])
|
|
163
|
+
if (this.$configProject['isPreview']) {
|
|
164
|
+
this.init(value);
|
|
165
|
+
this.onJfbLoad()
|
|
166
|
+
}
|
|
109
167
|
},
|
|
110
168
|
},
|
|
111
169
|
created() {
|
|
112
170
|
this.init(this.container);
|
|
113
171
|
},
|
|
114
172
|
methods: {
|
|
115
|
-
onJfbLoad(
|
|
173
|
+
onJfbLoad() {
|
|
116
174
|
this.getEntrySetting();
|
|
117
175
|
},
|
|
176
|
+
|
|
177
|
+
getImageInfo(entryList){
|
|
178
|
+
return new Promise((resolve,reject)=>{
|
|
179
|
+
let heightAll = 0,widthAll = 0, counter = 0, allCouter = 0;
|
|
180
|
+
let len = entryList.length;
|
|
181
|
+
entryList.map(item=>{
|
|
182
|
+
let imgUrl = item['image_url'];
|
|
183
|
+
if(this.rowNum === 2) imgUrl = item['image_url2'];
|
|
184
|
+
if(this.rowNum === 3) imgUrl = item['image_url3'];
|
|
185
|
+
uni.getImageInfo({
|
|
186
|
+
src:imgUrl,
|
|
187
|
+
success:({width,height})=>{
|
|
188
|
+
heightAll += height;
|
|
189
|
+
widthAll += width;
|
|
190
|
+
allCouter++;
|
|
191
|
+
counter++;
|
|
192
|
+
if(len === allCouter){
|
|
193
|
+
resolve({height:heightAll/counter, width: widthAll/counter})
|
|
194
|
+
}
|
|
195
|
+
},fail:()=>{
|
|
196
|
+
allCouter++;
|
|
197
|
+
if(len === allCouter){
|
|
198
|
+
resolve({height:heightAll/counter, width: widthAll/counter})
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
},
|
|
205
|
+
|
|
118
206
|
/**
|
|
119
207
|
* @description 监听事件变化
|
|
120
208
|
* @param container {object} 业务组件对象自己
|
|
121
209
|
*/
|
|
122
210
|
init(container) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
127
|
-
|
|
211
|
+
|
|
212
|
+
//content
|
|
213
|
+
this.rowNum = gCPVal(container, 'rowNum', 1);
|
|
214
|
+
this.entryType = gCPVal(container, 'entryType', 'default');
|
|
215
|
+
|
|
216
|
+
//style
|
|
217
|
+
this.bgcolor = gCPVal(container, 'bgcolor', 'rgba(0,0,0,0)',{sKey:'bgStatus',fields:['bgcolor','bgImage']});
|
|
218
|
+
this.bgImage = gCPVal(container, 'bgImage', {},{sKey:'bgStatus',fields:['bgcolor','bgImage']});
|
|
219
|
+
this.paddingInput = gCPVal(container, 'paddingInput', [16,20], {sKey:'paddingInputStatus',fields:['paddingInput'] });
|
|
220
|
+
this.margin = gCPVal(container, 'margin', 0, {sKey: 'marginStatus',fields:['margin'], isPMR: true});
|
|
221
|
+
this.padding = gCPVal(container, 'padding', 0, {sKey: 'paddingStatus',fields:['padding'], isPMR: true});
|
|
222
|
+
this.contRadius = gCPVal(container, 'contRadius', [this.gStyleValue.radius,0],{sKey: 'contRadiusStatus', fields: ['contRadius']})||0;
|
|
223
|
+
this.radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
|
|
128
224
|
},
|
|
129
225
|
|
|
130
226
|
getCardPath(custom_redirect_data = {}){
|
|
@@ -152,6 +248,7 @@
|
|
|
152
248
|
else return null;
|
|
153
249
|
//#endif
|
|
154
250
|
},
|
|
251
|
+
|
|
155
252
|
getEntrySetting(){
|
|
156
253
|
this.$xdShowLoading({});
|
|
157
254
|
jfbRootExec("getEntrySetting", {
|
|
@@ -159,8 +256,7 @@
|
|
|
159
256
|
data: {
|
|
160
257
|
group_id:this.entryType || 'default'
|
|
161
258
|
}
|
|
162
|
-
}).then(res => {
|
|
163
|
-
this.loadingList = false;
|
|
259
|
+
}).then(async (res) => {
|
|
164
260
|
this.$xdHideLoading();
|
|
165
261
|
let isH5FilterEntryList = [];
|
|
166
262
|
let isMpFilterEntryList = [];
|
|
@@ -226,6 +322,11 @@
|
|
|
226
322
|
return item;
|
|
227
323
|
});
|
|
228
324
|
|
|
325
|
+
//获取平均高度
|
|
326
|
+
let {width, height} = await this.getImageInfo(entryList);
|
|
327
|
+
this.width = width;
|
|
328
|
+
this.height = height;
|
|
329
|
+
|
|
229
330
|
//#ifdef MP-WEIXIN
|
|
230
331
|
console.warn(`微信小程序端被过滤的入口列表:${JSON.stringify(isMpFilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
|
|
231
332
|
//#endif
|
|
@@ -239,15 +340,18 @@
|
|
|
239
340
|
this.toLink(entryList[0]);
|
|
240
341
|
return
|
|
241
342
|
}
|
|
343
|
+
|
|
242
344
|
//无数据提示
|
|
243
345
|
if(res.list.length === 0) {
|
|
244
346
|
this.$xdAlert({content: '当前票券暂无支持服务'})
|
|
245
347
|
return;
|
|
246
348
|
}
|
|
349
|
+
|
|
247
350
|
//复制
|
|
248
|
-
this.entryList = entryList;
|
|
351
|
+
this.entryList = entryList || [];
|
|
249
352
|
})
|
|
250
353
|
},
|
|
354
|
+
|
|
251
355
|
toLink(item){
|
|
252
356
|
let path = "";
|
|
253
357
|
try{
|
|
@@ -271,11 +375,43 @@
|
|
|
271
375
|
|
|
272
376
|
<style scoped lang="less">
|
|
273
377
|
@import "./JfbBaseEntryLess.less";
|
|
274
|
-
|
|
378
|
+
//:class="{rowNum1: rowNum ===1,rowNum2: rowNum ===2,rowNum3: rowNum ===3}"
|
|
275
379
|
.jfb-base-entry {
|
|
276
380
|
&__body{
|
|
277
381
|
.entry_list{
|
|
278
|
-
|
|
382
|
+
&.rowNum1 {
|
|
383
|
+
& >view:first-child {
|
|
384
|
+
margin-top: 0!important;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
&.rowNum2,&.rowNum3 {
|
|
388
|
+
display: flex;
|
|
389
|
+
justify-content: flex-start;
|
|
390
|
+
align-items: center;
|
|
391
|
+
flex-flow: wrap;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
&.rowNum2 {
|
|
395
|
+
& > view:nth-child(1),& > view:nth-child(2) {
|
|
396
|
+
margin-top: 0!important;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
&.rowNum2 > view:nth-child(2n) {
|
|
401
|
+
margin-right: 0!important;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
&.rowNum3 > view:nth-child(3n) {
|
|
405
|
+
margin-right: 0!important;
|
|
406
|
+
}
|
|
407
|
+
&.rowNum3 {
|
|
408
|
+
& > view:nth-child(1),
|
|
409
|
+
& > view:nth-child(2),
|
|
410
|
+
& > view:nth-child(3) {
|
|
411
|
+
margin-top: 0!important;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
279
415
|
&.skeleton-wrap{
|
|
280
416
|
.entry_item{
|
|
281
417
|
.skeleton-item(100%, auto);
|