jufubao-third 1.0.22-beta6 → 1.0.22-beta9
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,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
3
|
class="jfb-third-ride-land"
|
|
4
|
-
:style="bgStyle"
|
|
5
4
|
@click="handleEditxSelect"
|
|
6
5
|
:class="{ editx : isEditx && active }"
|
|
7
6
|
>
|
|
@@ -16,26 +15,14 @@
|
|
|
16
15
|
</view>
|
|
17
16
|
</view>
|
|
18
17
|
<!-- #endif -->
|
|
19
|
-
<view class="jfb-third-ride-land__body" :style="bodyStyle">
|
|
20
|
-
|
|
21
|
-
<view class="jfb-third-ride-land__card" :style="cardStyle">
|
|
22
|
-
<xd-content-xss
|
|
23
|
-
v-if="contentHtml"
|
|
24
|
-
:html="contentHtml"
|
|
25
|
-
></xd-content-xss>
|
|
26
|
-
<!-- 编辑预览态的占位提示 -->
|
|
27
|
-
<view v-else-if="isEditx && active" class="jfb-third-ride-land__card-placeholder">
|
|
28
|
-
服务须知内容为空,请在右侧属性面板编辑富文本内容
|
|
29
|
-
</view>
|
|
30
|
-
</view>
|
|
31
|
-
|
|
32
|
-
<!-- 底部按钮 -->
|
|
18
|
+
<view class="jfb-third-ride-land__body" :style="[bodyStyle, bgStyle]">
|
|
19
|
+
<view class="land_box" :style="cardStyle" v-html="contentHtml"></view>
|
|
33
20
|
<view
|
|
34
|
-
class="
|
|
35
|
-
:class="{ '
|
|
21
|
+
class="land_btn"
|
|
22
|
+
:class="{ 'land_btn--disabled': btnDisabled }"
|
|
36
23
|
@click="handleBtnClick"
|
|
37
24
|
>
|
|
38
|
-
<text class="
|
|
25
|
+
<text class="land_btn-text">{{ btnText }}{{ countdownText }}</text>
|
|
39
26
|
</view>
|
|
40
27
|
</view>
|
|
41
28
|
</view>
|
|
@@ -43,23 +30,23 @@
|
|
|
43
30
|
|
|
44
31
|
<script>
|
|
45
32
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
46
|
-
import
|
|
33
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
34
|
+
import JfbThirdRideLandMixin from "./JfbThirdRideLandMixin";
|
|
47
35
|
import { gCPVal } from "@/utils/xd.base";
|
|
36
|
+
import posterMixins from "@/mixins/posterMixins";
|
|
48
37
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
49
38
|
import extsMixins from "@/mixins/extsMixins";
|
|
50
39
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
51
40
|
export default {
|
|
52
41
|
name: "JfbThirdRideLand",
|
|
53
42
|
components: {
|
|
54
|
-
XdFontIcon
|
|
55
|
-
XdContentXss
|
|
43
|
+
XdFontIcon
|
|
56
44
|
},
|
|
57
45
|
mixins: [
|
|
58
|
-
componentsMixins, extsMixins
|
|
46
|
+
componentsMixins, extsMixins, JfbThirdRideLandMixin, posterMixins
|
|
59
47
|
],
|
|
60
48
|
data() {
|
|
61
49
|
return {
|
|
62
|
-
xnamespace: '',
|
|
63
50
|
//内容
|
|
64
51
|
contentHtml: '',
|
|
65
52
|
btnText: '我已知晓',
|
|
@@ -68,7 +55,6 @@
|
|
|
68
55
|
countdownLeft: 0,
|
|
69
56
|
countdownTimer: null,
|
|
70
57
|
//样式
|
|
71
|
-
bgColor: '',
|
|
72
58
|
bgImage: '',
|
|
73
59
|
margin: {},
|
|
74
60
|
padding: {},
|
|
@@ -76,10 +62,9 @@
|
|
|
76
62
|
}
|
|
77
63
|
},
|
|
78
64
|
computed: {
|
|
79
|
-
|
|
65
|
+
//页面背景(背景图)
|
|
80
66
|
bgStyle(){
|
|
81
67
|
let style = {};
|
|
82
|
-
if(this.bgColor) style.backgroundColor = this.bgColor;
|
|
83
68
|
if(this.bgImage) {
|
|
84
69
|
style.backgroundImage = `url(${getServiceUrl(this.bgImage)})`;
|
|
85
70
|
style.backgroundSize = '100% 100%';
|
|
@@ -90,11 +75,16 @@
|
|
|
90
75
|
},
|
|
91
76
|
//外边距
|
|
92
77
|
bodyStyle(){
|
|
93
|
-
|
|
78
|
+
let style = {
|
|
94
79
|
padding: this.getMarginAndPadding(this.margin, 32)
|
|
80
|
+
};
|
|
81
|
+
//最小高度为窗口内容区高度
|
|
82
|
+
if(this.layoutInfo && this.layoutInfo.bodyMinHeightRpx) {
|
|
83
|
+
style.minHeight = this.layoutInfo.bodyMinHeightRpx + 'rpx';
|
|
95
84
|
}
|
|
85
|
+
return style;
|
|
96
86
|
},
|
|
97
|
-
|
|
87
|
+
//内容卡片样式(内边距 + 圆角)
|
|
98
88
|
cardStyle(){
|
|
99
89
|
return {
|
|
100
90
|
padding: this.getMarginAndPadding(this.padding, 32),
|
|
@@ -107,7 +97,7 @@
|
|
|
107
97
|
},
|
|
108
98
|
//倒计时文案
|
|
109
99
|
countdownText(){
|
|
110
|
-
return this.btnDisabled ?
|
|
100
|
+
return this.btnDisabled ? `(${this.countdownLeft}s)` : '';
|
|
111
101
|
}
|
|
112
102
|
},
|
|
113
103
|
watch: {
|
|
@@ -118,24 +108,36 @@
|
|
|
118
108
|
},
|
|
119
109
|
created() {
|
|
120
110
|
this.init(this.container);
|
|
111
|
+
|
|
112
|
+
//todo
|
|
121
113
|
},
|
|
122
114
|
beforeDestroy() {
|
|
123
115
|
this.clearCountdown();
|
|
124
116
|
},
|
|
125
117
|
methods: {
|
|
118
|
+
onJfbLoad(options) {
|
|
119
|
+
|
|
120
|
+
// jfbRootExec('baiduUserLogin', {
|
|
121
|
+
|
|
122
|
+
// vm: this,// data: {
|
|
123
|
+
|
|
124
|
+
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
125
|
+
|
|
126
|
+
// }
|
|
127
|
+
|
|
128
|
+
// }).then().catch()
|
|
129
|
+
},
|
|
126
130
|
/**
|
|
127
131
|
* @description 监听事件变化
|
|
128
132
|
* @param container {object} 业务组件对象自己
|
|
129
133
|
*/
|
|
130
134
|
init(container) {
|
|
131
135
|
//内容
|
|
132
|
-
this.xnamespace = gCPVal(container, 'xnamespace', '');
|
|
133
136
|
this.contentHtml = gCPVal(container, 'contentHtml', '');
|
|
134
137
|
this.btnText = gCPVal(container, 'btnText', '我已知晓');
|
|
135
|
-
this.btnLink = gCPVal(container, 'btnLink', {value: ''});
|
|
138
|
+
this.btnLink = gCPVal(container, 'btnLink', {value: ''}).value;
|
|
136
139
|
this.countdown = gCPVal(container, 'countdown', 0);
|
|
137
140
|
//样式
|
|
138
|
-
this.bgColor = gCPVal(container, 'bgColor', '');
|
|
139
141
|
let bgImageVal = gCPVal(container, 'bgImage', {});
|
|
140
142
|
this.bgImage = bgImageVal && bgImageVal.url ? bgImageVal.url : '';
|
|
141
143
|
this.margin = gCPVal(container, 'margin', 32, {sKey: 'marginStatus', fields: ['margin'], isPM: true});
|
|
@@ -167,18 +169,25 @@
|
|
|
167
169
|
}
|
|
168
170
|
this.countdownLeft = 0;
|
|
169
171
|
},
|
|
172
|
+
createUrlPosterItem(url=''){
|
|
173
|
+
return {
|
|
174
|
+
redirect_type: 'URL',
|
|
175
|
+
redirect_data: JSON.stringify({url}),
|
|
176
|
+
app_type: 'h5',
|
|
177
|
+
redirect_params: '',
|
|
178
|
+
deploy_dir: ''
|
|
179
|
+
};
|
|
180
|
+
},
|
|
170
181
|
/**
|
|
171
182
|
* @description 点击按钮,倒计时结束后跳转配置的链接
|
|
172
183
|
*/
|
|
173
184
|
handleBtnClick(){
|
|
174
185
|
if (this.$configProject['isPreview']) return;
|
|
175
186
|
if(this.btnDisabled) return;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
this
|
|
179
|
-
|
|
180
|
-
onJfbLoad() {
|
|
181
|
-
// 倒计时依赖配置属性,已在 init 中启动
|
|
187
|
+
this.handlePosterClick(this.createUrlPosterItem(this.btnLink))
|
|
188
|
+
// this.$xdUniHelper.navigateTo({
|
|
189
|
+
// url: this.btnLink
|
|
190
|
+
// });
|
|
182
191
|
},
|
|
183
192
|
onJfbScroll(options) {
|
|
184
193
|
console.log('event.onJfbScroll', options)
|
|
@@ -203,55 +212,45 @@
|
|
|
203
212
|
},
|
|
204
213
|
}
|
|
205
214
|
}
|
|
215
|
+
|
|
206
216
|
</script>
|
|
207
217
|
|
|
208
218
|
<style scoped lang="less">
|
|
209
219
|
@import "./JfbThirdRideLandLess.less";
|
|
210
220
|
|
|
211
221
|
.jfb-third-ride-land {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
&__body {
|
|
215
|
-
box-sizing: border-box;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
//内容卡片
|
|
219
|
-
&__card {
|
|
220
|
-
position: relative;
|
|
222
|
+
&__body{
|
|
221
223
|
box-sizing: border-box;
|
|
222
|
-
background: #FFFFFF;
|
|
223
|
-
border-radius: 24rpx;
|
|
224
224
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
color: #CCCCCC;
|
|
225
|
+
.land_box{
|
|
226
|
+
background: #FFFFFF;
|
|
228
227
|
}
|
|
229
|
-
}
|
|
230
228
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
229
|
+
//底部按钮
|
|
230
|
+
.land_btn{
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
width: 448rpx;
|
|
235
|
+
margin: 48rpx auto 0;
|
|
236
|
+
padding: 30rpx 0;
|
|
237
|
+
background: #FFFFFF;
|
|
238
|
+
border-radius: 60rpx;
|
|
239
|
+
|
|
240
|
+
.land_btn-text {
|
|
241
|
+
color: #333333;
|
|
242
|
+
font-size: 28rpx;
|
|
243
|
+
letter-spacing: 2rpx;
|
|
244
|
+
}
|
|
241
245
|
|
|
242
|
-
|
|
243
|
-
|
|
246
|
+
&--disabled {
|
|
247
|
+
background: #E6E6E9;
|
|
244
248
|
|
|
245
|
-
|
|
246
|
-
|
|
249
|
+
.land_btn-text {
|
|
250
|
+
color: #999999;
|
|
251
|
+
}
|
|
247
252
|
}
|
|
248
253
|
}
|
|
249
254
|
}
|
|
250
|
-
|
|
251
|
-
&__btn-text {
|
|
252
|
-
color: #FFFFFF;
|
|
253
|
-
font-size: 28rpx;
|
|
254
|
-
letter-spacing: 2rpx;
|
|
255
|
-
}
|
|
256
255
|
}
|
|
257
256
|
</style>
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
export default (data, gValue, gColor, oldData) => {
|
|
4
4
|
return [
|
|
5
5
|
//高级
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
6
|
+
// {
|
|
7
|
+
// label: '按钮跳转',
|
|
8
|
+
// groupKey:'advanced',
|
|
9
|
+
// className: 'input100',
|
|
10
|
+
// ele: 'xd-select-pages-path',
|
|
11
|
+
// valueKey: 'btnLink',
|
|
12
|
+
// placeholder: '请选择按钮跳转页面路径',
|
|
13
|
+
// labelInline: true,
|
|
14
|
+
// inline: false,
|
|
15
|
+
// value: data['btnLink'] || null,
|
|
16
|
+
// setting: {
|
|
17
|
+
// mode:'new',
|
|
18
|
+
// router: XdBus.getParentApi('getPagesTree')
|
|
19
|
+
// },
|
|
20
|
+
// },
|
|
21
21
|
].filter(i=>i)
|
|
22
22
|
}
|
|
@@ -13,26 +13,6 @@ export default (data, gValue, gColor, oldData) => {
|
|
|
13
13
|
type: ["jpg", "png", "jpeg", "gif"],
|
|
14
14
|
};
|
|
15
15
|
return [
|
|
16
|
-
//内容
|
|
17
|
-
{
|
|
18
|
-
label: "业务线",
|
|
19
|
-
ele: "xd-choose-namespace",
|
|
20
|
-
valueKey: "xnamespace",
|
|
21
|
-
value: dataVal({data, key:'xnamespace', dValue:"", gValue}),
|
|
22
|
-
groupKey:'content',
|
|
23
|
-
className: 'input80',
|
|
24
|
-
labelInline:true,
|
|
25
|
-
placeholder: '请选择业务线',
|
|
26
|
-
notice: '空继承上级业务线',
|
|
27
|
-
inline: false,
|
|
28
|
-
handleCustom: (cb) => {
|
|
29
|
-
XdBus.getParentApi('getOptionsNamespaces')()
|
|
30
|
-
.then(res => {
|
|
31
|
-
cb(res.list)
|
|
32
|
-
})
|
|
33
|
-
.catch();
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
16
|
//富文本内容
|
|
37
17
|
{
|
|
38
18
|
label: "须知内容:",
|
|
@@ -54,6 +34,16 @@ export default (data, gValue, gColor, oldData) => {
|
|
|
54
34
|
labelInline: true,
|
|
55
35
|
className: 'input100',
|
|
56
36
|
},
|
|
37
|
+
{
|
|
38
|
+
label: "按钮跳转链接",
|
|
39
|
+
ele: "el-input",
|
|
40
|
+
groupKey: 'content',
|
|
41
|
+
valueKey: "btnLink",
|
|
42
|
+
value: dataVal({data, key: 'btnLink', dValue: '', gValue}),
|
|
43
|
+
placeholder: '请输入按钮跳转链接',
|
|
44
|
+
labelInline: true,
|
|
45
|
+
className: 'input100',
|
|
46
|
+
},
|
|
57
47
|
//倒计时秒数
|
|
58
48
|
{
|
|
59
49
|
label: '倒计时秒数:',
|
|
@@ -13,8 +13,8 @@ export default (data, gValue, gColor, oldData) => {
|
|
|
13
13
|
value: data.bgImage || {},
|
|
14
14
|
defaultValue: data.bgImage || null,
|
|
15
15
|
slot: true,
|
|
16
|
-
oneWidth:
|
|
17
|
-
oneHeight:
|
|
16
|
+
oneWidth: 750/4,
|
|
17
|
+
oneHeight: 1000/4,
|
|
18
18
|
elinputClassName: 'input40',
|
|
19
19
|
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议宽度为<span style="color:red">750px</span>',
|
|
20
20
|
type: ['jpg', 'png', 'jpeg'],
|
|
@@ -26,20 +26,6 @@ export default (data, gValue, gColor, oldData) => {
|
|
|
26
26
|
maxlen: 1,
|
|
27
27
|
labelInline: true,
|
|
28
28
|
},
|
|
29
|
-
//背景色
|
|
30
|
-
{
|
|
31
|
-
label: '背景色:',
|
|
32
|
-
ele: 'xd-color',
|
|
33
|
-
groupKey: 'style',
|
|
34
|
-
valueKey: 'bgColor',
|
|
35
|
-
value: dataVal({data, key:'bgColor', dValue:'#E4F3FF', gValue}),
|
|
36
|
-
placeholder: '请选择页面背景色',
|
|
37
|
-
className: 'input80',
|
|
38
|
-
labelInline: true,
|
|
39
|
-
setting: {
|
|
40
|
-
showAlpha: true
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
29
|
//外边距
|
|
44
30
|
{
|
|
45
31
|
label: '外边距',
|