jufubao-base 1.0.216 → 1.0.218-beta1

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 (28) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseCard/Attr.js +35 -0
  3. package/src/components/JfbBaseCard/JfbBaseCard.vue +121 -22
  4. package/src/components/JfbBaseCard/Mock.js +9 -4
  5. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +26 -5
  6. package/src/components/JfbBaseCardDisabled/Mock.js +4 -2
  7. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +19 -1
  8. package/src/components/JfbBaseCardDisabledEntry/Mock.js +2 -0
  9. package/src/components/JfbBaseCardEntry/Attr.js +35 -0
  10. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +154 -118
  11. package/src/components/JfbBaseCardEntry/Mock.js +22 -1
  12. package/src/components/JfbBaseCardV2/Attr.js +35 -0
  13. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +118 -39
  14. package/src/components/JfbBaseCardV2/Mock.js +12 -6
  15. package/src/components/JfbBaseCardV3/Attr.js +35 -0
  16. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +23 -1
  17. package/src/components/JfbBaseHeader/Attr.js +58 -1
  18. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +22 -1
  19. package/src/components/JfbBaseNoticeDialog/Api.js +58 -0
  20. package/src/components/JfbBaseNoticeDialog/Attr.js +48 -0
  21. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +111 -0
  22. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialogLess.less +79 -0
  23. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialogMixin.js +30 -0
  24. package/src/components/JfbBaseNoticeDialog/Mock.js +13 -0
  25. package/src/components/JfbBaseTfkCardLogin/Attr.js +35 -0
  26. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +21 -1
  27. package/src/components/JfbBaseUserCenter/Attr.js +35 -0
  28. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +38 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.216",
3
+ "version": "1.0.218-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -251,6 +251,29 @@ export default {
251
251
  {label: "否", value: "2"},
252
252
  ]
253
253
  },
254
+ {
255
+ label: "无票券时是否展示购买新卡入口:",
256
+ ele: "xd-radio",
257
+ valueKey: "isShowBuy",
258
+ value: data.isShowBuy || "N",
259
+ list: [
260
+ { label: "展示", value: "Y" },
261
+ { label: "隐藏", value: "N" }
262
+ ],
263
+ groupKey: "content",
264
+ },
265
+ {
266
+ label: '购买新卡文案:',
267
+ ele: 'el-input',
268
+ type: 'text',
269
+ valueKey: 'buy_name',
270
+ groupKey:'content',
271
+ value: data.buy_name || '',
272
+ placeholder: '请输入购买新卡文案',
273
+ className: 'input80',
274
+ inline: false,
275
+ notice: '当未设置文案时,页面默认展示为"<span style="color:red">购买新卡</span>",建议不超过<span style="color:red">4</span>个汉字'
276
+ },
254
277
  {
255
278
  ele: 'title',
256
279
  label: '登录样式设置',
@@ -458,6 +481,18 @@ export default {
458
481
  },
459
482
  inline: false,
460
483
  },
484
+ {
485
+ label: '购买新卡地址:',
486
+ ele: 'xd-select-pages-path',
487
+ valueKey: 'buy_new_url',
488
+ groupKey:'advanced',
489
+ placeholder: '请选择购买新卡地址',
490
+ value: data.buy_new_url || null,
491
+ setting: {
492
+ router: XdBus.getParentApi('getPagesTree'),
493
+ },
494
+ inline: false,
495
+ },
461
496
  {
462
497
  label: '综合福利入口页:',
463
498
  ele: 'xd-select-pages-path',
@@ -132,7 +132,8 @@
132
132
  class="jfb-base-card__body-card"
133
133
  >
134
134
  <template v-if="cardLayout === '1'">
135
- <view
135
+ <view v-if="showList&&showList.length>0">
136
+ <view
136
137
  v-for="(item, index) in showList"
137
138
  :key="index"
138
139
  @click="handleBindLogin(item)"
@@ -166,14 +167,16 @@
166
167
  class="jfb-base-card__body-card-item-right-top"
167
168
  :style="{borderColor: item['is_login'] === 'Y'? mainSubBorderColor:'#eeeeee'}"
168
169
  >
169
- <view>
170
+ <view :class="{card_name:item.is_gift === 'Y'}">
171
+ <view :style="{backgroundColor: mainColor}" v-if="item.is_gift === 'Y'" class="is-gift">赠</view>
170
172
  <xd-font-icon
173
+ v-else
171
174
  icon="iconkaquan"
172
175
  size="38"
173
176
  :style="{marginRight: '18rpx'}"
174
177
  :color="mainColor"
175
178
  ></xd-font-icon>
176
- <view>{{ item.card_type_name }}</view>
179
+ <view class="card_name_text">{{ item.card_type_name }}</view>
177
180
  </view>
178
181
  <view>
179
182
  <view>{{ item.card_number }}{{showIndex?(':' + index):''}}</view>
@@ -192,28 +195,49 @@
192
195
  </view>
193
196
  </view>
194
197
  </view>
198
+ </view>
199
+ <view v-else>
200
+ <view class="jfb-base-card__body-empty">
201
+ <view class="jfb-base-card__body-empty-wrap">
202
+ <image :src="emptyBg"></image>
203
+ <view style="display:flex;align-items: center;justify-content: center;">
204
+ 暂无票券 <view v-if="isShowBuy==='Y'" class="buy_new" @click="toBuyNew" :style="{color: mainColor}"><view>{{buy_name}}</view> <xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon></view>
205
+ </view>
206
+ </view>
207
+ </view>
208
+ </view>
195
209
  </template>
196
210
  <template v-else>
197
- <xd-card-v2
198
- :login-name="login_name"
199
- :logged-name="logged_name"
200
- :look-name="look_name"
201
- v-for="(item, index) in showList"
202
- :mainColor="mainColor"
203
- :key="index"
204
- :cardInfo="item"
205
- :tabIndex="tabIndex"
206
- :lookStyle="lookStyle"
207
- :login-style="loginStyle"
208
- @toDetail="toDetail(item)"
209
- @bindLogin="handleBindLogin(item)">
210
- </xd-card-v2>
211
+ <view v-if="showList&&showList.length>0">
212
+ <xd-card-v2
213
+ :login-name="login_name"
214
+ :logged-name="logged_name"
215
+ :look-name="look_name"
216
+ v-for="(item, index) in showList"
217
+ :mainColor="mainColor"
218
+ :key="index"
219
+ :cardInfo="item"
220
+ :tabIndex="tabIndex"
221
+ :lookStyle="lookStyle"
222
+ :login-style="loginStyle"
223
+ @toDetail="toDetail(item)"
224
+ @bindLogin="handleBindLogin(item)">
225
+ </xd-card-v2>
226
+ </view>
227
+ <view v-else>
228
+ <view class="jfb-base-card__body-empty">
229
+ <view class="jfb-base-card__body-empty-wrap">
230
+ <image :src="emptyBg"></image>
231
+ <view style="display:flex;align-items: center;justify-content: center;">
232
+ 暂无票券 <view v-if="isShowBuy==='Y'" class="buy_new" @click="toBuyNew" :style="{color: mainColor}"><view>{{buy_name}}</view> <xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon></view>
233
+ </view>
234
+ </view>
235
+ </view>
236
+ </view>
211
237
  </template>
212
238
  </view>
213
239
  </template>
214
- <view v-if="showDisabled==='Y'" @click="handleToDisabled" class="jfb-base-card__body-disabled">
215
- 已失效票券>>>
216
- </view>
240
+ <view v-if="showDisabled==='Y'" @click="handleToDisabled" class="jfb-base-card__body-disabled">已失效票券>>></view>
217
241
  </view>
218
242
  <view class="jfb-base-card__body-dialog" v-if="dialogEvent">
219
243
  <view class="jfb-base-card__body-dialog-content">
@@ -249,6 +273,7 @@ import openDebuggerMixins from "@/mixins/openDebuggerMixins";
249
273
  import { mapState, mapActions } from "vuex";
250
274
  import { getContainerPropsValue, isWechat,isQrCode } from "@/utils/xd.base";
251
275
  import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
276
+ import colorCardMixins from "@/mixins/colorCardMixins";
252
277
  import { Base64 } from "js-base64";
253
278
  const Color = require("color");
254
279
 
@@ -261,7 +286,7 @@ export default {
261
286
  XdCardV2,
262
287
  XdCardV2Skelton
263
288
  },
264
- mixins: [componentsMixins, extsMixins, JfbBaseCardMixin,openDebuggerMixins],
289
+ mixins: [componentsMixins, extsMixins, JfbBaseCardMixin,openDebuggerMixins,colorCardMixins],
265
290
  computed: {
266
291
  ...mapState({
267
292
  jwxSDK: (state) => state.jwxSDK,
@@ -289,7 +314,11 @@ export default {
289
314
  if(this.look_text_radius) style['borderRadius'] = this.look_text_radius + 'rpx';
290
315
  if(this.cardLayout === '2') return style;
291
316
  return this.styleObjectToString(style);
292
- }
317
+ },
318
+
319
+ emptyBg() {
320
+ return this.getNoData();
321
+ },
293
322
  },
294
323
  watch: {
295
324
  tabIndex(newVal) {
@@ -369,6 +398,9 @@ export default {
369
398
  dialogEvent: false,
370
399
  // is_show_change: false,
371
400
  popup: "https://img.zcool.cn/community/01784158abe781a801219c77e981ee.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100",
401
+ buy_name: '',
402
+ isShowBuy: 'N',
403
+ buy_new_url: ''
372
404
  };
373
405
  },
374
406
  created() {
@@ -424,6 +456,10 @@ export default {
424
456
  this.look_text_color = getContainerPropsValue(container, 'content.look_text_color', this.cardLayout==='2'? '#333':'#fff');
425
457
  this.look_text_bg_color = getContainerPropsValue(container, 'content.look_text_bg_color', this.cardLayout === '2'? '' :this.mainColor);
426
458
  this.look_text_radius = getContainerPropsValue(container, 'content.look_text_radius', '20');
459
+
460
+ this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
461
+ this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
462
+ this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
427
463
  },
428
464
 
429
465
  handleToLink(path) {
@@ -632,6 +668,7 @@ export default {
632
668
  })
633
669
  console.warn(`changeList:${this.changeList.length}`)
634
670
  this.showList = this.getPageCardContent(this.cardList);
671
+ // this.showList = []
635
672
  if(this.hasContent) this.offsetIndex++;
636
673
  this.$xdHideLoading();
637
674
  })
@@ -643,6 +680,12 @@ export default {
643
680
  return newData.slice(0,this.pagesLimit);
644
681
  },
645
682
 
683
+ toBuyNew() {
684
+ this.$xdUniHelper.navigateTo({
685
+ url: `${this.buy_new_url}`,
686
+ });
687
+ },
688
+
646
689
  onJfbShow(options) {
647
690
  this.offsetIndex = 0;
648
691
  this.hasContent = true;
@@ -698,6 +741,60 @@ export default {
698
741
  padding: unit(55, rpx) unit(35, rpx);
699
742
  color: #333;
700
743
 
744
+ &-empty {
745
+ color: #888;
746
+ font-size: unit(24,rpx);
747
+ height: 60vh;
748
+ display: flex;
749
+ align-items: center;
750
+ justify-content: center;
751
+
752
+ .buy_new {
753
+ display: flex;
754
+ margin-left: 8rpx;
755
+ & > view:first-child {
756
+ margin-right: 8rpx;
757
+ }
758
+ }
759
+
760
+ &-wrap {
761
+ display: flex;
762
+ flex-direction: column;
763
+
764
+ & > image {
765
+ width: unit(460,rpx);
766
+ height: unit(400,rpx);
767
+ }
768
+ }
769
+
770
+ & > view {
771
+ text-align: center;
772
+ }
773
+ }
774
+
775
+ & .card_name {
776
+ display: flex;
777
+ justify-content: flex-start;
778
+ align-items: flex-start;
779
+
780
+ & .is-gift {
781
+ margin-top: 5rpx;
782
+ font-size: 18rpx;
783
+ padding: 2rpx 10rpx;
784
+ border-radius: 8rpx;
785
+ line-height:26rpx;
786
+ height: 26rpx;
787
+ color: #fff;
788
+ margin-right: 18rpx;
789
+ }
790
+
791
+ & .card_name_text {
792
+ //line-height: 36rpx;
793
+ }
794
+ }
795
+
796
+
797
+
701
798
  &-dialog {
702
799
  position: fixed;
703
800
  top: 0;
@@ -899,6 +996,8 @@ export default {
899
996
  color: #b8b7be;
900
997
  margin-bottom: unit(30, rpx);
901
998
  }
999
+
1000
+
902
1001
  }
903
1002
  }
904
1003
  </style>
@@ -13,7 +13,8 @@ module.exports = {
13
13
  "is_login":'Y',
14
14
  "main_product_name": "",
15
15
  "other_card_point": 0,
16
- "is_exchange": "N"
16
+ "is_exchange": "N",
17
+ "is_gift":"Y"
17
18
  }, {
18
19
  "card_number": "101001000005193",
19
20
  "card_point": 99963600,
@@ -23,7 +24,8 @@ module.exports = {
23
24
  "is_valid": "Y",
24
25
  "main_product_name": "",
25
26
  "other_card_point": 0,
26
- "is_exchange": "N"
27
+ "is_exchange": "N",
28
+ "is_gift":"N"
27
29
  }, {
28
30
  "card_number": "101001000005184",
29
31
  "card_point": 100000000,
@@ -33,7 +35,8 @@ module.exports = {
33
35
  "is_valid": "Y",
34
36
  "main_product_name": "",
35
37
  "other_card_point": 0,
36
- "is_exchange": "N"
38
+ "is_exchange": "N",
39
+ "is_gift":"Y"
37
40
  }, {
38
41
  "card_number": "101001000005185",
39
42
  "card_point": 99631000,
@@ -63,6 +66,7 @@ module.exports = {
63
66
  "is_valid": "Y",
64
67
  "main_product_name": "",
65
68
  "other_card_point": 0,
69
+ "is_gift":"Y",
66
70
  "is_exchange": "Y"
67
71
  }, {
68
72
  "card_number": "101001000006989",
@@ -83,7 +87,8 @@ module.exports = {
83
87
  "is_valid": "Y",
84
88
  "main_product_name": "",
85
89
  "other_card_point": 0,
86
- "is_exchange": "Y"
90
+ "is_exchange": "Y",
91
+ "is_gift":"Y"
87
92
  }, {
88
93
  "card_number": "101001000005479",
89
94
  "card_point": 10000000,
@@ -10,9 +10,7 @@
10
10
  :class="{ editx: isEditx && active }"
11
11
  v-if="isEditx && active"
12
12
  >
13
- <view class="jfb-base-card-disabled__edit-icon" @click="delEdit"
14
- >删除</view
15
- >
13
+ <view class="jfb-base-card-disabled__edit-icon" @click="delEdit">删除</view>
16
14
  </view>
17
15
  <!-- #endif -->
18
16
  <view class="jfb-base-card-disabled__body">
@@ -56,14 +54,16 @@
56
54
  </view>
57
55
  <view class="jfb-base-card-disabled__body-card-item-right">
58
56
  <view class="jfb-base-card-disabled__body-card-item-right-top">
59
- <view>
57
+ <view :class="{card_name:item.is_gift === 'Y'}">
58
+ <view :style="{backgroundColor: '#b8b7be'}" v-if="item.is_gift === 'Y'" class="is-gift">赠</view>
60
59
  <xd-font-icon
60
+ v-else
61
61
  icon="iconkaquan"
62
62
  size="38"
63
63
  :style="{marginRight: '18rpx'}"
64
64
  color="#B8B7BE"
65
65
  ></xd-font-icon>
66
- <view style="color: #b8b7be">{{ item.card_type_name }}</view>
66
+ <view class="card_name_text" style="color: #b8b7be">{{ item.card_type_name }}</view>
67
67
  </view>
68
68
  <view>
69
69
  <view>{{ item.card_number }}</view>
@@ -211,6 +211,27 @@ export default {
211
211
  padding: unit(55, rpx) unit(35, rpx);
212
212
  color: #333;
213
213
 
214
+ & .card_name {
215
+ display: flex;
216
+ justify-content: flex-start;
217
+ align-items: flex-start;
218
+
219
+ & .is-gift {
220
+ margin-top: 5rpx;
221
+ font-size: 18rpx;
222
+ padding: 2rpx 10rpx;
223
+ border-radius: 8rpx;
224
+ line-height:26rpx;
225
+ height: 26rpx;
226
+ color: #fff;
227
+ margin-right: 18rpx;
228
+ }
229
+
230
+ & .card_name_text {
231
+ //line-height: 36rpx;
232
+ }
233
+ }
234
+
214
235
  &-card {
215
236
  border: 1px dashed rgba(0, 0, 0, 0);
216
237
  box-sizing: border-box;
@@ -100,7 +100,8 @@ module.exports = {
100
100
  "main_business_code_name": "",
101
101
  "other_card_point": 0,
102
102
  "is_exchange": "N",
103
- "card_point_type": 1
103
+ "card_point_type": 1,
104
+ "is_gift": 'Y',
104
105
  }, {
105
106
  "card_number": "261001000002643",
106
107
  "card_point": 0,
@@ -111,7 +112,8 @@ module.exports = {
111
112
  "main_business_code_name": "",
112
113
  "other_card_point": 0,
113
114
  "is_exchange": "N",
114
- "card_point_type": 1
115
+ "card_point_type": 1,
116
+ "is_gift": 'Y',
115
117
  }, {
116
118
  "card_number": "261001000002641",
117
119
  "card_point": 0,
@@ -34,7 +34,10 @@
34
34
  >
35
35
  <view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
36
36
  <view class="card-list__title">
37
- <view>{{item['card_type_name']}}</view>
37
+ <view>
38
+ <view :style="{backgroundColor: '#b8b7be'}" class="gifted" v-if="item['is_gift'] === 'Y'">赠</view>
39
+ <view class="__title-name">{{item['card_type_name']}}</view>
40
+ </view>
38
41
  </view>
39
42
  <div class="card-list__content">
40
43
  <view>
@@ -438,6 +441,9 @@ export default {
438
441
  align-items: center;
439
442
 
440
443
  & > view {
444
+ display: flex;
445
+ justify-content: flex-start;
446
+ align-items: center;
441
447
  padding: 0 unit(80, rpx);
442
448
  font-size: unit(24, rpx);
443
449
  line-height: unit(56, rpx);
@@ -446,6 +452,18 @@ export default {
446
452
  border-radius: 0 0 unit(16, rpx) 0;
447
453
  }
448
454
 
455
+
456
+ & view.gifted {
457
+ margin-top: -2rpx;
458
+ font-size: 18rpx;
459
+ padding: 2rpx 10rpx;
460
+ border-radius: 8rpx;
461
+ line-height:26rpx;
462
+ height: 26rpx;
463
+ color: #fff;
464
+ margin-right: 18rpx;
465
+ }
466
+
449
467
  }
450
468
 
451
469
  &__content {
@@ -25,6 +25,7 @@ module.exports = {
25
25
  "is_valid": "N",
26
26
  "main_business_code_name": "",
27
27
  "other_card_point": 0,
28
+ "is_gift":'Y',
28
29
  "is_exchange": "N",
29
30
  "card_point_type": 1,
30
31
  "business_codes": ["health"]
@@ -40,6 +41,7 @@ module.exports = {
40
41
  "other_card_point": 0,
41
42
  "is_exchange": "N",
42
43
  "card_point_type": 1,
44
+ "is_gift":'Y',
43
45
  "business_codes": ["movie", "market", "cake", "book", "video", "play", "health", "small", "travel", "supermarket", "food"]
44
46
  }, {
45
47
  "card_number": "101001000008421",
@@ -298,6 +298,29 @@ export default {
298
298
  {label: "隐藏", value: "2"},
299
299
  ]
300
300
  },
301
+ {
302
+ label: "无票券时是否展示购买新卡入口:",
303
+ ele: "xd-radio",
304
+ valueKey: "isShowBuy",
305
+ value: data.isShowBuy || "N",
306
+ list: [
307
+ { label: "展示", value: "Y" },
308
+ { label: "隐藏", value: "N" }
309
+ ],
310
+ groupKey: "content",
311
+ },
312
+ {
313
+ label: '购买新卡文案:',
314
+ ele: 'el-input',
315
+ type: 'text',
316
+ valueKey: 'buy_name',
317
+ groupKey:'content',
318
+ value: data.buy_name || '',
319
+ placeholder: '请输入购买新卡文案',
320
+ className: 'input80',
321
+ inline: false,
322
+ notice: '当未设置文案时,页面默认展示为"<span style="color:red">购买新卡</span>",建议不超过<span style="color:red">4</span>个汉字'
323
+ },
301
324
  {
302
325
  label: "票券背景颜色:",
303
326
  ele: "xd-color",
@@ -386,6 +409,18 @@ export default {
386
409
  },
387
410
  inline: false,
388
411
  },
412
+ {
413
+ label: '购买新卡地址:',
414
+ ele: 'xd-select-pages-path',
415
+ valueKey: 'buy_new_url',
416
+ groupKey:'advanced',
417
+ placeholder: '请选择购买新卡地址',
418
+ value: data.buy_new_url || null,
419
+ setting: {
420
+ router: XdBus.getParentApi('getPagesTree'),
421
+ },
422
+ inline: false,
423
+ },
389
424
  {
390
425
  ele: "title",
391
426
  label: "我的优惠券样式配置",