jufubao-base 1.0.168 → 1.0.169-beta2
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/JfbBaseLogin/Attr.js +1109 -510
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +364 -63
- package/src/components/JfbBaseTfkCardBind/Attr.js +579 -33
- package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +453 -18
- package/src/components/JfbBaseTfkCardDetail/Api.js +13 -37
- package/src/components/JfbBaseTfkCardDetail/Attr.js +589 -33
- package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +497 -23
- package/src/components/JfbBaseTfkCardDetail/Mock.js +151 -11
- package/src/components/JfbBaseTfkCardLogin/Api.js +19 -34
- package/src/components/JfbBaseTfkCardLogin/Attr.js +609 -33
- package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +488 -17
- package/src/components/JfbBaseTfkCardLogin/Mock.js +721 -11
- package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +219 -0
|
@@ -13,8 +13,131 @@
|
|
|
13
13
|
<view class="jfb-base-tfk-card-login__edit-icon" @click="delEdit">删除</view>
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
|
-
<view class="jfb-base-tfk-card-login__body"
|
|
17
|
-
|
|
16
|
+
<view class="jfb-base-tfk-card-login__body" :style="{
|
|
17
|
+
'--card-list-margin': ($rpxNum * cardItemMargin) + 'px',
|
|
18
|
+
}">
|
|
19
|
+
<view class="menu_wrap" :style="menuBoxStyle">
|
|
20
|
+
<view class="menu_list">
|
|
21
|
+
<view class="menu_item" :style="{
|
|
22
|
+
marginRight: menuItemMargin + 'px'
|
|
23
|
+
}">
|
|
24
|
+
<view class="menu_item_inner"
|
|
25
|
+
:style="[menuType === 'card' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的票券包</view>
|
|
26
|
+
</view>
|
|
27
|
+
<view class="menu_item">
|
|
28
|
+
<view class="menu_item_inner"
|
|
29
|
+
:style="[menuType === 'coupon' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的优惠券</view>
|
|
30
|
+
</view>
|
|
31
|
+
</view>
|
|
32
|
+
<view @click="toBindCard">
|
|
33
|
+
<xd-font-icon :icon="bindCardIcon.icon"
|
|
34
|
+
:color="bindCardIcon.color"
|
|
35
|
+
:style="{fontSize: bindCardIcon.fontSize}"
|
|
36
|
+
></xd-font-icon>
|
|
37
|
+
</view>
|
|
38
|
+
</view>
|
|
39
|
+
<view class="JfbBaseNotice">
|
|
40
|
+
<!--notice-->
|
|
41
|
+
<view class="jfb-base-tfk-card-login__body-line" v-if="!notice"></view>
|
|
42
|
+
<view :style="{marginTop: '0rpx'}" class="jfb-base-tfk-card-login__body-notice" v-if="notice">
|
|
43
|
+
<view
|
|
44
|
+
class="jfb-base-tfk-card-login__body-notice-in"
|
|
45
|
+
:style="{ background: noticeBackgroundColor }"
|
|
46
|
+
>
|
|
47
|
+
<xd-notice-bar
|
|
48
|
+
style="width: 100%"
|
|
49
|
+
:showIcon="true"
|
|
50
|
+
:scrollable="true"
|
|
51
|
+
:speed="20"
|
|
52
|
+
:fontSize="24"
|
|
53
|
+
:height="70"
|
|
54
|
+
:is-no-bgc="false"
|
|
55
|
+
>
|
|
56
|
+
<template>
|
|
57
|
+
<view v-html="notice"></view>
|
|
58
|
+
</template>
|
|
59
|
+
</xd-notice-bar>
|
|
60
|
+
</view>
|
|
61
|
+
</view>
|
|
62
|
+
<view class="jfb-base-tfk-card-login__body-notice" v-if="noticeStatus && isPreview && notice === ''">
|
|
63
|
+
<view
|
|
64
|
+
class="jfb-base-tfk-card-login__body-notice-in"
|
|
65
|
+
:style="{
|
|
66
|
+
background: noticeBackgroundColor,
|
|
67
|
+
textAlign: 'center',
|
|
68
|
+
color: dangerColor,
|
|
69
|
+
fontSize: 26 + 'rpx',
|
|
70
|
+
}">该组件未配置数据,因此改模块在正式环境将不显示</view>
|
|
71
|
+
</view>
|
|
72
|
+
<!--notice end-->
|
|
73
|
+
</view>
|
|
74
|
+
<view class="card_list_wrap" :style="listBoxStyle">
|
|
75
|
+
|
|
76
|
+
<!-- 我的票券包- 已绑票券 -->
|
|
77
|
+
<template v-if="menuType === 'card'">
|
|
78
|
+
<view v-if="loadingList">
|
|
79
|
+
<view class="bind_list skeleton-wrap">
|
|
80
|
+
<view class="bind_item" v-for="i in 5" :key="i" :style="cardItemBoxStyle">
|
|
81
|
+
<view class="bind_point"></view>
|
|
82
|
+
<view class="bind_deduct"></view>
|
|
83
|
+
<view class="bind_number"></view>
|
|
84
|
+
<view class="bind_time"></view>
|
|
85
|
+
<view class="bind_type"></view>
|
|
86
|
+
<view class="bind_btn"></view>
|
|
87
|
+
</view>
|
|
88
|
+
</view>
|
|
89
|
+
</view>
|
|
90
|
+
<view v-else>
|
|
91
|
+
<view v-if="cardList.length" class="bind_list">
|
|
92
|
+
<view class="bind_item" v-for="(item, i) in cardList" :key="i"
|
|
93
|
+
:style="cardItemBoxStyle">
|
|
94
|
+
<view class="bind_point">120</view>
|
|
95
|
+
<view class="bind_deduct">兑换其他商品可抵:240元宝</view>
|
|
96
|
+
<view class="bind_number">1001000002541</view>
|
|
97
|
+
<view class="bind_time">2029-12-31到期</view>
|
|
98
|
+
<view class="bind_type" :style="{
|
|
99
|
+
top: cardPadding.top + 'rpx',
|
|
100
|
+
right: cardPadding.right + 'rpx',
|
|
101
|
+
}">
|
|
102
|
+
<view>兰州vip优惠券</view>
|
|
103
|
+
<view>(可转票券)</view>
|
|
104
|
+
</view>
|
|
105
|
+
<view class="bind_btn" :style="[{
|
|
106
|
+
right: cardPadding.right + 'rpx',
|
|
107
|
+
bottom: cardPadding.bottom + 'rpx',
|
|
108
|
+
borderRadius: cardBtnRadius + 'rpx',
|
|
109
|
+
padding: bindCardBtnPadding
|
|
110
|
+
}, item.is_login !== 'Y' ? bindCardActiveStyle : bindCardBtnStyle]">登录</view>
|
|
111
|
+
</view>
|
|
112
|
+
<view v-if="!hasCardList" class="no_more_card">没有更多券了,查看失效的票券 ></view>
|
|
113
|
+
</view>
|
|
114
|
+
<view v-else>
|
|
115
|
+
暂无数据
|
|
116
|
+
</view>
|
|
117
|
+
</view>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<!-- 优惠券 -->
|
|
121
|
+
<template v-else >
|
|
122
|
+
<view v-if="couponList.length" class="coupon_list">
|
|
123
|
+
<xd-coupon-item v-for="(item, i) in couponList" :key="i"
|
|
124
|
+
:couponRadius="couponRadius"
|
|
125
|
+
:couponImageUrl="couponImageUrl"
|
|
126
|
+
:couponTitleBgColor="couponTitleBgColor"
|
|
127
|
+
:couponUseBtnPadding="couponUseBtnPadding"
|
|
128
|
+
:couponBtnRadius="couponBtnRadius"
|
|
129
|
+
:couponBtnTextStyle="couponBtnTextStyle"
|
|
130
|
+
:couponLeftBgColor="couponLeftBgColor"
|
|
131
|
+
></xd-coupon-item>
|
|
132
|
+
<view v-if="!hasCouponList" class="no_more_card">没有更多券了,查看失效的票券 ></view>
|
|
133
|
+
</view>
|
|
134
|
+
<view v-else>
|
|
135
|
+
暂无数据
|
|
136
|
+
</view>
|
|
137
|
+
|
|
138
|
+
</template>
|
|
139
|
+
</view>
|
|
140
|
+
|
|
18
141
|
</view>
|
|
19
142
|
</view>
|
|
20
143
|
</template>
|
|
@@ -26,20 +149,206 @@
|
|
|
26
149
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
27
150
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
28
151
|
import extsMixins from "@/mixins/extsMixins";
|
|
152
|
+
import getServiceUrl from '@/common/getServiceUrl'
|
|
153
|
+
import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
|
|
154
|
+
import XdCouponItem from "./XdCouponItem";
|
|
155
|
+
import Color from "color"
|
|
29
156
|
export default {
|
|
30
157
|
name: "JfbBaseTfkCardLogin",
|
|
31
158
|
components: {
|
|
32
|
-
XdFontIcon
|
|
159
|
+
XdFontIcon,
|
|
160
|
+
XdNoticeBar,
|
|
161
|
+
XdCouponItem,
|
|
33
162
|
},
|
|
34
163
|
mixins: [
|
|
35
164
|
componentsMixins, extsMixins, JfbBaseTfkCardLoginMixin
|
|
36
165
|
],
|
|
37
166
|
data() {
|
|
38
167
|
return {
|
|
168
|
+
menuType: "coupon", // card, coupon
|
|
169
|
+
loadingList: false,
|
|
170
|
+
cardList: [{id: 1}, {id: 2}],
|
|
171
|
+
couponList: [{id: 1}, {id: 2}],
|
|
172
|
+
hasCardList: false,
|
|
173
|
+
hasCouponList: false,
|
|
39
174
|
|
|
40
175
|
//todo
|
|
176
|
+
previewCurrent: "",
|
|
177
|
+
isPreview: false,
|
|
178
|
+
notice: "",
|
|
179
|
+
noticeStatus: false,
|
|
180
|
+
noticeBackgroundColor: "",
|
|
181
|
+
cardBindPath: "",
|
|
182
|
+
menuPadding: {},
|
|
183
|
+
menuBtnPadding: {},
|
|
184
|
+
menuItemMargin: 40,
|
|
185
|
+
menuBorderWidth: 1,
|
|
186
|
+
menuTabColor: {},
|
|
187
|
+
bindCardIcon: {},
|
|
188
|
+
cardImageUrl: "",
|
|
189
|
+
couponImageUrl: "",
|
|
190
|
+
cardPadding: {},
|
|
191
|
+
cardRadius: 0,
|
|
192
|
+
couponRadius: 0,
|
|
193
|
+
cardListPadding: {},
|
|
194
|
+
cardItemMargin: 20,
|
|
195
|
+
couponTitleBgColor: "",
|
|
196
|
+
cardBtnTextStyle: {}, //我的票券包登录按钮文字背景色设置
|
|
197
|
+
cardBtnRadius: 16,
|
|
198
|
+
cardBtnPadding: {},
|
|
199
|
+
couponBtnTextStyle: {}, //优惠券包登录按钮文字背景色设置
|
|
200
|
+
couponUseBtnPadding: {},
|
|
201
|
+
couponBtnRadius: 16,
|
|
202
|
+
couponLeftBgColor: "",
|
|
41
203
|
}
|
|
42
204
|
},
|
|
205
|
+
computed: {
|
|
206
|
+
menuBoxStyle(){
|
|
207
|
+
let padding = `${this.checkValue(this.menuPadding.top, 20)}rpx`;
|
|
208
|
+
padding = `${padding} ${this.checkValue(this.menuPadding.right, 20)}rpx`;
|
|
209
|
+
padding = `${padding} ${this.checkValue(this.menuPadding.bottom, 20)}rpx`;
|
|
210
|
+
padding = `${padding} ${this.checkValue(this.menuPadding.left, 20)}rpx`;
|
|
211
|
+
|
|
212
|
+
return this.styleObjectToString({
|
|
213
|
+
// background: this.formBgColor,
|
|
214
|
+
padding: padding,
|
|
215
|
+
})
|
|
216
|
+
},
|
|
217
|
+
menuItemBoxStyle(){
|
|
218
|
+
let padding = `${this.checkValue(this.menuBtnPadding.top, 20)}rpx`;
|
|
219
|
+
padding = `${padding} ${this.checkValue(this.menuBtnPadding.right, 20)}rpx`;
|
|
220
|
+
padding = `${padding} ${this.checkValue(this.menuBtnPadding.bottom, 20)}rpx`;
|
|
221
|
+
padding = `${padding} ${this.checkValue(this.menuBtnPadding.left, 20)}rpx`;
|
|
222
|
+
return this.styleObjectToString({
|
|
223
|
+
padding
|
|
224
|
+
})
|
|
225
|
+
},
|
|
226
|
+
menuItemStyle(){
|
|
227
|
+
let styleObj = {
|
|
228
|
+
color: this.menuTabColor['color'] || '#333',
|
|
229
|
+
background: this.menuTabColor['bgColor'] || '#fff',
|
|
230
|
+
fontSize: this.menuTabColor['fontSize'] || '30rpx',
|
|
231
|
+
fontWeight: this.menuTabColor['fontWeight'] || 'normal',
|
|
232
|
+
borderWidth: this.menuBorderWidth + 'px',
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return this.styleObjectToString(styleObj)
|
|
236
|
+
},
|
|
237
|
+
menuItemActiveStyle(){
|
|
238
|
+
let defaultTextColor = '#ff5a39';
|
|
239
|
+
let styleActiveObj = {
|
|
240
|
+
color: this.menuTabColor['actColor'] || defaultTextColor,
|
|
241
|
+
background: this.menuTabColor['actBgColor'] || '#fff',
|
|
242
|
+
fontSize: this.menuTabColor['actFontSize'] || '30rpx',
|
|
243
|
+
fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
|
|
244
|
+
borderBottom: `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
|
|
245
|
+
}
|
|
246
|
+
return this.styleObjectToString(styleActiveObj)
|
|
247
|
+
},
|
|
248
|
+
bindCardBtnPadding(){
|
|
249
|
+
let padding = `${this.checkValue(this.cardBtnPadding.top, 20)}rpx`;
|
|
250
|
+
padding = `${padding} ${this.checkValue(this.cardBtnPadding.right, 20)}rpx`;
|
|
251
|
+
padding = `${padding} ${this.checkValue(this.cardBtnPadding.bottom, 20)}rpx`;
|
|
252
|
+
padding = `${padding} ${this.checkValue(this.cardBtnPadding.left, 20)}rpx`;
|
|
253
|
+
return padding;
|
|
254
|
+
},
|
|
255
|
+
bindCardBtnStyle(){
|
|
256
|
+
let styleObj = {
|
|
257
|
+
color: this.cardBtnTextStyle['color'] || '#333',
|
|
258
|
+
background: this.cardBtnTextStyle['bgColor'] || '#fff',
|
|
259
|
+
fontSize: this.cardBtnTextStyle['fontSize'] || '30rpx',
|
|
260
|
+
fontWeight: this.cardBtnTextStyle['fontWeight'] || 'normal',
|
|
261
|
+
}
|
|
262
|
+
return this.styleObjectToString(styleObj)
|
|
263
|
+
},
|
|
264
|
+
bindCardActiveStyle(){
|
|
265
|
+
let defaultTextColor = '#ff5a39';
|
|
266
|
+
let styleActiveObj = {
|
|
267
|
+
color: this.cardBtnTextStyle['actColor'] || defaultTextColor,
|
|
268
|
+
background: this.cardBtnTextStyle['actBgColor'] || '#fff',
|
|
269
|
+
fontSize: this.cardBtnTextStyle['actFontSize'] || '30rpx',
|
|
270
|
+
fontWeight: this.cardBtnTextStyle['actFontWeight'] || 'normal',
|
|
271
|
+
}
|
|
272
|
+
return this.styleObjectToString(styleActiveObj)
|
|
273
|
+
},
|
|
274
|
+
couponBtnPadding(){
|
|
275
|
+
let padding = `${this.checkValue(this.couponUseBtnPadding.top, 20)}rpx`;
|
|
276
|
+
padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.right, 20)}rpx`;
|
|
277
|
+
padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.bottom, 20)}rpx`;
|
|
278
|
+
padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.left, 20)}rpx`;
|
|
279
|
+
return padding;
|
|
280
|
+
},
|
|
281
|
+
couponBtnStyle(){
|
|
282
|
+
let styleObj = {
|
|
283
|
+
color: this.couponBtnTextStyle['color'] || '#333',
|
|
284
|
+
background: this.couponBtnTextStyle['bgColor'] || '#fff',
|
|
285
|
+
fontSize: this.couponBtnTextStyle['fontSize'] || '30rpx',
|
|
286
|
+
fontWeight: this.couponBtnTextStyle['fontWeight'] || 'normal',
|
|
287
|
+
}
|
|
288
|
+
return this.styleObjectToString(styleObj)
|
|
289
|
+
},
|
|
290
|
+
getCardBgImage(){
|
|
291
|
+
let bg = '';
|
|
292
|
+
if(this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'object'
|
|
293
|
+
|| this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'array'
|
|
294
|
+
) {
|
|
295
|
+
if(!this.$xdUniHelper.isEmpty(this.cardImageUrl)) {
|
|
296
|
+
return getServiceUrl(this.cardImageUrl.url)
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return bg
|
|
300
|
+
},
|
|
301
|
+
cardItemBoxStyle(){
|
|
302
|
+
let image = {};
|
|
303
|
+
if(this.cardImageUrl) image = {
|
|
304
|
+
backgroundImage: `url(${this.getCardBgImage})`,
|
|
305
|
+
backgroundSize: '100%',
|
|
306
|
+
backgroundRepeat: 'no-repeat',
|
|
307
|
+
}
|
|
308
|
+
let padding = `${this.checkValue(this.cardPadding.top, 20)}rpx`;
|
|
309
|
+
padding = `${padding} ${this.checkValue(this.cardPadding.right, 20)}rpx`;
|
|
310
|
+
padding = `${padding} ${this.checkValue(this.cardPadding.bottom, 20)}rpx`;
|
|
311
|
+
padding = `${padding} ${this.checkValue(this.cardPadding.left, 20)}rpx`;
|
|
312
|
+
image['padding'] = padding;
|
|
313
|
+
image['borderRadius'] = this.cardRadius + 'rpx';
|
|
314
|
+
return this.styleObjectToString(image)
|
|
315
|
+
},
|
|
316
|
+
listBoxStyle(){
|
|
317
|
+
let padding = `${this.checkValue(this.cardListPadding.top, 20)}rpx`;
|
|
318
|
+
padding = `${padding} ${this.checkValue(this.cardListPadding.right, 20)}rpx`;
|
|
319
|
+
padding = `${padding} ${this.checkValue(this.cardListPadding.bottom, 20)}rpx`;
|
|
320
|
+
padding = `${padding} ${this.checkValue(this.cardListPadding.left, 20)}rpx`;
|
|
321
|
+
|
|
322
|
+
return this.styleObjectToString({
|
|
323
|
+
padding: padding,
|
|
324
|
+
})
|
|
325
|
+
},
|
|
326
|
+
getCouponBgImage(){
|
|
327
|
+
let bg = '';
|
|
328
|
+
if(this.$xdUniHelper.checkVarType(this.couponImageUrl) === 'object'
|
|
329
|
+
|| this.$xdUniHelper.checkVarType(this.couponImageUrl) === 'array'
|
|
330
|
+
) {
|
|
331
|
+
if(!this.$xdUniHelper.isEmpty(this.couponImageUrl)) {
|
|
332
|
+
return getServiceUrl(this.couponImageUrl.url)
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return bg
|
|
336
|
+
},
|
|
337
|
+
couponRightItemBoxStyle(){
|
|
338
|
+
let image = {};
|
|
339
|
+
if(this.cardImageUrl) image = {
|
|
340
|
+
backgroundImage: `url(${this.getCouponBgImage})`,
|
|
341
|
+
backgroundSize: '100%',
|
|
342
|
+
backgroundRepeat: 'no-repeat',
|
|
343
|
+
}
|
|
344
|
+
return this.styleObjectToString(image)
|
|
345
|
+
},
|
|
346
|
+
couponItemBoxStyle(){
|
|
347
|
+
return this.styleObjectToString({
|
|
348
|
+
borderRadius: this.couponRadius + 'rpx',
|
|
349
|
+
})
|
|
350
|
+
},
|
|
351
|
+
},
|
|
43
352
|
watch: {
|
|
44
353
|
container(value, oldValue) {
|
|
45
354
|
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
@@ -48,31 +357,74 @@
|
|
|
48
357
|
},
|
|
49
358
|
created() {
|
|
50
359
|
this.init(this.container);
|
|
51
|
-
|
|
360
|
+
this.isPreview = this.$configProject.isPreview;
|
|
361
|
+
this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
52
362
|
//todo
|
|
53
363
|
},
|
|
54
364
|
methods: {
|
|
55
365
|
onJfbLoad(options) {
|
|
56
|
-
|
|
57
|
-
// jfbRootExec('baiduUserLogin', {
|
|
58
|
-
|
|
59
|
-
// vm: this,// data: {
|
|
60
|
-
|
|
61
|
-
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
62
|
-
|
|
63
|
-
// }
|
|
64
|
-
|
|
65
|
-
// }).then().catch()
|
|
366
|
+
this.getContent();
|
|
66
367
|
},
|
|
67
368
|
/**
|
|
68
369
|
* @description 监听事件变化
|
|
69
370
|
* @param container {object} 业务组件对象自己
|
|
70
371
|
*/
|
|
71
|
-
init(
|
|
372
|
+
init(value) {
|
|
373
|
+
this.previewCurrent = getContainerPropsValue(value, "content.previewCurrent", 'card');
|
|
374
|
+
this.cardBindPath = getContainerPropsValue(value, "content.cardBindPath", {value: ""}).value;
|
|
375
|
+
this.menuPadding = getContainerPropsValue(value, "content.menuPadding", {top: 20, left: 20, right: 20, bottom: 20});
|
|
376
|
+
this.menuBtnPadding = getContainerPropsValue(value, "content.menuBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
|
|
377
|
+
this.menuItemMargin = getContainerPropsValue(value, "content.menuItemMargin", 40);
|
|
378
|
+
this.menuTabColor = getContainerPropsValue(value, "content.menuTabColor", {});
|
|
379
|
+
this.menuBorderWidth = getContainerPropsValue(value, "content.menuBorderWidth", 1);
|
|
380
|
+
this.bindCardIcon = getContainerPropsValue(value, "content.bindCardIcon", {});
|
|
381
|
+
this.cardImageUrl = getContainerPropsValue(value, "content.cardImageUrl", "");
|
|
382
|
+
this.couponImageUrl = getContainerPropsValue(value, "content.couponImageUrl", "");
|
|
383
|
+
this.cardPadding = getContainerPropsValue(value, "content.cardPadding", {top: 20, left: 20, right: 20, bottom: 20});
|
|
384
|
+
this.cardRadius = getContainerPropsValue(value, "content.cardRadius", 16);
|
|
385
|
+
this.couponRadius = getContainerPropsValue(value, "content.couponRadius", 16);
|
|
386
|
+
this.cardListPadding = getContainerPropsValue(value, "content.cardListPadding", {});
|
|
387
|
+
this.cardItemMargin = getContainerPropsValue(value, "content.cardItemMargin", 20);
|
|
388
|
+
this.couponTitleBgColor = getContainerPropsValue(value, "content.couponTitleBgColor", {});
|
|
389
|
+
this.cardBtnTextStyle = getContainerPropsValue(value, "content.cardBtnTextStyle", {});
|
|
390
|
+
this.cardBtnRadius = getContainerPropsValue(value, "content.cardBtnRadius", 16);
|
|
391
|
+
this.cardBtnPadding = getContainerPropsValue(value, "content.cardBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
|
|
392
|
+
this.couponBtnTextStyle = getContainerPropsValue(value, "content.couponBtnTextStyle", {});
|
|
393
|
+
this.couponUseBtnPadding = getContainerPropsValue(value, "content.couponUseBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
|
|
394
|
+
this.couponBtnRadius = getContainerPropsValue(value, "content.couponBtnRadius", 16);
|
|
395
|
+
this.couponLeftBgColor = getContainerPropsValue(value, "content.couponLeftBgColor", "");
|
|
72
396
|
|
|
73
|
-
|
|
397
|
+
console.log(this.couponLeftBgColor, 'couponLeftBgColor')
|
|
74
398
|
|
|
75
|
-
|
|
399
|
+
if(this.$configProject.isPreview){
|
|
400
|
+
this.menuType = this.previewCurrent;
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
toBindCard(){
|
|
404
|
+
this.$xdUniHelper.navigateTo({
|
|
405
|
+
url: this.cardBindPath
|
|
406
|
+
})
|
|
407
|
+
},
|
|
408
|
+
getContent() {
|
|
409
|
+
jfbRootExec("getListBaseNewsContent", {
|
|
410
|
+
vm: this,
|
|
411
|
+
data: {
|
|
412
|
+
page_id: this.pageAttr["page_id"], //页面ID
|
|
413
|
+
container_id: this.containerId, //组件ID
|
|
414
|
+
limit: 1,
|
|
415
|
+
},
|
|
416
|
+
})
|
|
417
|
+
.then((res) => {
|
|
418
|
+
if (res.list.length > 0) {
|
|
419
|
+
if(res.list && res.list.length > 0) {
|
|
420
|
+
this.notice = this.$xdUniHelper.filterHtml(res.list[0].content);
|
|
421
|
+
}
|
|
422
|
+
this.noticeStatus = true;
|
|
423
|
+
}
|
|
424
|
+
})
|
|
425
|
+
.catch((error) => {
|
|
426
|
+
console.error(error);
|
|
427
|
+
});
|
|
76
428
|
},
|
|
77
429
|
onJfbScroll(options) {
|
|
78
430
|
console.log('event.onJfbScroll', options)
|
|
@@ -105,7 +457,126 @@
|
|
|
105
457
|
|
|
106
458
|
.jfb-base-tfk-card-login {
|
|
107
459
|
&__body{
|
|
460
|
+
.menu_wrap{
|
|
461
|
+
display: flex;
|
|
462
|
+
justify-content: space-between;
|
|
463
|
+
align-items: center;
|
|
464
|
+
background-color: #FFFFFF;
|
|
465
|
+
.menu_list{
|
|
466
|
+
display: flex;
|
|
467
|
+
align-items: center;
|
|
468
|
+
.menu_item_inner{
|
|
469
|
+
border-bottom: 1px solid transparent;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
&-notice {
|
|
474
|
+
width: 100%;
|
|
475
|
+
margin-top: unit(30, rpx);
|
|
476
|
+
height: unit(80, rpx);
|
|
477
|
+
position: relative;
|
|
478
|
+
&-in {
|
|
479
|
+
position: absolute;
|
|
480
|
+
left: unit(-30, rpx);
|
|
481
|
+
top: unit(0, rpx);
|
|
482
|
+
right: unit(-30, rpx);
|
|
483
|
+
bottom: 0;
|
|
484
|
+
display: flex;
|
|
485
|
+
padding: 0 unit(30, rpx);
|
|
486
|
+
overflow: hidden;
|
|
487
|
+
align-items: center;
|
|
488
|
+
}
|
|
108
489
|
|
|
490
|
+
}
|
|
491
|
+
.card_list_wrap{
|
|
492
|
+
padding: 0 20rpx;
|
|
493
|
+
.bind_list{
|
|
494
|
+
&.skeleton-wrap{
|
|
495
|
+
.bind_item{
|
|
496
|
+
.bind_point{
|
|
497
|
+
.skeleton-item(120rpx, 40rpx);
|
|
498
|
+
}
|
|
499
|
+
.bind_deduct{
|
|
500
|
+
.skeleton-item(350rpx, 48rpx);
|
|
501
|
+
padding: 0;
|
|
502
|
+
}
|
|
503
|
+
.bind_number{
|
|
504
|
+
.skeleton-item(250rpx, 28rpx);
|
|
505
|
+
}
|
|
506
|
+
.bind_time{
|
|
507
|
+
.skeleton-item(180rpx, 24rpx);
|
|
508
|
+
}
|
|
509
|
+
.bind_type{
|
|
510
|
+
.skeleton-item(150rpx, 66rpx);
|
|
511
|
+
}
|
|
512
|
+
.bind_btn{
|
|
513
|
+
.skeleton-item(180rpx, 64rpx);
|
|
514
|
+
padding: 0;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
.bind_item{
|
|
519
|
+
padding: 32rpx;
|
|
520
|
+
background: #fff;
|
|
521
|
+
border-radius: 16rpx;
|
|
522
|
+
border: 1px solid #eeeeee;
|
|
523
|
+
margin: var(--card-list-margin) 0;
|
|
524
|
+
position: relative;
|
|
525
|
+
.bind_point{
|
|
526
|
+
color: #000;
|
|
527
|
+
font-size: 48rpx;
|
|
528
|
+
}
|
|
529
|
+
.bind_deduct{
|
|
530
|
+
font-size: 28rpx;
|
|
531
|
+
color: #999;
|
|
532
|
+
background: rgba(51, 51, 51, 0.05);
|
|
533
|
+
display: inline-block;
|
|
534
|
+
padding: 4rpx 20rpx;
|
|
535
|
+
margin-top: 12rpx;
|
|
536
|
+
}
|
|
537
|
+
.bind_number{
|
|
538
|
+
font-size: 28rpx;
|
|
539
|
+
color: #999;
|
|
540
|
+
margin-top: 20rpx;
|
|
541
|
+
font-weight: 500;
|
|
542
|
+
}
|
|
543
|
+
.bind_time{
|
|
544
|
+
font-size: 24rpx;
|
|
545
|
+
color: #999;
|
|
546
|
+
margin-top: 16rpx;
|
|
547
|
+
font-weight: 500;
|
|
548
|
+
line-height: 1;
|
|
549
|
+
}
|
|
550
|
+
.bind_type{
|
|
551
|
+
font-size: 28rpx;
|
|
552
|
+
color: #333333;
|
|
553
|
+
position: absolute;
|
|
554
|
+
top: 32rpx;
|
|
555
|
+
right: 32rpx;
|
|
556
|
+
text-align: center;
|
|
557
|
+
font-size: 24rpx;
|
|
558
|
+
font-weight: 400;
|
|
559
|
+
}
|
|
560
|
+
.bind_btn{
|
|
561
|
+
font-size: 28rpx;
|
|
562
|
+
color: #999;
|
|
563
|
+
position: absolute;
|
|
564
|
+
bottom: 32rpx;
|
|
565
|
+
right: 32rpx;
|
|
566
|
+
background: #ddd;
|
|
567
|
+
padding: 16rpx 60rpx;
|
|
568
|
+
border-radius: 12rpx;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
.coupon_list{}
|
|
573
|
+
.no_more_card{
|
|
574
|
+
text-align: center;
|
|
575
|
+
padding: 20rpx 0;
|
|
576
|
+
color: #CCCCCC;
|
|
577
|
+
font-size: 28rpx;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
109
580
|
}
|
|
110
581
|
}
|
|
111
582
|
</style>
|