jufubao-third 1.0.22-beta6 → 1.0.22-beta8
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,7 +30,8 @@
|
|
|
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";
|
|
48
36
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
49
37
|
import extsMixins from "@/mixins/extsMixins";
|
|
@@ -51,15 +39,13 @@
|
|
|
51
39
|
export default {
|
|
52
40
|
name: "JfbThirdRideLand",
|
|
53
41
|
components: {
|
|
54
|
-
XdFontIcon
|
|
55
|
-
XdContentXss
|
|
42
|
+
XdFontIcon
|
|
56
43
|
},
|
|
57
44
|
mixins: [
|
|
58
|
-
componentsMixins, extsMixins
|
|
45
|
+
componentsMixins, extsMixins, JfbThirdRideLandMixin
|
|
59
46
|
],
|
|
60
47
|
data() {
|
|
61
48
|
return {
|
|
62
|
-
xnamespace: '',
|
|
63
49
|
//内容
|
|
64
50
|
contentHtml: '',
|
|
65
51
|
btnText: '我已知晓',
|
|
@@ -68,7 +54,6 @@
|
|
|
68
54
|
countdownLeft: 0,
|
|
69
55
|
countdownTimer: null,
|
|
70
56
|
//样式
|
|
71
|
-
bgColor: '',
|
|
72
57
|
bgImage: '',
|
|
73
58
|
margin: {},
|
|
74
59
|
padding: {},
|
|
@@ -76,10 +61,9 @@
|
|
|
76
61
|
}
|
|
77
62
|
},
|
|
78
63
|
computed: {
|
|
79
|
-
|
|
64
|
+
//页面背景(背景图)
|
|
80
65
|
bgStyle(){
|
|
81
66
|
let style = {};
|
|
82
|
-
if(this.bgColor) style.backgroundColor = this.bgColor;
|
|
83
67
|
if(this.bgImage) {
|
|
84
68
|
style.backgroundImage = `url(${getServiceUrl(this.bgImage)})`;
|
|
85
69
|
style.backgroundSize = '100% 100%';
|
|
@@ -90,11 +74,16 @@
|
|
|
90
74
|
},
|
|
91
75
|
//外边距
|
|
92
76
|
bodyStyle(){
|
|
93
|
-
|
|
77
|
+
let style = {
|
|
94
78
|
padding: this.getMarginAndPadding(this.margin, 32)
|
|
79
|
+
};
|
|
80
|
+
//最小高度为窗口内容区高度
|
|
81
|
+
if(this.layoutInfo && this.layoutInfo.bodyMinHeightRpx) {
|
|
82
|
+
style.minHeight = this.layoutInfo.bodyMinHeightRpx + 'rpx';
|
|
95
83
|
}
|
|
84
|
+
return style;
|
|
96
85
|
},
|
|
97
|
-
|
|
86
|
+
//内容卡片样式(内边距 + 圆角)
|
|
98
87
|
cardStyle(){
|
|
99
88
|
return {
|
|
100
89
|
padding: this.getMarginAndPadding(this.padding, 32),
|
|
@@ -107,7 +96,7 @@
|
|
|
107
96
|
},
|
|
108
97
|
//倒计时文案
|
|
109
98
|
countdownText(){
|
|
110
|
-
return this.btnDisabled ?
|
|
99
|
+
return this.btnDisabled ? `(${this.countdownLeft}s)` : '';
|
|
111
100
|
}
|
|
112
101
|
},
|
|
113
102
|
watch: {
|
|
@@ -118,24 +107,36 @@
|
|
|
118
107
|
},
|
|
119
108
|
created() {
|
|
120
109
|
this.init(this.container);
|
|
110
|
+
|
|
111
|
+
//todo
|
|
121
112
|
},
|
|
122
113
|
beforeDestroy() {
|
|
123
114
|
this.clearCountdown();
|
|
124
115
|
},
|
|
125
116
|
methods: {
|
|
117
|
+
onJfbLoad(options) {
|
|
118
|
+
|
|
119
|
+
// jfbRootExec('baiduUserLogin', {
|
|
120
|
+
|
|
121
|
+
// vm: this,// data: {
|
|
122
|
+
|
|
123
|
+
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
124
|
+
|
|
125
|
+
// }
|
|
126
|
+
|
|
127
|
+
// }).then().catch()
|
|
128
|
+
},
|
|
126
129
|
/**
|
|
127
130
|
* @description 监听事件变化
|
|
128
131
|
* @param container {object} 业务组件对象自己
|
|
129
132
|
*/
|
|
130
133
|
init(container) {
|
|
131
134
|
//内容
|
|
132
|
-
this.xnamespace = gCPVal(container, 'xnamespace', '');
|
|
133
135
|
this.contentHtml = gCPVal(container, 'contentHtml', '');
|
|
134
136
|
this.btnText = gCPVal(container, 'btnText', '我已知晓');
|
|
135
|
-
this.btnLink = gCPVal(container, 'btnLink', {value: ''});
|
|
137
|
+
this.btnLink = gCPVal(container, 'btnLink', {value: ''}).value;
|
|
136
138
|
this.countdown = gCPVal(container, 'countdown', 0);
|
|
137
139
|
//样式
|
|
138
|
-
this.bgColor = gCPVal(container, 'bgColor', '');
|
|
139
140
|
let bgImageVal = gCPVal(container, 'bgImage', {});
|
|
140
141
|
this.bgImage = bgImageVal && bgImageVal.url ? bgImageVal.url : '';
|
|
141
142
|
this.margin = gCPVal(container, 'margin', 32, {sKey: 'marginStatus', fields: ['margin'], isPM: true});
|
|
@@ -173,12 +174,9 @@
|
|
|
173
174
|
handleBtnClick(){
|
|
174
175
|
if (this.$configProject['isPreview']) return;
|
|
175
176
|
if(this.btnDisabled) return;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
onJfbLoad() {
|
|
181
|
-
// 倒计时依赖配置属性,已在 init 中启动
|
|
177
|
+
this.$xdUniHelper.navigateTo({
|
|
178
|
+
url: this.btnLink
|
|
179
|
+
});
|
|
182
180
|
},
|
|
183
181
|
onJfbScroll(options) {
|
|
184
182
|
console.log('event.onJfbScroll', options)
|
|
@@ -203,55 +201,45 @@
|
|
|
203
201
|
},
|
|
204
202
|
}
|
|
205
203
|
}
|
|
204
|
+
|
|
206
205
|
</script>
|
|
207
206
|
|
|
208
207
|
<style scoped lang="less">
|
|
209
208
|
@import "./JfbThirdRideLandLess.less";
|
|
210
209
|
|
|
211
210
|
.jfb-third-ride-land {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
&__body {
|
|
215
|
-
box-sizing: border-box;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
//内容卡片
|
|
219
|
-
&__card {
|
|
220
|
-
position: relative;
|
|
211
|
+
&__body{
|
|
221
212
|
box-sizing: border-box;
|
|
222
|
-
background: #FFFFFF;
|
|
223
|
-
border-radius: 24rpx;
|
|
224
213
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
color: #CCCCCC;
|
|
214
|
+
.land_box{
|
|
215
|
+
background: #FFFFFF;
|
|
228
216
|
}
|
|
229
|
-
}
|
|
230
217
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
218
|
+
//底部按钮
|
|
219
|
+
.land_btn{
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
width: 448rpx;
|
|
224
|
+
margin: 48rpx auto 0;
|
|
225
|
+
padding: 30rpx 0;
|
|
226
|
+
background: #FFFFFF;
|
|
227
|
+
border-radius: 60rpx;
|
|
228
|
+
|
|
229
|
+
.land_btn-text {
|
|
230
|
+
color: #333333;
|
|
231
|
+
font-size: 28rpx;
|
|
232
|
+
letter-spacing: 2rpx;
|
|
233
|
+
}
|
|
241
234
|
|
|
242
|
-
|
|
243
|
-
|
|
235
|
+
&--disabled {
|
|
236
|
+
background: #E6E6E9;
|
|
244
237
|
|
|
245
|
-
|
|
246
|
-
|
|
238
|
+
.land_btn-text {
|
|
239
|
+
color: #999999;
|
|
240
|
+
}
|
|
247
241
|
}
|
|
248
242
|
}
|
|
249
243
|
}
|
|
250
|
-
|
|
251
|
-
&__btn-text {
|
|
252
|
-
color: #FFFFFF;
|
|
253
|
-
font-size: 28rpx;
|
|
254
|
-
letter-spacing: 2rpx;
|
|
255
|
-
}
|
|
256
244
|
}
|
|
257
245
|
</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: '外边距',
|