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
|
@@ -13,25 +13,18 @@
|
|
|
13
13
|
<view class="jfb-base-notice__edit-icon" @click="delEdit">删除</view>
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
|
-
<view class="jfb-base-notice__body">
|
|
16
|
+
<view class="jfb-base-notice__body" :style="[noticeComp]">
|
|
17
17
|
<view class="jfb-base-notice__body-line" v-if="contentList.length > 0"></view>
|
|
18
18
|
<view>
|
|
19
19
|
<template v-if="style === '3' && isPreview">
|
|
20
|
-
<view class="jfb-base-notice__body-pop" :style="
|
|
20
|
+
<view class="jfb-base-notice__body-pop" :style="[noDataStyleComp]">弹窗模式方便编辑(占位),在线上此模块不显</view>
|
|
21
21
|
</template>
|
|
22
22
|
<template v-if="style === '2'">
|
|
23
23
|
<template v-if="contentList.length === 0 && isPreview">
|
|
24
|
-
<view class="jfb-base-notice__body-pop" :style="
|
|
24
|
+
<view class="jfb-base-notice__body-pop" :style="[noDataStyleComp]">接口无数返回,请检查是否配置成功!</view>
|
|
25
25
|
</template>
|
|
26
26
|
<view v-if="contentList.length > 0" class="jfb-base-notice__body-scroll">
|
|
27
|
-
<view
|
|
28
|
-
class="upAndDown"
|
|
29
|
-
:style="{
|
|
30
|
-
backgroundColor:backgroundColor,
|
|
31
|
-
color:warningColor,
|
|
32
|
-
margin:scrollMarginUi,
|
|
33
|
-
}"
|
|
34
|
-
>
|
|
27
|
+
<view class="upAndDown" :style="[scrollStyleComp]">
|
|
35
28
|
<view>
|
|
36
29
|
<xd-font-icon icon="icontongzhi" :size="24"></xd-font-icon>
|
|
37
30
|
</view>
|
|
@@ -71,52 +64,35 @@
|
|
|
71
64
|
<xd-font-icon icon="iconxiangyou_xian" :size="24" @click="handleShow(true)"></xd-font-icon>
|
|
72
65
|
</view>
|
|
73
66
|
</view>
|
|
74
|
-
|
|
75
67
|
</view>
|
|
76
68
|
</template>
|
|
77
69
|
<template v-if="style === '1'">
|
|
78
70
|
<template v-if="!content && isPreview">
|
|
79
|
-
<view
|
|
80
|
-
class="jfb-base-notice__body-pop"
|
|
81
|
-
:style="{backgroundColor:backgroundColor, color:warningColor}"
|
|
82
|
-
>接口无数返回,请检查是否配置成功!</view>
|
|
71
|
+
<view class="jfb-base-notice__body-pop" :style="[noDataStyleComp]">接口无数返回,请检查是否配置成功!</view>
|
|
83
72
|
</template>
|
|
84
73
|
<template v-else>
|
|
85
|
-
<view :style="
|
|
86
|
-
<view
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
borderBottomColor: borderTitleColor,
|
|
95
|
-
textAlign: textAlign,
|
|
96
|
-
}"
|
|
97
|
-
v-if="isTitle"
|
|
98
|
-
>{{title}}</view>
|
|
99
|
-
<view
|
|
100
|
-
class="jfb-base-notice__body-content"
|
|
101
|
-
:style="{
|
|
102
|
-
background: bgc,
|
|
103
|
-
color:textColor,
|
|
104
|
-
borderRadius: contRadius,
|
|
105
|
-
padding: paddingComp,
|
|
106
|
-
lineHeight: '50rpx',
|
|
107
|
-
}"
|
|
108
|
-
v-if="content"
|
|
109
|
-
>
|
|
110
|
-
<image v-if="show_tip_icon==='Y' && staticTipIcon" :src="staticTipIcon"
|
|
111
|
-
:style="{height: tipIconHeight+'rpx'}"
|
|
112
|
-
style="width: auto;margin-right: 12rpx;" mode="heightFix"
|
|
74
|
+
<view :style="[oneBoxStyleComp]">
|
|
75
|
+
<view class="jfb-base-notice__body-title" :style="[oneTitleStyleComp]" v-if="isTitle" >{{title}}</view>
|
|
76
|
+
<view class="jfb-base-notice__body-content" :style="[oneContStyleComp]" v-if="content">
|
|
77
|
+
<image
|
|
78
|
+
v-if="show_tip_icon==='Y' && staticTipIcon"
|
|
79
|
+
:src="staticTipIcon"
|
|
80
|
+
:style="{height: '50rpx'}"
|
|
81
|
+
style="width: auto; margin-right: 12rpx;"
|
|
82
|
+
mode="heightFix"
|
|
113
83
|
></image>
|
|
114
|
-
<view
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}"
|
|
84
|
+
<view
|
|
85
|
+
v-if="show_tip_icon==='Y'"
|
|
86
|
+
class="jfb-base-notice__body-content_inner"
|
|
118
87
|
v-html="contentComp"
|
|
119
88
|
@click="handleShowStatic"
|
|
89
|
+
:style="{ fontSize: oneContStyleComp.fontSize}"
|
|
90
|
+
>
|
|
91
|
+
</view>
|
|
92
|
+
<view
|
|
93
|
+
v-else
|
|
94
|
+
v-html="contentComp"
|
|
95
|
+
:style="{ fontSize: oneContStyleComp.fontSize}"
|
|
120
96
|
>
|
|
121
97
|
</view>
|
|
122
98
|
</view>
|
|
@@ -124,7 +100,12 @@
|
|
|
124
100
|
</template>
|
|
125
101
|
</template>
|
|
126
102
|
</view>
|
|
127
|
-
<XdDailog
|
|
103
|
+
<XdDailog
|
|
104
|
+
:show.sync="showStaticDialog"
|
|
105
|
+
:showTitle="false"
|
|
106
|
+
:cancel="false"
|
|
107
|
+
:confirm="false"
|
|
108
|
+
>
|
|
128
109
|
<view style="padding-top: 60rpx;">
|
|
129
110
|
<xd-content-xss
|
|
130
111
|
:key="contentKey"
|
|
@@ -178,7 +159,7 @@
|
|
|
178
159
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
179
160
|
import extsMixins from "@/mixins/extsMixins"
|
|
180
161
|
import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer.vue";
|
|
181
|
-
import {
|
|
162
|
+
import {gCPVal } from "@/utils/xd.base";
|
|
182
163
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
183
164
|
import storage from "@/common/storage";
|
|
184
165
|
import Color from "color";
|
|
@@ -195,20 +176,28 @@
|
|
|
195
176
|
mixins: [componentsMixins,extsMixins,JfbBaseNoticeMixin],
|
|
196
177
|
data() {
|
|
197
178
|
return {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
textAlign: 'left', //标题对其方式
|
|
203
|
-
noData: false,
|
|
204
|
-
style: '1', //显示内容(静态/弹窗/滚动)
|
|
179
|
+
closeMask: true,
|
|
180
|
+
isMp:false, //是否为小程序
|
|
181
|
+
backgroundColor: '',//提示信息背景
|
|
182
|
+
isPreview: false,
|
|
205
183
|
|
|
206
|
-
|
|
207
|
-
|
|
184
|
+
//内容变量
|
|
185
|
+
contentList: [], //滚动列表
|
|
208
186
|
content : '', //内容
|
|
209
187
|
contentKey: 'contentKey',
|
|
210
|
-
|
|
188
|
+
title: '', //标题
|
|
189
|
+
|
|
190
|
+
//基础内容
|
|
191
|
+
style: '1', //显示内容(静态/弹窗/滚动)
|
|
192
|
+
notice:{},
|
|
193
|
+
num: 1, //滚动记录数量(滚动时候可以设置多条,其他模式只显示一条)
|
|
211
194
|
|
|
195
|
+
//style
|
|
196
|
+
//静态显示
|
|
197
|
+
isTitle: '', //是否显示标题
|
|
198
|
+
textAlign: 'left', //标题对其方式
|
|
199
|
+
bgc: '', //背景颜色
|
|
200
|
+
borderTitleColor: '#fff',//标题下边线
|
|
212
201
|
margin: {
|
|
213
202
|
top: 0,
|
|
214
203
|
left: 0,
|
|
@@ -228,30 +217,31 @@
|
|
|
228
217
|
right: 20
|
|
229
218
|
},
|
|
230
219
|
radius: 0, //圆角
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
220
|
+
contStyle:{},
|
|
221
|
+
titleStyle:{},
|
|
222
|
+
fontSize: 24,
|
|
223
|
+
|
|
224
|
+
//icon
|
|
225
|
+
show_tip_icon: "N",//是否展示icon
|
|
226
|
+
staticTipIcon: "", //icon路径
|
|
227
|
+
tipIconHeight: 50,//icon大小
|
|
228
|
+
|
|
235
229
|
|
|
236
230
|
//滚动
|
|
237
231
|
speed: 30, //滚动速度
|
|
232
|
+
scrollMargin:{},//滚动边距
|
|
233
|
+
scrollRadius:'0',
|
|
234
|
+
scrollShadow:'none',
|
|
235
|
+
scrollShadowWidth:0,
|
|
236
|
+
scrollBorder:0,
|
|
238
237
|
speedKey: 'speedKey',
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
scrollMargin:{},
|
|
243
|
-
|
|
244
|
-
backgroundColor: '',
|
|
245
|
-
is_hide_dailog:'N',
|
|
246
|
-
show_tip_icon: "",
|
|
247
|
-
staticTipIcon: "",
|
|
248
|
-
tipIconHeight: 50,
|
|
249
|
-
|
|
250
|
-
showStaticDialog: false,
|
|
238
|
+
timer: false, //调整速度重载
|
|
239
|
+
showStaticDialog: false, //打开确认框
|
|
240
|
+
showUp: false,//打开抽屉效果
|
|
251
241
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
btnConfirmWidth: "",
|
|
242
|
+
//弹窗显示
|
|
243
|
+
time: 3, //小时
|
|
244
|
+
btnConfirmWidth: "auto",
|
|
255
245
|
btnConfirmBgColor: "",
|
|
256
246
|
btnConfirmTextColor: "",
|
|
257
247
|
}
|
|
@@ -264,62 +254,73 @@
|
|
|
264
254
|
this.onJfbLoad()
|
|
265
255
|
}
|
|
266
256
|
},
|
|
267
|
-
num(){
|
|
268
|
-
if (this.$configProject['isPreview']) this.onJfbLoad()
|
|
269
|
-
},
|
|
270
|
-
style() {
|
|
271
|
-
if(this.$configProject['isPreview']) this.onJfbLoad()
|
|
272
|
-
},
|
|
273
|
-
speed(){
|
|
274
|
-
if(this.timer) {
|
|
275
|
-
clearTimeout(this.timer);
|
|
276
|
-
this.timer = null
|
|
277
|
-
}
|
|
278
|
-
setTimeout(()=>{
|
|
279
|
-
this.speedKey = Date.now()
|
|
280
|
-
}, 400)
|
|
281
|
-
|
|
282
|
-
},
|
|
283
|
-
is_hide_dailog(value){
|
|
284
|
-
if(value === 'N') {
|
|
285
|
-
storage.remove(this.containerId);
|
|
286
|
-
this.onJfbLoad();
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
257
|
},
|
|
290
258
|
computed:{
|
|
259
|
+
noDataStyleComp(){
|
|
260
|
+
return {
|
|
261
|
+
backgroundColor:this.backgroundColor,
|
|
262
|
+
color:this.warningColor
|
|
263
|
+
}
|
|
264
|
+
},
|
|
291
265
|
contentComp(){
|
|
292
266
|
if(this.show_tip_icon==='Y') return this.$xdUniHelper.filterHtml(this.content,'')
|
|
293
267
|
return this.content
|
|
294
268
|
},
|
|
295
|
-
|
|
296
|
-
return
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return this.getMarginAndPadding(this.padding, 20)
|
|
269
|
+
oneBoxStyleComp() {
|
|
270
|
+
return {
|
|
271
|
+
margin: this.getMarginAndPadding(this.margin, 0)
|
|
272
|
+
}
|
|
300
273
|
},
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
274
|
+
oneTitleStyleComp(){
|
|
275
|
+
return {
|
|
276
|
+
...this.titleStyle,
|
|
277
|
+
backgroundColor: this.bgc,
|
|
278
|
+
borderRadius: `${this.radius}rpx ${this.radius}rpx 0rpx 0rpx`,
|
|
279
|
+
padding: this.getMarginAndPadding(this.titlePadding, 0),
|
|
280
|
+
borderBottomColor: this.borderTitleColor,
|
|
281
|
+
textAlign: this.textAlign,
|
|
282
|
+
}
|
|
304
283
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
284
|
+
oneContStyleComp(){
|
|
285
|
+
return {
|
|
286
|
+
...this.contStyle,
|
|
287
|
+
background: this.bgc,
|
|
288
|
+
borderRadius: this.contRadius,
|
|
289
|
+
padding: this.getMarginAndPadding(this.padding, 0),
|
|
290
|
+
lineHeight: '50rpx',
|
|
291
|
+
}
|
|
310
292
|
},
|
|
311
293
|
contRadius(){
|
|
312
294
|
if(this.isTitle) return `0rpx 0rpx ${this.radius}rpx ${this.radius}rpx`;
|
|
313
295
|
else return `${this.radius}rpx`;
|
|
314
296
|
},
|
|
315
|
-
titleRadius() {
|
|
316
|
-
return `${this.radius}rpx ${this.radius}rpx 0rpx 0rpx `
|
|
317
|
-
},
|
|
318
|
-
|
|
319
297
|
getScrollType(){
|
|
320
298
|
return this.num > 1
|
|
321
299
|
},
|
|
322
|
-
|
|
300
|
+
noticeComp(){
|
|
301
|
+
let height = 100;
|
|
302
|
+
if(this.style === '2') height = 70;
|
|
303
|
+
return {
|
|
304
|
+
minHeight: height + 'rpx',
|
|
305
|
+
'--jufubao-min-height': height + 'rpx'
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
scrollStyleComp(){
|
|
309
|
+
let margin = {
|
|
310
|
+
top: Math.max(this.scrollMargin.top,this.scrollShadowWidth),
|
|
311
|
+
bottom: Math.max(this.scrollMargin.bottom,this.scrollShadowWidth),
|
|
312
|
+
left: Math.max(this.scrollMargin.left,this.scrollShadowWidth),
|
|
313
|
+
right: Math.max(this.scrollMargin.right,this.scrollShadowWidth),
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
return {
|
|
317
|
+
...this.noDataStyleComp,
|
|
318
|
+
margin: this.getMarginAndPadding(margin, 0),
|
|
319
|
+
borderRadius: this.scrollRadius + 'rpx',
|
|
320
|
+
border: this.scrollBorder,
|
|
321
|
+
boxShadow:this.scrollShadow
|
|
322
|
+
}
|
|
323
|
+
}
|
|
323
324
|
},
|
|
324
325
|
created() {
|
|
325
326
|
this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
@@ -341,51 +342,68 @@
|
|
|
341
342
|
*/
|
|
342
343
|
init(container) {
|
|
343
344
|
let colorBg = Color(this.warningColor).alpha(0.1).array();
|
|
344
|
-
this.style = getContainerPropsValue(container, 'content.style', '1');
|
|
345
|
-
this.time = Number(getContainerPropsValue(container, 'content.time', 3));
|
|
346
|
-
this.textColor = getContainerPropsValue(container, 'content.textColor', this.warningColor);
|
|
347
|
-
this.textAlign = getContainerPropsValue(container, 'content.textAlign', 'left');
|
|
348
345
|
|
|
349
|
-
|
|
346
|
+
//基础
|
|
347
|
+
this.style = gCPVal(container, 'style', '1');
|
|
348
|
+
this.notice = gCPVal(container, 'notice', {position:{},type:'notice'});
|
|
349
|
+
|
|
350
|
+
//style
|
|
351
|
+
//静态显示
|
|
352
|
+
let textColor = gCPVal(container, 'textColor', this.warningColor);
|
|
353
|
+
this.textAlign = gCPVal(container, 'textAlign', 'left');
|
|
354
|
+
this.isTitle = gCPVal(container, 'isTitle', false);
|
|
355
|
+
this.margin = gCPVal(container, 'margin', [0],{sKey: 'marginStatus', fields: ['margin'], isPMR: true});
|
|
356
|
+
this.padding = gCPVal(container, 'padding', [16,20],{sKey: 'paddingStatus', fields: ['padding'], isPMR: true});
|
|
357
|
+
this.radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
|
|
358
|
+
|
|
359
|
+
//背景与下边线边框
|
|
360
|
+
this.bgc = gCPVal(container, 'bgc', `rgba(${colorBg.join(',')})`,{sKey:'bgcStatus',fields:['bgc']});
|
|
350
361
|
if(Color(this.bgc).isDark()) this.borderTitleColor = Color(this.bgc).lighten(0.9).toString();
|
|
351
362
|
else if(Color(this.bgc).isLight()) this.borderTitleColor = Color(this.bgc).darken(0.05).toString();
|
|
363
|
+
this.titlePadding = gCPVal(container, 'titlePadding', [16,20],{sKey: 'titlePaddingStatus', fields: ['titlePadding'], isPMR: true});
|
|
352
364
|
|
|
365
|
+
//icon
|
|
366
|
+
this.show_tip_icon = gCPVal(container, 'show_tip_icon', 'N');
|
|
367
|
+
let staticTipIcon = gCPVal(container, 'staticTipIcon', '');
|
|
368
|
+
this.staticTipIcon = staticTipIcon ? getServiceUrl(staticTipIcon.url) : '';
|
|
353
369
|
|
|
354
370
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
this.
|
|
361
|
-
this.fontSize = Number(getContainerPropsValue(container, 'content.fontSize', '20'));
|
|
362
|
-
this.titleFontSize = this.fontSize * 1.2;
|
|
363
|
-
this.btnConfirmWidth = getContainerPropsValue(container, 'content.btnConfirmWidth', '');
|
|
364
|
-
this.btnConfirmBgColor = getContainerPropsValue(container, 'content.btnConfirmBgColor', '');
|
|
365
|
-
this.btnConfirmTextColor = getContainerPropsValue(container, 'content.btnConfirmTextColor', '');
|
|
366
|
-
this.show_tip_icon = getContainerPropsValue(container, 'content.show_tip_icon', '');
|
|
367
|
-
let staticTipIcon = getContainerPropsValue(container, 'content.staticTipIcon', '');
|
|
368
|
-
this.staticTipIcon = staticTipIcon ? getServiceUrl(staticTipIcon.url) : '';
|
|
369
|
-
this.tipIconHeight = getContainerPropsValue(container, 'content.tipIconHeight', 50);
|
|
371
|
+
//文字样式
|
|
372
|
+
let fontSize = Number(gCPVal(container, 'fontSize', '20'));
|
|
373
|
+
let defContStyle = {color:textColor,fontSize:'24rpx',fontWeight:'normal'}, defOldContStyle={color:textColor,fontSize:`${fontSize}rpx`,fontWeight:'normal'};
|
|
374
|
+
let defTitleStyle = {color:textColor,fontSize:'28rpx',fontWeight:'normal'}, defOldTitleStyle = {color:textColor,fontSize:`${fontSize + 4}rpx`,fontWeight:'normal'};
|
|
375
|
+
this.contStyle = gCPVal(container, 'contStyle', [defContStyle,defOldContStyle],{sKey: 'contStyleStatus', fields: ['contStyle'],isMerge: true});
|
|
376
|
+
this.titleStyle = gCPVal(container, 'titleStyle', [defTitleStyle,defOldTitleStyle],{sKey: 'titleStyleStatus', fields: ['titleStyle'],isMerge: true});
|
|
370
377
|
|
|
378
|
+
//滚动显示
|
|
379
|
+
this.scrollMargin = gCPVal(container, 'scrollMargin', 0,{sKey: 'scrollMarginStatus', fields: ['scrollMargin'], isPMR: true});
|
|
380
|
+
this.scrollRadius = gCPVal(container, 'scrollRadius', [this.gStyleValue.radius,0],{sKey: 'scrollRadiusStatus', fields: ['scrollRadius']})||0;
|
|
381
|
+
this.scrollShadow = gCPVal(container, 'scrollShadow', [this.gStyleValue.shadow, {color:'',width:'0',}],{isShadow: true});
|
|
382
|
+
this.scrollShadowWidth = gCPVal(container, 'scrollShadow', [this.gStyleValue.shadow, {color:'',width:'0',}],{isShadow: true,isBsWidth: true});
|
|
383
|
+
this.scrollBorder = gCPVal(container, 'scrollBorder', [{color: '#fff',width: 0,style: 'solid'}],{isBorder: true});
|
|
371
384
|
|
|
372
|
-
if (this.fontSize === 20) this.titleFontSize = 28;
|
|
373
|
-
if (this.fontSize === 26) this.titleFontSize = 36;
|
|
374
|
-
if (this.fontSize === 36) this.titleFontSize = 44;
|
|
375
|
-
this.isTitle = getContainerPropsValue(container, 'content.isTitle', false);
|
|
376
385
|
|
|
377
386
|
if(this.style === '2') {
|
|
378
|
-
this.num =
|
|
387
|
+
this.num = gCPVal(container, 'num', 1, {sKey:'numStatus',fields:['num']});
|
|
388
|
+
const speed = Number(gCPVal(container, 'speed', 30, {sKey: 'speedStatus', fields:['speed']}));
|
|
379
389
|
//#ifdef H5
|
|
380
|
-
this.speed =
|
|
390
|
+
this.speed = speed;
|
|
381
391
|
//#endif
|
|
382
392
|
//#ifdef MP-WEIXIN
|
|
383
|
-
this.speed =
|
|
393
|
+
this.speed = speed/2.5;
|
|
384
394
|
//#endif
|
|
385
395
|
}
|
|
386
396
|
else this.num = 1;
|
|
387
|
-
|
|
397
|
+
|
|
398
|
+
//弹窗显示
|
|
399
|
+
const defBtnFields= ['btnConfirmWidth','btnConfirmBgColor','btnConfirmTextColor']
|
|
400
|
+
this.time = Number(gCPVal(container, 'time', '3',{sKey:'timeStatus',fields:['time']}));
|
|
401
|
+
this.btnConfirmWidth = gCPVal(container, 'btnConfirmWidth', 'auto',{sKey:'btnStatus',fields:defBtnFields});
|
|
402
|
+
this.btnConfirmBgColor = gCPVal(container, 'btnConfirmBgColor', '',{sKey:'btnStatus',fields:defBtnFields});
|
|
403
|
+
this.btnConfirmTextColor = gCPVal(container, 'btnConfirmTextColor', '',{sKey:'btnStatus',fields:defBtnFields});
|
|
404
|
+
|
|
388
405
|
},
|
|
406
|
+
|
|
389
407
|
handleShowStatic(){
|
|
390
408
|
if(this.show_tip_icon === 'Y') {
|
|
391
409
|
this.$xdConfirm({
|
|
@@ -404,7 +422,7 @@
|
|
|
404
422
|
storage.set(this.containerId, 1, this.time);
|
|
405
423
|
this.$xdConfirm({
|
|
406
424
|
styles: this.styles,
|
|
407
|
-
title: this.title
|
|
425
|
+
title: this.title,
|
|
408
426
|
content: this.content,
|
|
409
427
|
isHtml: true,
|
|
410
428
|
zIndex: 2000,
|
|
@@ -416,14 +434,13 @@
|
|
|
416
434
|
},
|
|
417
435
|
|
|
418
436
|
getContent(){
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
})
|
|
437
|
+
|
|
438
|
+
let params = {
|
|
439
|
+
page_id: this.pageAttr['page_id'], //页面ID
|
|
440
|
+
container_id: this.containerId, //组件ID
|
|
441
|
+
page_size:['2'].includes(this.style)? this.num : 1 //可以不传
|
|
442
|
+
}
|
|
443
|
+
jfbRootExec('getListNewsContent', { vm: this,data: params})
|
|
427
444
|
.then(res => {
|
|
428
445
|
//弹窗显示
|
|
429
446
|
if (this.style === '3') {
|
|
@@ -434,12 +451,12 @@
|
|
|
434
451
|
}
|
|
435
452
|
}
|
|
436
453
|
|
|
454
|
+
//滚动模式
|
|
437
455
|
else if(this.style === '2') {
|
|
438
456
|
if(res.list.length > 0) {
|
|
439
457
|
this.contentList = res.list;
|
|
440
458
|
this.speedKey = Date.now()
|
|
441
459
|
}
|
|
442
|
-
|
|
443
460
|
}
|
|
444
461
|
|
|
445
462
|
//静态显示
|
|
@@ -449,37 +466,25 @@
|
|
|
449
466
|
this.contentKey = Date.now();
|
|
450
467
|
this.title = res.list[0].title;
|
|
451
468
|
}
|
|
452
|
-
this.noData = res.list.length > 0;
|
|
453
469
|
}
|
|
454
470
|
|
|
455
471
|
})
|
|
456
472
|
.catch(error => {
|
|
457
|
-
console.error(error)
|
|
473
|
+
console.error(error);
|
|
474
|
+
this.contentList = [];
|
|
475
|
+
this.title = ''
|
|
458
476
|
})
|
|
459
477
|
},
|
|
460
478
|
|
|
461
479
|
onJfbLoad() {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
this.
|
|
468
|
-
//弹窗模式
|
|
469
|
-
if(this.style === '3') {
|
|
470
|
-
if(this.isPreview) {
|
|
471
|
-
if(this.is_hide_dailog === 'N') this.getContent();
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
if(!storage.get(this.containerId)) this.getContent()
|
|
475
|
-
}
|
|
476
|
-
}
|
|
480
|
+
this.title = '';
|
|
481
|
+
this.content = '';
|
|
482
|
+
this.contentList = [];
|
|
483
|
+
this.showUp = false;
|
|
484
|
+
this.showStaticDialog = false;
|
|
485
|
+
storage.remove(this.containerId);
|
|
477
486
|
|
|
478
|
-
|
|
479
|
-
else {
|
|
480
|
-
this.getContent()
|
|
481
|
-
}
|
|
482
|
-
}, 500)
|
|
487
|
+
this.getContent();
|
|
483
488
|
},
|
|
484
489
|
|
|
485
490
|
onJfbUpdate(data) {
|
|
@@ -497,7 +502,7 @@
|
|
|
497
502
|
|
|
498
503
|
.jfb-base-notice {
|
|
499
504
|
position: relative;
|
|
500
|
-
|
|
505
|
+
min-height: var(--jufubao-min-height)!important;
|
|
501
506
|
|
|
502
507
|
&__body{
|
|
503
508
|
.content-list {
|
|
@@ -576,6 +581,7 @@
|
|
|
576
581
|
|
|
577
582
|
.upAndDown-swiper-all {
|
|
578
583
|
padding: unit(40, rpx) unit(30, rpx) unit(40, rpx);
|
|
584
|
+
height: calc(1000rpx - 80rpx);
|
|
579
585
|
|
|
580
586
|
&-list{
|
|
581
587
|
padding-bottom: unit(40, rpx);
|
|
@@ -598,13 +604,14 @@
|
|
|
598
604
|
|
|
599
605
|
& > view:first-child {
|
|
600
606
|
padding-bottom: unit(30, rpx);
|
|
601
|
-
|
|
607
|
+
height: calc(100% - 120rpx);
|
|
602
608
|
overflow-y: auto;
|
|
603
609
|
margin: unit(40, rpx) unit(10, rpx) unit(20, rpx);
|
|
604
610
|
}
|
|
605
611
|
|
|
606
612
|
}
|
|
607
613
|
}
|
|
614
|
+
|
|
608
615
|
.isMp {
|
|
609
616
|
width: 100%;
|
|
610
617
|
}
|