jufubao-base 1.0.169-beta9 → 1.0.169

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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseLogin/Attr.js +510 -1147
  3. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +63 -364
  4. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  5. package/src/components/JfbBaseTfkCardBind/Api.js +30 -49
  6. package/src/components/JfbBaseTfkCardBind/Attr.js +38 -635
  7. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +22 -589
  8. package/src/components/JfbBaseTfkCardBind/Mock.js +9 -19
  9. package/src/components/JfbBaseTfkCardDetail/Api.js +32 -19
  10. package/src/components/JfbBaseTfkCardDetail/Attr.js +33 -692
  11. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +23 -630
  12. package/src/components/JfbBaseTfkCardDetail/Mock.js +11 -151
  13. package/src/components/JfbBaseTfkCardLogin/Api.js +34 -19
  14. package/src/components/JfbBaseTfkCardLogin/Attr.js +33 -885
  15. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +16 -729
  16. package/src/components/JfbBaseTfkCardLogin/Mock.js +11 -721
  17. package/src/components/JfbBaseTfkSearch/Api.js +42 -11
  18. package/src/components/JfbBaseTfkSearch/Attr.js +33 -143
  19. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +22 -171
  20. package/src/components/JfbBaseTfkSearch/Mock.js +11 -90
  21. package/src/mixins/colorCardMixins.js +9 -71
  22. package/src/mixins/componentsMixins.js +23 -346
  23. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +0 -271
  24. package/src/components/JfbBaseTfkSearch/AllList.vue +0 -231
  25. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +0 -157
  26. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +0 -179
  27. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +0 -308
  28. package/src/components/JfbBaseTfkSearch/ContentShop.vue +0 -184
  29. package/src/components/JfbBaseTfkSearch/CusAttr.js +0 -203
  30. package/src/components/JfbBaseTfkSearch/CustomList.vue +0 -401
  31. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +0 -45
  32. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +0 -109
  33. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +0 -246
  34. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +0 -81
  35. package/src/components/JfbBaseTfkSearch/handleKeyword.js +0 -24
  36. package/src/components/JfbBaseTfkSearch/listMixins.js +0 -151
  37. package/src/components/JfbBaseTfkSearch/search.js +0 -293
@@ -13,450 +13,31 @@
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" :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"
22
- :style="{
23
- marginRight: menuItemMargin + 'px'
24
- }"
25
- @click="changeMenu('card')"
26
- >
27
- <view class="menu_item_inner"
28
- :style="[menuType === 'card' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的票券包</view>
29
- </view>
30
- <view class="menu_item" @click="changeMenu('coupon')">
31
- <view class="menu_item_inner"
32
- :style="[menuType === 'coupon' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的优惠券</view>
33
- </view>
34
- </view>
35
- <view class="bind_card" :style="bindCardBoxStyle" @click="toBindCard">
36
- <xd-font-icon :icon="bindCardIcon.icon"
37
- :color="bindCardIcon.color"
38
- :size="bindCardIcon.size"
39
- ></xd-font-icon>
40
- <view v-if="bindCardText" :style="getBindCardTextStyle">{{ bindCardText }}</view>
41
- </view>
42
- </view>
43
- <view class="JfbBaseNotice">
44
- <!--notice-->
45
- <view class="jfb-base-tfk-card-login__body-line" v-if="!notice"></view>
46
- <view class="jfb-base-tfk-card-login__body-notice" :style="noticeWrapBoxStyle" v-if="notice">
47
- <view
48
- class="jfb-base-tfk-card-login__body-notice-in"
49
- :style="noticeBoxStyle"
50
- >
51
- <xd-notice-bar
52
- style="width: 100%"
53
- :color="noticeFont.color"
54
- :showIcon="true"
55
- :scrollable="true"
56
- :speed="20"
57
- :fontSize="noticeFont.size"
58
- :height="70"
59
- :is-no-bgc="false"
60
- >
61
- <template>
62
- <view v-html="notice"></view>
63
- </template>
64
- </xd-notice-bar>
65
- </view>
66
- </view>
67
- <view class="jfb-base-tfk-card-login__body-notice" :style="noticeWrapBoxStyle" v-if="noticeStatus && isPreview && notice === ''">
68
- <view
69
- class="jfb-base-tfk-card-login__body-notice-in"
70
- :style="[noticeBoxStyle, {
71
- textAlign: 'center',
72
- color: dangerColor,
73
- fontSize: 26 + 'rpx',
74
- }]">该组件未配置数据,因此改模块在正式环境将不显示</view>
75
- </view>
76
- <!--notice end-->
77
- </view>
78
- <view class="card_list_wrap" :style="listBoxStyle">
79
-
80
- <!-- 我的票券包- 已绑票券 -->
81
- <template v-if="menuType === 'card'">
82
- <view v-if="loadingList">
83
- <view class="bind_list skeleton-wrap">
84
- <view class="bind_item" v-for="i in 5" :key="i" :style="cardItemBoxStyle">
85
- <view>
86
- <view class="bind_point"></view>
87
- <view class="bind_deduct"></view>
88
- </view>
89
- <view>
90
- <view class="bind_number"></view>
91
- <view class="bind_time"></view>
92
- </view>
93
- <view class="bind_type"></view>
94
- <view class="bind_btn"></view>
95
- </view>
96
- </view>
97
- </view>
98
- <view v-else>
99
- <view v-if="cardList.length" class="bind_list">
100
- <view class="bind_item" v-for="(item, i) in cardList" :key="i"
101
- :style="cardItemBoxStyle" @click="toCardDetail(item)">
102
- <view>
103
- <view class="bind_point">
104
- <xd-unit
105
- :unitFontSize="24"
106
- :fontSize="48"
107
- :price="item.card_point"
108
- :isOld="false"
109
- :unit="item.unit || ''"
110
- :colorNew="'#333333'"
111
- ></xd-unit>
112
- </view>
113
- <view v-if="item.other_card_point && item.card_point_type !== 1" class="bind_deduct">
114
- 兑换其他商品可抵:{{ item.other_card_point }}
115
- </view>
116
- </view>
117
- <view>
118
- <view class="bind_number">{{ item.card_number }}</view>
119
- <view class="bind_time">{{ item.end_time }}到期</view>
120
- </view>
121
- <view class="bind_type" :style="{
122
- top: cardPadding.top + 'rpx',
123
- right: cardPadding.right + 'rpx',
124
- }">
125
- <view>{{ item.card_type_name }}</view>
126
- <view v-if="item.is_exchange === 'Y'">(可转票券)</view>
127
- </view>
128
- <view class="bind_btn"
129
- :style="[{
130
- right: cardPadding.right + 'rpx',
131
- bottom: cardPadding.bottom + 'rpx',
132
- borderRadius: cardBtnRadius + 'rpx',
133
- padding: bindCardBtnPadding,
134
- minWidth: cardBtnMinWidth + 'rpx',
135
- }, item.is_login === 'Y' ? bindCardActiveStyle : bindCardBtnStyle]"
136
- @click.stop="doCardLogin(item)"
137
- >{{ item.is_login === 'Y' ? '已登录' : '登录'}}</view>
138
- </view>
139
- <view v-if="!hasCardList" class="no_more_card">没有更多券了,查看失效的票券 ></view>
140
- </view>
141
- <view v-else>
142
- 暂无数据
143
- </view>
144
- </view>
145
- </template>
146
-
147
- <!-- 优惠券 -->
148
- <template v-else >
149
- <view v-if="couponList.length" class="coupon_list">
150
- <xd-coupon-item v-for="(item, i) in couponList" :key="i"
151
- :couponRadius="couponRadius"
152
- :couponImageUrl="couponImageUrl"
153
- :couponTitleBgColor="couponTitleBgColor"
154
- :couponUseBtnPadding="couponUseBtnPadding"
155
- :couponBtnRadius="couponBtnRadius"
156
- :couponBtnTextStyle="couponBtnTextStyle"
157
- :couponLeftBgColor="couponLeftBgColor"
158
- :item="item"
159
- @useCoupon="doCardLogin(item)"
160
- ></xd-coupon-item>
161
- <view v-if="!hasCouponList" class="no_more_card">没有更多券了,查看失效的票券 ></view>
162
- </view>
163
- <view v-else>
164
- 暂无数据
165
- </view>
166
-
167
- </template>
168
- </view>
169
-
16
+ <view class="jfb-base-tfk-card-login__body">
17
+ <view>测试插件( {{containerId}} )</view>
170
18
  </view>
171
19
  </view>
172
20
  </template>
173
21
 
174
22
  <script>
175
23
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
176
- import XdUnit from "@/components/XdUnit/XdUnit";
177
24
  import { jfbRootExec } from "@/utils/xd.event";
178
25
  import JfbBaseTfkCardLoginMixin from "./JfbBaseTfkCardLoginMixin";
179
26
  import { getContainerPropsValue } from "@/utils/xd.base";
180
27
  import componentsMixins from "@/mixins/componentsMixins";
181
28
  import extsMixins from "@/mixins/extsMixins";
182
- import getServiceUrl from '@/common/getServiceUrl'
183
- import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
184
- import XdCouponItem from "./XdCouponItem";
185
- import Color from "color"
186
- import { mapState, mapActions } from "vuex";
187
29
  export default {
188
30
  name: "JfbBaseTfkCardLogin",
189
31
  components: {
190
- XdFontIcon,
191
- XdNoticeBar,
192
- XdCouponItem,
193
- XdUnit
32
+ XdFontIcon
194
33
  },
195
34
  mixins: [
196
35
  componentsMixins, extsMixins, JfbBaseTfkCardLoginMixin
197
36
  ],
198
37
  data() {
199
38
  return {
200
- menuType: "card", // card, coupon
201
- loadingList: true,
202
- cardList: [],
203
- couponList: [],
204
- hasCardList: false,
205
- hasCouponList: false,
206
-
207
- inCallbackUrlOrg:'',//是否带有回调地址
208
- inCallback: null, //内部跳转地址
209
- allEntryPath: "", //综合福利入口页
210
- cardDetailPath: "", //我的票券包详情页
211
-
212
- options: {},
213
- showDisabled: 'Y',
214
39
 
215
40
  //todo
216
- previewCurrent: "",
217
- isPreview: false,
218
- notice: "",
219
- noticeStatus: false,
220
- noticeBackgroundColor: "",
221
- cardBindPath: "",
222
- menuPadding: {},
223
- menuBtnPadding: {},
224
- menuItemMargin: 40,
225
- menuBorderWidth: 1,
226
- menuTabColor: {},
227
- bindCardIcon: {},
228
- cardImageUrl: "",
229
- couponImageUrl: "",
230
- cardPadding: {},
231
- cardRadius: 0,
232
- couponRadius: 0,
233
- cardListPadding: {},
234
- cardItemMargin: 20,
235
- couponTitleBgColor: "",
236
- cardBtnTextStyle: {}, //我的票券包登录按钮文字背景色设置
237
- cardBtnRadius: 16,
238
- cardBtnPadding: {},
239
- couponBtnTextStyle: {}, //优惠券包登录按钮文字背景色设置
240
- couponUseBtnPadding: {},
241
- couponBtnRadius: 16,
242
- couponLeftBgColor: "",
243
- noticeBgColor: "",
244
- noticeMargin: {},
245
- noticePadding: {},
246
- noticeFont: {},
247
- bindCardText: "",
248
- bindCardTextStyle: {},
249
- bindCardShowType: "",
250
- bindCardBtnRadius: 16,
251
- cardBorder: {},
252
- cardShadow: {},
253
- cardImageMode: "",
254
- entryGroupId: "",
255
- cardHeight: 270,
256
- cardBtnMinWidth: 100,
257
- }
258
- },
259
- computed: {
260
- ...mapState({
261
- jwxSDK: (state) => state.jwxSDK,
262
- jfbAuthorize: (state) => state.jfbAuthorize,
263
- }),
264
- menuBoxStyle(){
265
- let padding = `${this.checkValue(this.menuPadding.top, 20)}rpx`;
266
- padding = `${padding} ${this.checkValue(this.menuPadding.right, 20)}rpx`;
267
- padding = `${padding} ${this.checkValue(this.menuPadding.bottom, 20)}rpx`;
268
- padding = `${padding} ${this.checkValue(this.menuPadding.left, 20)}rpx`;
269
-
270
- return this.styleObjectToString({
271
- // background: this.formBgColor,
272
- padding: padding,
273
- })
274
- },
275
- menuItemBoxStyle(){
276
- let padding = `${this.checkValue(this.menuBtnPadding.top, 20)}rpx`;
277
- padding = `${padding} ${this.checkValue(this.menuBtnPadding.right, 20)}rpx`;
278
- padding = `${padding} ${this.checkValue(this.menuBtnPadding.bottom, 20)}rpx`;
279
- padding = `${padding} ${this.checkValue(this.menuBtnPadding.left, 20)}rpx`;
280
- return this.styleObjectToString({
281
- padding
282
- })
283
- },
284
- menuItemStyle(){
285
- let styleObj = {
286
- color: this.menuTabColor['color'] || '#333',
287
- background: this.menuTabColor['bgColor'] || '#fff',
288
- fontSize: this.menuTabColor['fontSize'] || '30rpx',
289
- fontWeight: this.menuTabColor['fontWeight'] || 'normal',
290
- borderWidth: this.menuBorderWidth + 'px',
291
- }
292
-
293
- return this.styleObjectToString(styleObj)
294
- },
295
- menuItemActiveStyle(){
296
- let defaultTextColor = '#ff5a39';
297
- let styleActiveObj = {
298
- color: this.menuTabColor['actColor'] || defaultTextColor,
299
- background: this.menuTabColor['actBgColor'] || '#fff',
300
- fontSize: this.menuTabColor['actFontSize'] || '30rpx',
301
- fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
302
- borderBottom: `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
303
- }
304
- return this.styleObjectToString(styleActiveObj)
305
- },
306
- bindCardBtnPadding(){
307
- let padding = `${this.checkValue(this.cardBtnPadding.top, 20)}rpx`;
308
- padding = `${padding} ${this.checkValue(this.cardBtnPadding.right, 20)}rpx`;
309
- padding = `${padding} ${this.checkValue(this.cardBtnPadding.bottom, 20)}rpx`;
310
- padding = `${padding} ${this.checkValue(this.cardBtnPadding.left, 20)}rpx`;
311
- return padding;
312
- },
313
- bindCardBtnStyle(){
314
- let styleObj = {
315
- color: this.cardBtnTextStyle['color'] || '#333',
316
- background: this.cardBtnTextStyle['bgColor'] || '#fff',
317
- fontSize: this.cardBtnTextStyle['fontSize'] || '30rpx',
318
- fontWeight: this.cardBtnTextStyle['fontWeight'] || 'normal',
319
- }
320
- return this.styleObjectToString(styleObj)
321
- },
322
- bindCardActiveStyle(){
323
- let defaultTextColor = '#ff5a39';
324
- let styleActiveObj = {
325
- color: this.cardBtnTextStyle['actColor'] || defaultTextColor,
326
- background: this.cardBtnTextStyle['actBgColor'] || '#fff',
327
- fontSize: this.cardBtnTextStyle['actFontSize'] || '30rpx',
328
- fontWeight: this.cardBtnTextStyle['actFontWeight'] || 'normal',
329
- }
330
- return this.styleObjectToString(styleActiveObj)
331
- },
332
- couponBtnPadding(){
333
- let padding = `${this.checkValue(this.couponUseBtnPadding.top, 20)}rpx`;
334
- padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.right, 20)}rpx`;
335
- padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.bottom, 20)}rpx`;
336
- padding = `${padding} ${this.checkValue(this.couponUseBtnPadding.left, 20)}rpx`;
337
- return padding;
338
- },
339
- couponBtnStyle(){
340
- let styleObj = {
341
- color: this.couponBtnTextStyle['color'] || '#333',
342
- background: this.couponBtnTextStyle['bgColor'] || '#fff',
343
- fontSize: this.couponBtnTextStyle['fontSize'] || '30rpx',
344
- fontWeight: this.couponBtnTextStyle['fontWeight'] || 'normal',
345
- }
346
- return this.styleObjectToString(styleObj)
347
- },
348
- bindCardBoxStyle(){
349
- return this.styleObjectToString({
350
- border: `1px solid ${this.bindCardShowType == 'button' ? this.bindCardTextStyle.color : 'transparent'}`,
351
- borderRadius: this.bindCardBtnRadius + 'rpx',
352
- })
353
- },
354
- getBindCardTextStyle(){
355
- let styleObj = {
356
- color: this.bindCardTextStyle['color'] || '#333',
357
- fontSize: this.bindCardTextStyle['fontSize'] || '30rpx',
358
- fontWeight: this.bindCardTextStyle['fontWeight'] || 'normal',
359
- marginLeft: this.bindCardIcon.icon ? '10rpx' : 0,
360
- }
361
- return this.styleObjectToString(styleObj)
362
- },
363
- getCardBgImage(){
364
- let bg = '';
365
- if(this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'object'
366
- || this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'array'
367
- ) {
368
- if(!this.$xdUniHelper.isEmpty(this.cardImageUrl)) {
369
- return getServiceUrl(this.cardImageUrl.url)
370
- }
371
- }
372
- return bg
373
- },
374
- cardItemBoxStyle(){
375
- let image = {};
376
- let border = "none";
377
- let boxShadow = "none";
378
- if(this.cardBorder && this.cardBorder.type === 'Y'){
379
- let { width, color } = this.cardBorder.value;
380
- border = `${width}rpx solid ${color}`;
381
- }
382
- if(this.cardShadow && this.cardShadow.type === 'Y'){
383
- let { width, color } = this.cardShadow.value;
384
- boxShadow = `0 0 ${width}rpx ${color}`;
385
- }
386
- if(this.cardImageUrl) image = {
387
- backgroundImage: `url(${this.getCardBgImage})`,
388
- backgroundSize: '100%',
389
- backgroundRepeat: 'no-repeat',
390
- }
391
- if(this.cardImageMode) image['backgroundSize'] = this.cardImageMode;
392
-
393
- let padding = `${this.checkValue(this.cardPadding.top, 20)}rpx`;
394
- padding = `${padding} ${this.checkValue(this.cardPadding.right, 20)}rpx`;
395
- padding = `${padding} ${this.checkValue(this.cardPadding.bottom, 20)}rpx`;
396
- padding = `${padding} ${this.checkValue(this.cardPadding.left, 20)}rpx`;
397
- return this.styleObjectToString({
398
- ...image,
399
- padding: padding,
400
- borderRadius: this.cardRadius + 'rpx',
401
- border: border,
402
- boxShadow: boxShadow,
403
- height: this.cardHeight + 'rpx',
404
- })
405
- },
406
- listBoxStyle(){
407
- let padding = `${this.checkValue(this.cardListPadding.top, 20)}rpx`;
408
- padding = `${padding} ${this.checkValue(this.cardListPadding.right, 20)}rpx`;
409
- padding = `${padding} ${this.checkValue(this.cardListPadding.bottom, 20)}rpx`;
410
- padding = `${padding} ${this.checkValue(this.cardListPadding.left, 20)}rpx`;
411
-
412
- return this.styleObjectToString({
413
- padding: padding,
414
- })
415
- },
416
- getCouponBgImage(){
417
- let bg = '';
418
- if(this.$xdUniHelper.checkVarType(this.couponImageUrl) === 'object'
419
- || this.$xdUniHelper.checkVarType(this.couponImageUrl) === 'array'
420
- ) {
421
- if(!this.$xdUniHelper.isEmpty(this.couponImageUrl)) {
422
- return getServiceUrl(this.couponImageUrl.url)
423
- }
424
- }
425
- return bg
426
- },
427
- couponRightItemBoxStyle(){
428
- let image = {};
429
- if(this.cardImageUrl) image = {
430
- backgroundImage: `url(${this.getCouponBgImage})`,
431
- backgroundSize: '100%',
432
- backgroundRepeat: 'no-repeat',
433
- }
434
- return this.styleObjectToString(image)
435
- },
436
- couponItemBoxStyle(){
437
- return this.styleObjectToString({
438
- borderRadius: this.couponRadius + 'rpx',
439
- })
440
- },
441
- noticeWrapBoxStyle(){
442
- let padding = `${this.checkValue(this.noticeMargin.top, 20)}rpx`;
443
- padding = `${padding} ${this.checkValue(this.noticeMargin.right, 20)}rpx`;
444
- padding = `${padding} ${this.checkValue(this.noticeMargin.bottom, 20)}rpx`;
445
- padding = `${padding} ${this.checkValue(this.noticeMargin.left, 20)}rpx`;
446
-
447
- return this.styleObjectToString({
448
- padding: padding,
449
- })
450
- },
451
- noticeBoxStyle(){
452
- let padding = `${this.checkValue(this.noticePadding.top, 20)}rpx`;
453
- padding = `${padding} ${this.checkValue(this.noticePadding.right, 20)}rpx`;
454
- padding = `${padding} ${this.checkValue(this.noticePadding.bottom, 20)}rpx`;
455
- padding = `${padding} ${this.checkValue(this.noticePadding.left, 20)}rpx`;
456
- return this.styleObjectToString({
457
- padding: padding,
458
- background: this.noticeBgColor
459
- })
460
41
  }
461
42
  },
462
43
  watch: {
@@ -467,189 +48,31 @@
467
48
  },
468
49
  created() {
469
50
  this.init(this.container);
470
- this.isPreview = this.$configProject.isPreview;
471
- this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
51
+
472
52
  //todo
473
53
  },
474
54
  methods: {
475
55
  onJfbLoad(options) {
476
- this.options = options;
477
- let { inCallback } = options;
478
- if(!inCallback) this.$storage.remove("inCallback"); //作为入口
479
- else {
480
- this.$storage.set("inCallback", inCallback);
481
- try{
482
- inCallback = Base64.decode(inCallback);
483
- this.inCallbackUrlOrg = options.inCallback;
484
- }catch (e){
485
- inCallback = null;
486
- }
487
- }
488
- //登录成功调整地址优先级
489
- this.inCallback = inCallback || this.allEntryPath || this.settings.index;
490
56
 
491
- this.getCardList();
492
- this.getContent();
57
+ // jfbRootExec('baiduUserLogin', {
58
+
59
+ // vm: this,// data: {
60
+
61
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
62
+
63
+ // }
64
+
65
+ // }).then().catch()
493
66
  },
494
67
  /**
495
68
  * @description 监听事件变化
496
69
  * @param container {object} 业务组件对象自己
497
70
  */
498
- init(value) {
499
- this.previewCurrent = getContainerPropsValue(value, "content.previewCurrent", 'card');
500
- this.cardBindPath = getContainerPropsValue(value, "content.cardBindPath", {value: ""}).value;
501
- this.menuPadding = getContainerPropsValue(value, "content.menuPadding", {top: 20, left: 20, right: 20, bottom: 20});
502
- this.menuBtnPadding = getContainerPropsValue(value, "content.menuBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
503
- this.menuItemMargin = getContainerPropsValue(value, "content.menuItemMargin", 40);
504
- this.menuTabColor = getContainerPropsValue(value, "content.menuTabColor", {});
505
- this.menuBorderWidth = getContainerPropsValue(value, "content.menuBorderWidth", 1);
506
- this.bindCardIcon = getContainerPropsValue(value, "content.bindCardIcon", {});
507
- this.cardImageUrl = getContainerPropsValue(value, "content.cardImageUrl", "");
508
- this.couponImageUrl = getContainerPropsValue(value, "content.couponImageUrl", "");
509
- this.cardPadding = getContainerPropsValue(value, "content.cardPadding", {top: 20, left: 20, right: 20, bottom: 20});
510
- this.cardRadius = getContainerPropsValue(value, "content.cardRadius", 16);
511
- this.couponRadius = getContainerPropsValue(value, "content.couponRadius", 16);
512
- this.cardListPadding = getContainerPropsValue(value, "content.cardListPadding", {});
513
- this.cardItemMargin = getContainerPropsValue(value, "content.cardItemMargin", 20);
514
- this.couponTitleBgColor = getContainerPropsValue(value, "content.couponTitleBgColor", {});
515
- this.cardBtnTextStyle = getContainerPropsValue(value, "content.cardBtnTextStyle", {});
516
- this.cardBtnRadius = getContainerPropsValue(value, "content.cardBtnRadius", 16);
517
- this.cardBtnPadding = getContainerPropsValue(value, "content.cardBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
518
- this.couponBtnTextStyle = getContainerPropsValue(value, "content.couponBtnTextStyle", {});
519
- this.couponUseBtnPadding = getContainerPropsValue(value, "content.couponUseBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
520
- this.couponBtnRadius = getContainerPropsValue(value, "content.couponBtnRadius", 16);
521
- this.couponLeftBgColor = getContainerPropsValue(value, "content.couponLeftBgColor", "");
522
- this.noticeBgColor = getContainerPropsValue(value, "content.noticeBgColor", "");
523
- this.noticeMargin = getContainerPropsValue(value, "content.noticeMargin", {top: 20, left: 20, right: 20, bottom: 20});
524
- this.noticePadding = getContainerPropsValue(value, "content.noticePadding", {top: 20, left: 20, right: 20, bottom: 20});
525
- this.noticeFont = getContainerPropsValue(value, "content.noticeFont", {});
526
- this.bindCardText = getContainerPropsValue(value, "content.bindCardText", "");
527
- this.bindCardTextStyle = getContainerPropsValue(value, "content.bindCardTextStyle", {});
528
- this.bindCardShowType = getContainerPropsValue(value, "content.bindCardShowType", 'text');
529
- this.bindCardBtnRadius = getContainerPropsValue(value, "content.bindCardBtnRadius", 16);
530
- this.cardBorder = getContainerPropsValue(value, "content.cardBorder", {});
531
- this.cardShadow = getContainerPropsValue(value, "content.cardShadow", {});
532
- this.cardImageMode = getContainerPropsValue(value, "content.cardImageMode", '');
533
- this.allEntryPath = getContainerPropsValue(value, "content.allEntryPath", {value: ""}).value;
534
- this.cardDetailPath = getContainerPropsValue(value, "content.cardDetailPath", {value: "/tfktest/system/card/tkfDetail"}).value;
535
- // this.entryGroupId = getContainerPropsValue(value,"content.entryGroupId","default");
536
- this.cardHeight = getContainerPropsValue(value, "content.cardHeight", 270);
537
- this.cardBtnMinWidth = getContainerPropsValue(value, "content.cardBtnMinWidth", 100);
71
+ init(container) {
538
72
 
539
- console.log(this.cardShadow, 'cardShadow')
540
- if(this.bindCardTextStyle && !this.bindCardTextStyle.color){
541
- this.bindCardTextStyle.color = this.mainColor;
542
- }
543
- if(this.bindCardIcon && !this.bindCardIcon.color){
544
- this.bindCardIcon.color = this.mainColor;
545
- }
546
- if(this.menuTabColor && !this.menuTabColor.actColor){
547
- this.menuTabColor.actColor = this.mainColor;
548
- }
549
- if(this.cardBtnTextStyle){
550
- if(!this.cardBtnTextStyle.actBgColor){
551
- this.cardBtnTextStyle.actBgColor = this.mainColor;
552
- }
553
- if(!this.cardBtnTextStyle.bgColor){
554
- this.cardBtnTextStyle.bgColor = this.mainColor;
555
- }
556
- }
73
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
557
74
 
558
- if(this.$configProject.isPreview){
559
- this.menuType = this.previewCurrent;
560
- }
561
- },
562
- toCardDetail(item){
563
- this.$xdUniHelper.navigateTo({
564
- url: this.cardDetailPath + `?card_number=${item["card_number"]}`
565
- },false)
566
- },
567
- doCardLogin(item){
568
- this.$xdShowLoading({});
569
- jfbRootExec("loginTfkCardBind", {
570
- vm: this,
571
- data: {
572
- card_number: item["card_number"]
573
- }
574
- }).then(res => {
575
- this.$xdHideLoading();
576
- //#ifdef MP-WEIXIN
577
- if (this.jfbAuthorize !== null) {
578
- this.jfbAuthorize.setCardToken(res);
579
- }
580
- //#endif
581
-
582
- if (this.$configProject.isPreview) {
583
- console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
584
- } else {
585
- this.$xdUniHelper.redirectTo({
586
- url: this.inCallback,
587
- });
588
- }
589
- }).catch((res) => {
590
- this.$xdHideLoading();
591
- });
592
- },
593
- changeMenu(menu){
594
- this.menuType = menu;
595
- this.getCardList();
596
- },
597
- getCardList(){
598
- let show_type = this.menuType === 'coupon' ? 'coupon' : 'normal';
599
- let params = {show_type};
600
-
601
- // let params = {is_all: 'Y', is_show_entry_settings: 'Y'};
602
- // if(options['jfb_business_code']) {
603
- // params['card_business_code'] = options['jfb_business_code'];
604
- // }
605
- // if(this.entryGroupId) params['group_id'] = this.entryGroupId;
606
- this.$xdShowLoading({});
607
- jfbRootExec("getTfkListCardBind", {
608
- vm: this,
609
- data: params,
610
- }).then(res => {
611
- this.loadingList = false;
612
- this.$xdHideLoading();
613
- this.showDisabled = res.is_show_invalid_card_entrance;
614
-
615
- let list = res.list.map(item => {
616
- item.other_card_point = item.other_card_point ? this.$xdUniHelper.divisionFloatNumber(item.other_card_point, 100) : 0
617
- return item;
618
- })
619
- if(show_type === 'coupon'){
620
- this.couponList = list;
621
- }
622
- if(show_type === 'normal'){
623
- this.cardList = list;
624
- }
625
- })
626
- .catch(() => this.$xdHideLoading());
627
- },
628
- toBindCard(){
629
- this.$xdUniHelper.navigateTo({
630
- url: this.cardBindPath
631
- })
632
- },
633
- getContent() {
634
- jfbRootExec("getListBaseNewsContent", {
635
- vm: this,
636
- data: {
637
- page_id: this.pageAttr["page_id"], //页面ID
638
- container_id: this.containerId, //组件ID
639
- limit: 1,
640
- },
641
- })
642
- .then((res) => {
643
- if (res.list.length > 0) {
644
- if(res.list && res.list.length > 0) {
645
- this.notice = this.$xdUniHelper.filterHtml(res.list[0].content);
646
- }
647
- this.noticeStatus = true;
648
- }
649
- })
650
- .catch((error) => {
651
- console.error(error);
652
- });
75
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
653
76
  },
654
77
  onJfbScroll(options) {
655
78
  console.log('event.onJfbScroll', options)
@@ -682,143 +105,7 @@
682
105
 
683
106
  .jfb-base-tfk-card-login {
684
107
  &__body{
685
- .menu_wrap{
686
- display: flex;
687
- justify-content: space-between;
688
- align-items: center;
689
- background-color: #FFFFFF;
690
- .menu_list{
691
- display: flex;
692
- align-items: center;
693
- .menu_item_inner{
694
- border-bottom: 1px solid transparent;
695
- }
696
- }
697
- .bind_card{
698
- display: flex;
699
- align-items: center;
700
- padding: 8rpx 20rpx;
701
- border-radius: 16rpx;
702
- }
703
- }
704
- &-notice {
705
- width: 100%;
706
- box-sizing: border-box;
707
- &-in {
708
- display: flex;
709
- overflow: hidden;
710
- align-items: center;
711
- box-sizing: border-box;
712
- }
713
108
 
714
- }
715
- .card_list_wrap{
716
- padding: 0 20rpx;
717
- .bind_list{
718
- &.skeleton-wrap{
719
- .bind_item{
720
- .bind_point{
721
- .skeleton-item(120rpx, 40rpx);
722
- }
723
- .bind_deduct{
724
- .skeleton-item(350rpx, 48rpx);
725
- padding: 0;
726
- }
727
- .bind_number{
728
- .skeleton-item(250rpx, 28rpx);
729
- }
730
- .bind_time{
731
- .skeleton-item(180rpx, 24rpx);
732
- }
733
- .bind_type{
734
- .skeleton-item(150rpx, 66rpx);
735
- }
736
- .bind_btn{
737
- .skeleton-item(180rpx, 64rpx);
738
- padding: 0;
739
- }
740
- }
741
- }
742
- .bind_item{
743
- padding: 32rpx;
744
- background: #fff;
745
- border-radius: 16rpx;
746
- box-sizing: border-box;
747
- margin: var(--card-list-margin) 0;
748
- position: relative;
749
- display: flex;
750
- flex-direction: column;
751
- justify-content: space-between;
752
- .bind_point{
753
- color: #333333;
754
- font-size: 48rpx;
755
- ::v-deep .xd-unit{
756
- height: auto !important;
757
- font-weight: bold;
758
- align-items: flex-end;
759
- .xd-unit__unit{
760
- line-height: 1.7 !important;
761
- }
762
- }
763
- }
764
- .bind_deduct{
765
- font-size: 28rpx;
766
- color: #999;
767
- background: rgba(51, 51, 51, 0.05);
768
- display: inline-block;
769
- padding: 4rpx 20rpx;
770
- margin-top: 12rpx;
771
- }
772
- .bind_number{
773
- font-size: 28rpx;
774
- color: #999;
775
- margin-top: 20rpx;
776
- font-weight: 500;
777
- }
778
- .bind_time{
779
- font-size: 24rpx;
780
- color: #999;
781
- margin-top: 16rpx;
782
- font-weight: 500;
783
- line-height: 1;
784
- }
785
- .bind_type{
786
- font-size: 28rpx;
787
- color: #333333;
788
- position: absolute;
789
- top: 32rpx;
790
- right: 32rpx;
791
- text-align: center;
792
- font-size: 24rpx;
793
- font-weight: 400;
794
- }
795
- .bind_btn{
796
- font-size: 28rpx;
797
- color: #999;
798
- position: absolute;
799
- bottom: 32rpx;
800
- right: 32rpx;
801
- background: #ddd;
802
- padding: 16rpx 60rpx;
803
- border-radius: 12rpx;
804
- display: flex;
805
- align-items: center;
806
- justify-content: center;
807
- }
808
- }
809
- }
810
- .coupon_list{
811
- ::v-deep .xd-coupon_item{
812
- margin: var(--card-list-margin) 0;
813
- }
814
- }
815
- .no_more_card{
816
- text-align: center;
817
- padding: 20rpx 0;
818
- color: #CCCCCC;
819
- font-size: 28rpx;
820
- }
821
- }
822
109
  }
823
110
  }
824
111
  </style>