jufubao-third 1.0.22-beta5 → 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/.claude/settings.local.json +12 -0
- package/package.json +1 -1
- package/src/components/JfbThirdRideLand/Api.js +58 -0
- package/src/components/JfbThirdRideLand/Attr.js +17 -0
- package/src/components/JfbThirdRideLand/JfbThirdRideLand.vue +245 -0
- package/src/components/JfbThirdRideLand/JfbThirdRideLandLess.less +80 -0
- package/src/components/JfbThirdRideLand/JfbThirdRideLandMixin.js +30 -0
- package/src/components/JfbThirdRideLand/Mock.js +13 -0
- package/src/components/JfbThirdRideLand/cusAttr/advanced.js +22 -0
- package/src/components/JfbThirdRideLand/cusAttr/content.js +60 -0
- package/src/components/JfbThirdRideLand/cusAttr/style.js +109 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(node -e ' *)",
|
|
5
|
+
"Bash(npx esbuild *)",
|
|
6
|
+
"Bash(npx vue-template-compiler *)",
|
|
7
|
+
"Bash(node -e \"const fs=require\\('fs'\\);const compiler=require\\('/Users/zxd/Workspaces/jufubao-third/node_modules/@vue/compiler-sfc'\\);const {parse,compileTemplate}=compiler;const r=parse\\(fs.readFileSync\\('/Users/zxd/Workspaces/jufubao-third/src/components/JfbThirdRideLand/JfbThirdRideLand.vue','utf8'\\)\\);const t=compileTemplate\\({source:r.descriptor.template.content,filename:'x.vue'}\\);console.log\\(t.errors.length===0?'Vue template OK':'ERR '+JSON.stringify\\(t.errors\\)\\)\")",
|
|
8
|
+
"Bash(node *)",
|
|
9
|
+
"Bash(grep -i \"^vue$\")"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @description 接口配置,
|
|
4
|
+
* 在设置方法名字当时候,别忘记加上【模块名字】:Ride
|
|
5
|
+
* @type {*[]}
|
|
6
|
+
*/
|
|
7
|
+
module.exports = [
|
|
8
|
+
{
|
|
9
|
+
//设置方法名字当别忘记加上【模块名字】:Ride
|
|
10
|
+
mapFnName: 'getRideByIdFilmSquate',
|
|
11
|
+
title: '获取电影广场列表',
|
|
12
|
+
path: '/api/account/film/list-film-square',
|
|
13
|
+
isRule: false,
|
|
14
|
+
params: {
|
|
15
|
+
last_key: ['当前页', 'Number', '必选'],
|
|
16
|
+
page_size: ['每页数量', 'Number', '必选'],
|
|
17
|
+
},
|
|
18
|
+
isConsole: true,
|
|
19
|
+
disabled: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
//设置方法名字当别忘记加上【模块名字】:Ride
|
|
23
|
+
mapFnName: 'updateRideFilmPaiqiDate',
|
|
24
|
+
title: '更新排期',
|
|
25
|
+
path: '/api/account/film/paiqi-date',
|
|
26
|
+
isRule: false,
|
|
27
|
+
params: {
|
|
28
|
+
film_id: ['电影id', 'Number', '必选'],
|
|
29
|
+
cinema_id: ['影院id', 'Number', '必选'],
|
|
30
|
+
},
|
|
31
|
+
isConsole: true,
|
|
32
|
+
disabled: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
//设置方法名字当别忘记加上【模块名字】:Ride
|
|
36
|
+
mapFnName: 'removeRideFilmAddress',
|
|
37
|
+
title: '删除我的配送地址',
|
|
38
|
+
path: '/api/account/film/paiqi-date',
|
|
39
|
+
isRule: false,
|
|
40
|
+
params: {
|
|
41
|
+
film_id: ['电影id', 'Number', '必选'],
|
|
42
|
+
},
|
|
43
|
+
isConsole: true,
|
|
44
|
+
disabled: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
//设置方法名字当别忘记加上【模块名字】:Ride
|
|
48
|
+
mapFnName: 'addRideFilmcart',
|
|
49
|
+
title: '添加购物车',
|
|
50
|
+
path: '/api/account/film/paiqi-date',
|
|
51
|
+
isRule: false,
|
|
52
|
+
params: {
|
|
53
|
+
film_id: ['电影id', 'Number', '必选'],
|
|
54
|
+
},
|
|
55
|
+
isConsole: true,
|
|
56
|
+
disabled: true,
|
|
57
|
+
},
|
|
58
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import style from "./cusAttr/style";
|
|
4
|
+
import advanced from "./cusAttr/advanced";
|
|
5
|
+
import content from "./cusAttr/content";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
style: [],
|
|
9
|
+
advanced: [],
|
|
10
|
+
content: (data, gValue, gColor, oldData = {}) => {
|
|
11
|
+
return [
|
|
12
|
+
...content(data, gValue, gColor, oldData),
|
|
13
|
+
...style(data, gValue, gColor, oldData),
|
|
14
|
+
...advanced(data, gValue, gColor, oldData),
|
|
15
|
+
].filter(i => i)
|
|
16
|
+
},
|
|
17
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-third-ride-land"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-third-ride-land__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-third-ride-land__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
<!-- #endif -->
|
|
18
|
+
<view class="jfb-third-ride-land__body" :style="[bodyStyle, bgStyle]">
|
|
19
|
+
<view class="land_box" :style="cardStyle" v-html="contentHtml"></view>
|
|
20
|
+
<view
|
|
21
|
+
class="land_btn"
|
|
22
|
+
:class="{ 'land_btn--disabled': btnDisabled }"
|
|
23
|
+
@click="handleBtnClick"
|
|
24
|
+
>
|
|
25
|
+
<text class="land_btn-text">{{ btnText }}{{ countdownText }}</text>
|
|
26
|
+
</view>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
33
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
34
|
+
import JfbThirdRideLandMixin from "./JfbThirdRideLandMixin";
|
|
35
|
+
import { gCPVal } from "@/utils/xd.base";
|
|
36
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
37
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
38
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
39
|
+
export default {
|
|
40
|
+
name: "JfbThirdRideLand",
|
|
41
|
+
components: {
|
|
42
|
+
XdFontIcon
|
|
43
|
+
},
|
|
44
|
+
mixins: [
|
|
45
|
+
componentsMixins, extsMixins, JfbThirdRideLandMixin
|
|
46
|
+
],
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
//内容
|
|
50
|
+
contentHtml: '',
|
|
51
|
+
btnText: '我已知晓',
|
|
52
|
+
btnLink: null,
|
|
53
|
+
countdown: 0,
|
|
54
|
+
countdownLeft: 0,
|
|
55
|
+
countdownTimer: null,
|
|
56
|
+
//样式
|
|
57
|
+
bgImage: '',
|
|
58
|
+
margin: {},
|
|
59
|
+
padding: {},
|
|
60
|
+
radius: 24,
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
computed: {
|
|
64
|
+
//页面背景(背景图)
|
|
65
|
+
bgStyle(){
|
|
66
|
+
let style = {};
|
|
67
|
+
if(this.bgImage) {
|
|
68
|
+
style.backgroundImage = `url(${getServiceUrl(this.bgImage)})`;
|
|
69
|
+
style.backgroundSize = '100% 100%';
|
|
70
|
+
style.backgroundPosition = 'center';
|
|
71
|
+
style.backgroundRepeat = 'no-repeat';
|
|
72
|
+
}
|
|
73
|
+
return style;
|
|
74
|
+
},
|
|
75
|
+
//外边距
|
|
76
|
+
bodyStyle(){
|
|
77
|
+
let style = {
|
|
78
|
+
padding: this.getMarginAndPadding(this.margin, 32)
|
|
79
|
+
};
|
|
80
|
+
//最小高度为窗口内容区高度
|
|
81
|
+
if(this.layoutInfo && this.layoutInfo.bodyMinHeightRpx) {
|
|
82
|
+
style.minHeight = this.layoutInfo.bodyMinHeightRpx + 'rpx';
|
|
83
|
+
}
|
|
84
|
+
return style;
|
|
85
|
+
},
|
|
86
|
+
//内容卡片样式(内边距 + 圆角)
|
|
87
|
+
cardStyle(){
|
|
88
|
+
return {
|
|
89
|
+
padding: this.getMarginAndPadding(this.padding, 32),
|
|
90
|
+
borderRadius: this.radius + 'rpx'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
//按钮是否处于倒计时禁用状态
|
|
94
|
+
btnDisabled(){
|
|
95
|
+
return this.countdownLeft > 0;
|
|
96
|
+
},
|
|
97
|
+
//倒计时文案
|
|
98
|
+
countdownText(){
|
|
99
|
+
return this.btnDisabled ? `(${this.countdownLeft}s)` : '';
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
watch: {
|
|
103
|
+
container(value, oldValue) {
|
|
104
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
105
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
created() {
|
|
109
|
+
this.init(this.container);
|
|
110
|
+
|
|
111
|
+
//todo
|
|
112
|
+
},
|
|
113
|
+
beforeDestroy() {
|
|
114
|
+
this.clearCountdown();
|
|
115
|
+
},
|
|
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
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* @description 监听事件变化
|
|
131
|
+
* @param container {object} 业务组件对象自己
|
|
132
|
+
*/
|
|
133
|
+
init(container) {
|
|
134
|
+
//内容
|
|
135
|
+
this.contentHtml = gCPVal(container, 'contentHtml', '');
|
|
136
|
+
this.btnText = gCPVal(container, 'btnText', '我已知晓');
|
|
137
|
+
this.btnLink = gCPVal(container, 'btnLink', {value: ''}).value;
|
|
138
|
+
this.countdown = gCPVal(container, 'countdown', 0);
|
|
139
|
+
//样式
|
|
140
|
+
let bgImageVal = gCPVal(container, 'bgImage', {});
|
|
141
|
+
this.bgImage = bgImageVal && bgImageVal.url ? bgImageVal.url : '';
|
|
142
|
+
this.margin = gCPVal(container, 'margin', 32, {sKey: 'marginStatus', fields: ['margin'], isPM: true});
|
|
143
|
+
this.padding = gCPVal(container, 'padding', 32, {sKey: 'paddingStatus', fields: ['padding'], isPM: true});
|
|
144
|
+
this.radius = gCPVal(container, 'radius', 24, {sKey: 'radiusStatus', fields: ['radius']});
|
|
145
|
+
//启动倒计时
|
|
146
|
+
this.startCountdown();
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* @description 开始倒计时
|
|
150
|
+
*/
|
|
151
|
+
startCountdown(){
|
|
152
|
+
this.clearCountdown();
|
|
153
|
+
let count = Number(this.countdown) || 0;
|
|
154
|
+
if(count <= 0) return;
|
|
155
|
+
this.countdownLeft = count;
|
|
156
|
+
this.countdownTimer = setInterval(() => {
|
|
157
|
+
this.countdownLeft--;
|
|
158
|
+
if(this.countdownLeft <= 0) this.clearCountdown();
|
|
159
|
+
}, 1000);
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* @description 清除倒计时
|
|
163
|
+
*/
|
|
164
|
+
clearCountdown(){
|
|
165
|
+
if(this.countdownTimer) {
|
|
166
|
+
clearInterval(this.countdownTimer);
|
|
167
|
+
this.countdownTimer = null;
|
|
168
|
+
}
|
|
169
|
+
this.countdownLeft = 0;
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
* @description 点击按钮,倒计时结束后跳转配置的链接
|
|
173
|
+
*/
|
|
174
|
+
handleBtnClick(){
|
|
175
|
+
if (this.$configProject['isPreview']) return;
|
|
176
|
+
if(this.btnDisabled) return;
|
|
177
|
+
this.$xdUniHelper.navigateTo({
|
|
178
|
+
url: this.btnLink
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
onJfbScroll(options) {
|
|
182
|
+
console.log('event.onJfbScroll', options)
|
|
183
|
+
},
|
|
184
|
+
onJfbReachBottom(options) {
|
|
185
|
+
console.log('event.onJfbReachBottom', options)
|
|
186
|
+
},
|
|
187
|
+
onJfbShow(options) {
|
|
188
|
+
console.log('event.onJfbShow', options)
|
|
189
|
+
},
|
|
190
|
+
onJfbHide(options) {
|
|
191
|
+
console.log('event.onJfbHide', options)
|
|
192
|
+
},
|
|
193
|
+
onJfbBack(options) {
|
|
194
|
+
console.log('event.onJfbBack', options)
|
|
195
|
+
},
|
|
196
|
+
onJfbUpdate(...data) {
|
|
197
|
+
console.log('event.onJfbUpdate', data)
|
|
198
|
+
},
|
|
199
|
+
onJfbCustomEvent(options) {
|
|
200
|
+
console.log('event.onJfbReachBottom', options)
|
|
201
|
+
},
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
</script>
|
|
206
|
+
|
|
207
|
+
<style scoped lang="less">
|
|
208
|
+
@import "./JfbThirdRideLandLess.less";
|
|
209
|
+
|
|
210
|
+
.jfb-third-ride-land {
|
|
211
|
+
&__body{
|
|
212
|
+
box-sizing: border-box;
|
|
213
|
+
|
|
214
|
+
.land_box{
|
|
215
|
+
background: #FFFFFF;
|
|
216
|
+
}
|
|
217
|
+
|
|
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
|
+
}
|
|
234
|
+
|
|
235
|
+
&--disabled {
|
|
236
|
+
background: #E6E6E9;
|
|
237
|
+
|
|
238
|
+
.land_btn-text {
|
|
239
|
+
color: #999999;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-third-ride-land {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&__body{
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
z-index: 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.editx,&.editx:hover {
|
|
25
|
+
position: relative;
|
|
26
|
+
min-height: unit(100, rpx);
|
|
27
|
+
z-index: 3;
|
|
28
|
+
&::after {
|
|
29
|
+
border: 2rpx dashed blue;
|
|
30
|
+
content: " ";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top:0;
|
|
33
|
+
left:0;
|
|
34
|
+
bottom:0;
|
|
35
|
+
right:0;
|
|
36
|
+
z-index: var(--preview-z-index);
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&__edit {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
position: absolute;
|
|
46
|
+
right: unit(0, rpx);
|
|
47
|
+
top: unit(0, rpx);
|
|
48
|
+
height: unit(50, rpx);
|
|
49
|
+
z-index: 100;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
|
+
color: #fff;
|
|
57
|
+
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
59
|
+
|
|
60
|
+
&-icon{
|
|
61
|
+
padding: 0 unit(20, rpx);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.editx {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**notPreview**/
|
|
74
|
+
.jfb-third-ride-land {
|
|
75
|
+
//&:before {
|
|
76
|
+
//content: " ";
|
|
77
|
+
//display: table;
|
|
78
|
+
//}
|
|
79
|
+
}
|
|
80
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-third-ride-land'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
export default (data, gValue, gColor, oldData) => {
|
|
4
|
+
return [
|
|
5
|
+
//高级
|
|
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
|
+
].filter(i=>i)
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import { dataVal } from "@/utils/AttrTools";
|
|
3
|
+
|
|
4
|
+
export default (data, gValue, gColor, oldData) => {
|
|
5
|
+
let imageConfig = {
|
|
6
|
+
sort: true,
|
|
7
|
+
maxlen: 100,
|
|
8
|
+
action: "aliyun",
|
|
9
|
+
qiniuCdn: "aliyun",
|
|
10
|
+
size: 2,
|
|
11
|
+
tipsformet: "上传文件格式:@imageType@,不超过@size@MB。该上传图会在用户端显示,不建议上传超过1920*1080图片。",
|
|
12
|
+
uploadType: "aliyun",
|
|
13
|
+
type: ["jpg", "png", "jpeg", "gif"],
|
|
14
|
+
};
|
|
15
|
+
return [
|
|
16
|
+
//富文本内容
|
|
17
|
+
{
|
|
18
|
+
label: "须知内容:",
|
|
19
|
+
ele: "xd-tinymce",
|
|
20
|
+
valueKey: "contentHtml",
|
|
21
|
+
value: data.contentHtml || "",
|
|
22
|
+
imageConfig,
|
|
23
|
+
inline: false,
|
|
24
|
+
groupKey: "content",
|
|
25
|
+
},
|
|
26
|
+
//按钮文案
|
|
27
|
+
{
|
|
28
|
+
label: '按钮文案',
|
|
29
|
+
ele: 'el-input',
|
|
30
|
+
groupKey: 'content',
|
|
31
|
+
valueKey: 'btnText',
|
|
32
|
+
value: dataVal({data, key: 'btnText', dValue: '我已知晓', gValue}),
|
|
33
|
+
placeholder: '请输入按钮文案',
|
|
34
|
+
labelInline: true,
|
|
35
|
+
className: 'input100',
|
|
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
|
+
},
|
|
47
|
+
//倒计时秒数
|
|
48
|
+
{
|
|
49
|
+
label: '倒计时秒数:',
|
|
50
|
+
ele: 'el-input',
|
|
51
|
+
groupKey: 'content',
|
|
52
|
+
valueKey: 'countdown',
|
|
53
|
+
type: 'number',
|
|
54
|
+
value: dataVal({data, key: 'countdown', dValue: 5, gValue}),
|
|
55
|
+
placeholder: '请输入倒计时秒数,0为不显示倒计时',
|
|
56
|
+
className: 'input60',
|
|
57
|
+
labelInline: true,
|
|
58
|
+
},
|
|
59
|
+
].filter(i=>i)
|
|
60
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {dataVal, statusShow, statusDataVal} from "@/utils/AttrTools";
|
|
3
|
+
|
|
4
|
+
export default (data, gValue, gColor, oldData) => {
|
|
5
|
+
return [
|
|
6
|
+
//风格
|
|
7
|
+
//背景图(含头部banner背景)
|
|
8
|
+
{
|
|
9
|
+
label: '背景图',
|
|
10
|
+
ele: 'xd-upload',
|
|
11
|
+
groupKey: 'style',
|
|
12
|
+
valueKey: 'bgImage',
|
|
13
|
+
value: data.bgImage || {},
|
|
14
|
+
defaultValue: data.bgImage || null,
|
|
15
|
+
slot: true,
|
|
16
|
+
oneWidth: 750/4,
|
|
17
|
+
oneHeight: 1000/4,
|
|
18
|
+
elinputClassName: 'input40',
|
|
19
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议宽度为<span style="color:red">750px</span>',
|
|
20
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
21
|
+
styleType: 'one',
|
|
22
|
+
uploadType: 'aliyun',
|
|
23
|
+
size: 2,
|
|
24
|
+
action: 'action',
|
|
25
|
+
sort: true,
|
|
26
|
+
maxlen: 1,
|
|
27
|
+
labelInline: true,
|
|
28
|
+
},
|
|
29
|
+
//外边距
|
|
30
|
+
{
|
|
31
|
+
label: '外边距',
|
|
32
|
+
ele: 'xd-radio',
|
|
33
|
+
groupKey: 'style',
|
|
34
|
+
valueKey: 'marginStatus',
|
|
35
|
+
value: statusDataVal({data, key:'marginStatus', fields:['margin'], gValue}),
|
|
36
|
+
labelInline: true,
|
|
37
|
+
list: [
|
|
38
|
+
{label: '默认', value: 'D'},
|
|
39
|
+
{label: '自定义', value: 'C'},
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{ele: 'group_start'},
|
|
43
|
+
{
|
|
44
|
+
label: '',
|
|
45
|
+
ele: 'xd-margin-padding',
|
|
46
|
+
groupKey: 'style',
|
|
47
|
+
valueKey: 'margin',
|
|
48
|
+
value: dataVal({data, key:'margin', dValue: 32, gValue, isPM: true}),
|
|
49
|
+
hidden: !statusShow({data, key:'marginStatus', fields:['margin'], gValue}),
|
|
50
|
+
setting: {
|
|
51
|
+
type: 'margin',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{ele: 'group_end'},
|
|
55
|
+
//卡片内边距
|
|
56
|
+
{
|
|
57
|
+
label: '卡片内边距',
|
|
58
|
+
ele: 'xd-radio',
|
|
59
|
+
groupKey: 'style',
|
|
60
|
+
valueKey: 'paddingStatus',
|
|
61
|
+
value: statusDataVal({data, key:'paddingStatus', fields:['padding'], gValue}),
|
|
62
|
+
labelInline: true,
|
|
63
|
+
list: [
|
|
64
|
+
{label: '默认', value: 'D'},
|
|
65
|
+
{label: '自定义', value: 'C'},
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{ele: 'group_start'},
|
|
69
|
+
{
|
|
70
|
+
label: '',
|
|
71
|
+
ele: 'xd-margin-padding',
|
|
72
|
+
groupKey: 'style',
|
|
73
|
+
valueKey: 'padding',
|
|
74
|
+
value: dataVal({data, key:'padding', dValue: 32, gValue, isPM: true}),
|
|
75
|
+
hidden: !statusShow({data, key:'paddingStatus', fields:['padding'], gValue}),
|
|
76
|
+
setting: {
|
|
77
|
+
type: 'margin',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{ele: 'group_end'},
|
|
81
|
+
//卡片圆角
|
|
82
|
+
{
|
|
83
|
+
label: '卡片圆角',
|
|
84
|
+
ele: 'xd-radio',
|
|
85
|
+
groupKey: 'style',
|
|
86
|
+
valueKey: 'radiusStatus',
|
|
87
|
+
value: statusDataVal({data, key:'radiusStatus', fields:['radius'], gValue}),
|
|
88
|
+
labelInline: true,
|
|
89
|
+
list: [
|
|
90
|
+
{label: '默认', value: 'D'},
|
|
91
|
+
{label: '自定义', value: 'C'},
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{ele: 'group_start'},
|
|
95
|
+
{
|
|
96
|
+
label: '',
|
|
97
|
+
ele: 'el-input',
|
|
98
|
+
type: 'number',
|
|
99
|
+
groupKey: 'style',
|
|
100
|
+
valueKey: 'radius',
|
|
101
|
+
value: dataVal({data, key:'radius', dValue: 24, gValue}),
|
|
102
|
+
placeholder: '请输入卡片圆角,单位rpx',
|
|
103
|
+
className: 'input60',
|
|
104
|
+
labelInline: true,
|
|
105
|
+
hidden: !statusShow({data, key:'radiusStatus', fields:['radius'], gValue}),
|
|
106
|
+
},
|
|
107
|
+
{ele: 'group_end'},
|
|
108
|
+
].filter(i=>i)
|
|
109
|
+
}
|