jufubao-base 1.0.232 → 1.0.233-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.232",
3
+ "version": "1.0.233-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -274,6 +274,17 @@ export default {
274
274
  inline: false,
275
275
  notice: '当未设置文案时,页面默认展示为"<span style="color:red">购买新卡</span>",建议不超过<span style="color:red">4</span>个汉字'
276
276
  },
277
+ {
278
+ label: "优惠券是否单独展示:",
279
+ ele: 'xd-radio',
280
+ valueKey: 'show_coupon_tab',
281
+ groupKey: 'content',
282
+ value: data.show_coupon_tab || 'N',
283
+ list: [
284
+ { label: "是", value: "Y" },
285
+ { label: "否", value: "N" }
286
+ ],
287
+ },
277
288
  {
278
289
  ele: 'title',
279
290
  label: '登录样式设置',
@@ -16,7 +16,11 @@
16
16
  <view class="jfb-base-card__edit-icon" @click="delEdit">删除</view>
17
17
  </view>
18
18
  <!-- #endif -->
19
- <view :style="{paddingTop: bindCard!=='1'?'35rpx':'55rpx'}" class="jfb-base-card__body">
19
+ <view :style="{
20
+ paddingTop: bindCard!=='1'?'35rpx':'55rpx',
21
+ '--main-color': mainColor,
22
+ '--main-alpha-color': mainSubBorderColor
23
+ }" class="jfb-base-card__body">
20
24
  <view v-if="bindCard==='1'" class="jfb-base-card__body-cut">
21
25
  <template v-if="isQrCode">
22
26
  <view
@@ -101,22 +105,25 @@
101
105
  </view>
102
106
  <!--notice end-->
103
107
  <view class="jfb-base-card__body-tab">
104
- <view
105
- @click="tabIndex = 1"
106
- :style="{
107
- color: tabIndex === 1 ? '#fff' : '#B8B7BE',
108
- background: tabIndex === 1 ? mainColor : '#fff',
109
- }"
110
- >已绑定票券</view>
111
- <view
112
- v-if="changeList.length > 0"
113
- @click="tabIndex = 2"
114
- :style="{
115
- color: tabIndex === 2 ? '#fff' : '#B8B7BE',
116
- background: tabIndex === 2 ? mainColor : '#fff',
117
- }"
118
- >可转换票券</view>
119
- <view class="debuger" v-if="cardList.length === 0" @click="openDebugger(true)" style="opacity: 0">debuger</view>
108
+ <view v-if="show_coupon_tab==='Y'" class="show_type_tab">
109
+ <view class="type_item" :class="{active: show_type==='normal'}" @click="switchShowType('normal')">已绑定票券</view>
110
+ <view class="type_item" :class="{active: show_type==='coupon'}" @click="switchShowType('coupon')">优惠券</view>
111
+ </view>
112
+ <view class="tab_index_wrap">
113
+ <view
114
+ @click="tabIndex = 1"
115
+ class="tab_item"
116
+ :class="{sub: show_coupon_tab==='Y', active: tabIndex===1}"
117
+ >{{ show_coupon_tab==='Y' ? '可用票券' : '已绑定票券' }}</view>
118
+ <view
119
+ v-if="changeList.length > 0"
120
+ @click="tabIndex = 2"
121
+ class="tab_item"
122
+ :class="{sub: show_coupon_tab==='Y', active: tabIndex===2}"
123
+ >可转换票券</view>
124
+ <view class="debuger" v-if="cardList.length === 0" @click="openDebugger(true)" style="opacity: 0">debuger</view>
125
+ </view>
126
+
120
127
  </view>
121
128
  <view
122
129
  class="jfb-base-card__body-tips"
@@ -343,6 +350,7 @@ export default {
343
350
  },
344
351
  data() {
345
352
  return {
353
+ show_type: "normal", //normal正常票券;coupon 满减券
346
354
  options: {},
347
355
  inCallbackUrlOrg:'',//是否带有回调地址
348
356
  mainBorderColor:'',
@@ -396,6 +404,7 @@ export default {
396
404
  showDisabled: 'Y',
397
405
 
398
406
  dialogEvent: false,
407
+ show_coupon_tab: "N",
399
408
  // is_show_change: false,
400
409
  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
410
  buy_name: '',
@@ -460,6 +469,7 @@ export default {
460
469
  this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
461
470
  this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
462
471
  this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
472
+ this.show_coupon_tab = getContainerPropsValue(container, "content.show_coupon_tab", "N");
463
473
  },
464
474
 
465
475
  handleToLink(path) {
@@ -468,7 +478,10 @@ export default {
468
478
  url: path,
469
479
  });
470
480
  },
471
-
481
+ switchShowType(show_type) {
482
+ this.show_type = show_type;
483
+ this.getCardList(this.options);
484
+ },
472
485
  getContent() {
473
486
  jfbRootExec("getListBaseNewsContent", {
474
487
  vm: this,
@@ -631,6 +644,9 @@ export default {
631
644
  if(options['jfb_business_code']) {
632
645
  params['card_business_code'] = options['jfb_business_code'];
633
646
  }
647
+ if(this.show_coupon_tab === 'Y'){
648
+ params.show_type = this.show_type;
649
+ }
634
650
  this.$xdShowLoading({});
635
651
  jfbRootExec("getListCardBind", {
636
652
  vm: this,
@@ -741,6 +757,30 @@ export default {
741
757
  padding: unit(55, rpx) unit(35, rpx);
742
758
  color: #333;
743
759
 
760
+ .show_type_tab{
761
+ display: flex;
762
+ align-items: center;
763
+ margin-bottom: 24rpx;
764
+ .type_item{
765
+ padding: unit(5, rpx) unit(22, rpx);
766
+ text-align: center;
767
+ line-height: unit(60, rpx);
768
+ border-radius: unit(60, rpx);
769
+ color: #B8B7BE;
770
+ & + .type_item{
771
+ margin-left: unit(30, rpx);
772
+ }
773
+ &.active{
774
+ background-color: var(--main-color);
775
+ color: #FFFFFF;
776
+ }
777
+ }
778
+ }
779
+ .tab_index_wrap{
780
+ display: flex;
781
+ align-items: center;
782
+ }
783
+
744
784
  &-empty {
745
785
  color: #888;
746
786
  font-size: unit(24,rpx);
@@ -889,12 +929,13 @@ export default {
889
929
 
890
930
  &-tab {
891
931
  display: flex;
892
- align-items: center;
932
+ flex-direction: column;
933
+ align-items: flex-start;
893
934
  font-size: unit(28, rpx);
894
935
  margin-bottom: unit(46, rpx);
895
936
  margin-top: unit(46, rpx);
896
937
 
897
- & > view {
938
+ .tab_item {
898
939
  // width: unit(214, rpx);
899
940
  // height: unit(60, rpx);
900
941
  padding: unit(5, rpx) unit(22, rpx);
@@ -902,6 +943,22 @@ export default {
902
943
  line-height: unit(60, rpx);
903
944
  margin-right: unit(30, rpx);
904
945
  border-radius: unit(60, rpx);
946
+ color: #B8B7BE;
947
+ background: #FFFFFF;
948
+ &.active{
949
+ color: #FFFFFF;
950
+ background-color: var(--main-color);
951
+ }
952
+ &.sub{
953
+ border-radius: unit(8, rpx);
954
+ line-height: unit(40, rpx);
955
+ color: #FFFFFF;
956
+ background-color: #B8B7BE;
957
+ &.active{
958
+ color: var(--main-color);
959
+ background-color: var(--main-alpha-color);
960
+ }
961
+ }
905
962
  }
906
963
  }
907
964
 
@@ -39,4 +39,17 @@ module.exports = [
39
39
  },
40
40
  disabled: true,
41
41
  },
42
+ {
43
+ mapFnName: "generateQrCode",
44
+ title: "生成二维码",
45
+ path: "/common/v1/image/qrcode",
46
+ isRule: false,
47
+ params: {
48
+ code_content: ['二维码内容', 'String', true],
49
+ size: ['二维码大小', 'Number', true],
50
+ margin: ['二维码边距', 'Number', true]
51
+ },
52
+ isConsole: true,
53
+ disabled: true
54
+ }
42
55
  ];
@@ -38,7 +38,7 @@ export default {
38
38
  ]
39
39
  },
40
40
  {
41
- label: '分享图片:', //label
41
+ label: '分享图片(适用于小程序):', //label
42
42
  ele: 'xd-upload', //package 名称
43
43
  valueKey: 'shareImage', //form[valueKey]
44
44
  value: data.shareImage || null, //v-model
@@ -60,6 +60,29 @@ export default {
60
60
  { required: true, message: '请上传图片', trigger: ['blur', 'change'] },
61
61
  ]
62
62
  },
63
+ {
64
+ label: '分享图片(适用于下载保存):', //label
65
+ ele: 'xd-upload', //package 名称
66
+ valueKey: 'shareDownloadImage', //form[valueKey]
67
+ value: data.shareDownloadImage || null, //v-model
68
+ defaultValue: data.shareDownloadImage || null, //默认图片对象
69
+ groupKey: "style",
70
+ slot: true, //按钮是否使用slot
71
+ oneWidth: 200, //单个图片显示宽度
72
+ oneHeight: 200, //单个图片显示高度
73
+ elinputClassName: 'input40',
74
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
75
+ type: ['jpg', 'png', 'jpeg'],
76
+ styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
77
+ uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
78
+ size: 5, //5M
79
+ action: 'aliyun',
80
+ sort: true, //当上传图片列表时候,是否启用排序
81
+ maxlen: 100, //当上传图片列表时候,最大数量数量
82
+ rules: [
83
+ { required: true, message: '请上传图片', trigger: ['blur', 'change'] },
84
+ ]
85
+ },
63
86
  ].filter(i=>i)
64
87
  },
65
88
  advanced: [],
@@ -83,6 +83,7 @@
83
83
  rows="10"
84
84
  ></textarea>
85
85
  <xd-button @click="handleGive" type="primary">确认赠送</xd-button>
86
+ <xd-button type="primary" @click="handleShare">test分享</xd-button>
86
87
  </view>
87
88
  <view
88
89
  class="jfb-base-card-give__body-footer"
@@ -149,6 +150,12 @@
149
150
  >
150
151
  </view>
151
152
  </xd-dailog>
153
+ <view class="share_card_dialog" v-show="showShareCard">
154
+ <view class="share_modal" @click="showShareCard=false"></view>
155
+ <view class="share_content">
156
+ <canvas canvas-id="shareCanvas" id="shareCanvas" style="width: 654rpx; height: 968rpx;" ></canvas>
157
+ </view>
158
+ </view>
152
159
  </view>
153
160
  </view>
154
161
  </template>
@@ -183,13 +190,20 @@ export default {
183
190
  get_url: null,
184
191
  back_url: null,
185
192
  shareImage: "",
193
+ shareDownloadImage: "",
186
194
  isPreview: false,
187
195
  errMsg: "",
188
196
  resultDialog: false,
197
+ showShareDialog: true,
198
+ imageCache: {},
199
+ showShareCard: false,
189
200
  };
190
201
  },
191
202
  computed: {
192
203
  ...mapState(["shareInfo"]),
204
+ ...mapState({
205
+ brandInfo: state => state.brandInfo
206
+ }),
193
207
  prod_bottom() {
194
208
  return this.fixedStyle({ height: 0, zIndex: 111 });
195
209
  },
@@ -210,6 +224,21 @@ export default {
210
224
  async onJfbLoad(options) {
211
225
  this.card_number = options.card_number;
212
226
  await this.getDetail();
227
+ console.log("rpxNum", this.$rpxNum)
228
+ setTimeout(()=>{
229
+ this.toSetShareImg('123123123123123');
230
+ },1000)
231
+ },
232
+ async toSetShareImg(url){
233
+ let ctx = uni.createCanvasContext("shareCanvas");
234
+ console.log(ctx);
235
+ ctx.save();
236
+ ctx.drawImage(this.shareDownloadImage, 0, 0, 654*this.$rpxNum, 968*this.$rpxNum);
237
+ ctx.restore();
238
+
239
+ let qrImg = this.brandInfo['api_host'] + `/common/v1/image/qrcode?code_content=${123123123123123}`
240
+ ctx.drawImage(qrImg, 200*this.$rpxNum, 500*this.$rpxNum, 250*this.$rpxNum, 250*this.$rpxNum);
241
+ ctx.draw();
213
242
  },
214
243
  getDetail() {
215
244
  this.$xdShowLoading({});
@@ -266,6 +295,7 @@ export default {
266
295
  "content.shareImage",
267
296
  { url: "" }
268
297
  ).url;
298
+ this.shareDownloadImage = getServiceUrl(getContainerPropsValue(container, 'content.shareDownloadImage', { url: '' }).url);
269
299
  },
270
300
  handleCancel() {
271
301
  this.resultDialog = false;
@@ -332,7 +362,8 @@ export default {
332
362
  handleShare() {
333
363
  //#ifdef H5
334
364
  let share = `${document.location.origin}/${this.projectAttr.deploy_dir}${this.get_url}?transfer_auth_code=${this.info.transfer_record.transfer_auth_code}`;
335
- this.copy(share);
365
+ this.toSetShareImg(share)
366
+ this.showShareCard = true;
336
367
  // #endif
337
368
  // #ifdef MP-WEIXIN
338
369
  this.setShareInfo({
@@ -361,6 +392,24 @@ export default {
361
392
  &__body {
362
393
  padding: 28rpx;
363
394
  color: #333;
395
+ .share_card_dialog{
396
+ .share_modal{
397
+ width: 100vh;
398
+ height: 100vh;
399
+ position: fixed;
400
+ top: 0;
401
+ left: 0;
402
+ background: rgba(0, 0, 0, 0.5);
403
+ }
404
+ .share_content{
405
+ width: 654rpx;
406
+ height: 968rpx;
407
+ position: fixed;
408
+ top: 50%;
409
+ left: 50%;
410
+ transform: translate(-50%, -50%);
411
+ }
412
+ }
364
413
  .qrcode_card {
365
414
  position: relative;
366
415
  border-radius: unit(16, rpx);
@@ -67,6 +67,17 @@ export default {
67
67
  inline: false,
68
68
  notice: '当未设置文案时,页面默认展示为"<span style="color:red">购买新卡</span>",建议不超过<span style="color:red">4</span>个汉字'
69
69
  },
70
+ {
71
+ label: "优惠券是否单独展示:",
72
+ ele: 'xd-radio',
73
+ valueKey: 'show_coupon_tab',
74
+ groupKey: 'content',
75
+ value: data.show_coupon_tab || 'N',
76
+ list: [
77
+ { label: "是", value: "Y" },
78
+ { label: "否", value: "N" }
79
+ ],
80
+ },
70
81
  {
71
82
  label: '填充设置:',
72
83
  ele: 'xd-margin-padding',
@@ -13,7 +13,9 @@
13
13
  <view class="jfb-base-card-v2__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view class="jfb-base-card-v2__body">
16
+ <view class="jfb-base-card-v2__body" :style="{
17
+ '--main-color': mainColor,
18
+ }">
17
19
  <view v-if="loadingCardList">
18
20
  <view
19
21
  class="jfb-base-card__body-card skeleton-card"
@@ -49,6 +51,12 @@
49
51
  class="jfb-base-card__body-card"
50
52
  :style="{padding: marginUi}"
51
53
  >
54
+ <view class="card_filter">
55
+ <view v-if="show_coupon_tab==='Y'" class="show_type_tab">
56
+ <view class="type_item" :class="{active: show_type==='normal'}" @click="switchShowType('normal')">已绑定票券</view>
57
+ <view class="type_item" :class="{active: show_type==='coupon'}" @click="switchShowType('coupon')">优惠券</view>
58
+ </view>
59
+ </view>
52
60
  <view v-if="cardList&&cardList.length>0">
53
61
  <view
54
62
  v-for="(item, index) in cardList"
@@ -153,12 +161,15 @@
153
161
  ],
154
162
  data() {
155
163
  return {
164
+ options: {},
156
165
  cardList: [],
157
166
  inCallback: "",
158
167
  mainBorderColor:'',
159
168
  mainSubBorderColor:'',
169
+ show_type: "normal",
160
170
 
161
171
  //面板
172
+ show_coupon_tab: "N",
162
173
  cardInfoPath: "", //卡券详情
163
174
  cardBindPath: "",
164
175
  orderListPath: "",
@@ -205,6 +216,7 @@
205
216
  },
206
217
  methods: {
207
218
  onJfbLoad(options) {
219
+ this.options = options;
208
220
  let { inCallback } = options;
209
221
  if(!inCallback) this.$storage.remove("inCallback"); //作为入口
210
222
  else {
@@ -219,24 +231,7 @@
219
231
  }
220
232
  }
221
233
  this.inCallback = inCallback || this.settings.index;
222
-
223
-
224
- let params = {is_all: 'Y'};
225
- if (options['jfb_business_code']) {
226
- params['card_business_code'] = options['jfb_business_code'];
227
- }
228
-
229
- jfbRootExec("getListCardBind", {
230
- vm: this,
231
- data: params,
232
- }).then((res) => {
233
- this.loadingCardList = false;
234
- this.cardList = res.list.map((item) => {
235
- item['card_point'] = this.$xdUniHelper.divisionFloatNumber(item.card_point,100);
236
- item['other_card_point'] = this.$xdUniHelper.divisionFloatNumber(item.other_card_point,100);
237
- return item;
238
- }).filter((item) => item["is_valid"] === "Y");
239
- })
234
+ this.getList();
240
235
  },
241
236
 
242
237
  /**
@@ -255,9 +250,33 @@
255
250
  this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
256
251
  this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
257
252
  this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
258
-
253
+ this.show_coupon_tab = getContainerPropsValue(container, "content.show_coupon_tab", "N");
259
254
  },
255
+ getList(){
256
+ let options = this.options;
257
+ let params = {is_all: 'Y'};
258
+ if (options['jfb_business_code']) {
259
+ params['card_business_code'] = options['jfb_business_code'];
260
+ }
261
+ if(this.show_coupon_tab === 'Y'){
262
+ params.show_type = this.show_type;
263
+ }
260
264
 
265
+ jfbRootExec("getListCardBind", {
266
+ vm: this,
267
+ data: params,
268
+ }).then((res) => {
269
+ this.loadingCardList = false;
270
+ this.cardList = res.list.map((item) => {
271
+ item['card_point'] = this.$xdUniHelper.divisionFloatNumber(item.card_point,100);
272
+ item['other_card_point'] = this.$xdUniHelper.divisionFloatNumber(item.other_card_point,100);
273
+ return item;
274
+ }).filter((item) => item["is_valid"] === "Y");
275
+ })
276
+ },
277
+ switchShowType(type){
278
+ this.show_type = type;
279
+ },
261
280
  handleBindLogin(item){
262
281
  this.$xdShowLoading({});
263
282
  jfbRootExec("loginCardBind", {
@@ -324,6 +343,25 @@
324
343
 
325
344
  .jfb-base-card-v2 {
326
345
  &__body{
346
+ .show_type_tab{
347
+ display: flex;
348
+ align-items: center;
349
+ margin-bottom: 24rpx;
350
+ .type_item{
351
+ padding: unit(5, rpx) unit(22, rpx);
352
+ text-align: center;
353
+ line-height: unit(60, rpx);
354
+ border-radius: unit(60, rpx);
355
+ color: #B8B7BE;
356
+ & + .type_item{
357
+ margin-left: unit(30, rpx);
358
+ }
359
+ &.active{
360
+ background-color: var(--main-color);
361
+ color: #FFFFFF;
362
+ }
363
+ }
364
+ }
327
365
  .bottom_fix{
328
366
  position: fixed;
329
367
  right: 0;
@@ -54,6 +54,17 @@ export default {
54
54
  inline: false,
55
55
  notice: '当未设置文案时,页面默认展示为"<span style="color:red">购买新卡</span>",建议不超过<span style="color:red">4</span>个汉字'
56
56
  },
57
+ {
58
+ label: "优惠券是否单独展示:",
59
+ ele: 'xd-radio',
60
+ valueKey: 'show_coupon_tab',
61
+ groupKey: 'content',
62
+ value: data.show_coupon_tab || 'N',
63
+ list: [
64
+ { label: "是", value: "Y" },
65
+ { label: "否", value: "N" }
66
+ ],
67
+ },
57
68
  {
58
69
  label: '绑定新票券地址:',
59
70
  ele: 'xd-select-pages-path',
@@ -13,12 +13,18 @@
13
13
  <view class="jfb-base-card-v3__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view class="jfb-base-card-v3__body">
16
+ <view class="jfb-base-card-v3__body" :style="{
17
+ '--main-color': mainColor,
18
+ }">
17
19
  <view class="v3_title">选择登入票券</view>
18
20
  <view v-if="loadingCardList">
19
21
  <xd-card-v2-skeleton v-for="i in 3" :key="i"></xd-card-v2-skeleton>
20
22
  </view>
21
23
  <template v-else>
24
+ <view v-if="show_coupon_tab==='Y'" class="show_type_tab">
25
+ <view class="type_item" :class="{active: show_type==='normal'}" @click="switchShowType('normal')">已绑定票券</view>
26
+ <view class="type_item" :class="{active: show_type==='coupon'}" @click="switchShowType('coupon')">优惠券</view>
27
+ </view>
22
28
  <view class="card_list" v-if="cardList.length">
23
29
  <xd-card-v2
24
30
  v-for="(item, index) in cardList"
@@ -70,6 +76,9 @@
70
76
  ],
71
77
  data() {
72
78
  return {
79
+ options: {},
80
+ show_coupon_tab: "N",
81
+ show_type: "normal",
73
82
  cardList: [],
74
83
  inCallback: "",
75
84
  tabIndex: 1,
@@ -103,6 +112,7 @@
103
112
  },
104
113
  methods: {
105
114
  onJfbLoad(options) {
115
+ this.options = options;
106
116
  let { inCallback } = options;
107
117
  if(!inCallback) this.$storage.remove("inCallback"); //作为入口
108
118
  else {
@@ -118,10 +128,32 @@
118
128
  }
119
129
  this.inCallback = inCallback || this.settings.index;
120
130
 
131
+ this.getList();
132
+ },
133
+ /**
134
+ * @description 监听事件变化
135
+ * @param container {object} 业务组件对象自己
136
+ */
137
+ init(container) {
138
+ this.cardBindPath = getContainerPropsValue(container, "content.cardBindPath", {value: ""}).value;
139
+ this.changeUrl = getContainerPropsValue(container, "content.changeUrl", {value: ""}).value;
140
+ this.detailUrl = getContainerPropsValue(container, "content.detailUrl", {value: ""}).value;
141
+ this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
142
+ this.logged_name = getContainerPropsValue(container, "content.logged_name", "已登录");
143
+ this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
144
+ this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
145
+ this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
146
+ this.show_coupon_tab = getContainerPropsValue(container, "content.show_coupon_tab", "N");
147
+ },
148
+ getList(){
149
+ let options = this.options;
121
150
  let params = {is_all: 'Y'};
122
151
  if (options['jfb_business_code']) {
123
152
  params['card_business_code'] = options['jfb_business_code'];
124
153
  }
154
+ if(this.show_coupon_tab === 'Y'){
155
+ params.show_type = this.show_type;
156
+ }
125
157
 
126
158
  jfbRootExec("getListCardBind", {
127
159
  vm: this,
@@ -135,19 +167,8 @@
135
167
  }).filter((item) => item["is_valid"] === "Y");
136
168
  });
137
169
  },
138
- /**
139
- * @description 监听事件变化
140
- * @param container {object} 业务组件对象自己
141
- */
142
- init(container) {
143
- this.cardBindPath = getContainerPropsValue(container, "content.cardBindPath", {value: ""}).value;
144
- this.changeUrl = getContainerPropsValue(container, "content.changeUrl", {value: ""}).value;
145
- this.detailUrl = getContainerPropsValue(container, "content.detailUrl", {value: ""}).value;
146
- this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
147
- this.logged_name = getContainerPropsValue(container, "content.logged_name", "已登录");
148
- this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
149
- this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
150
- this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
170
+ switchShowType(type){
171
+ this.show_type = type;
151
172
  },
152
173
  toBindCard(){
153
174
  let path = this.getUrlCallback(this.cardBindPath)
@@ -231,6 +252,25 @@
231
252
  .jfb-base-card-v3 {
232
253
  &__body{
233
254
  padding: 0 24rpx;
255
+ .show_type_tab{
256
+ display: flex;
257
+ align-items: center;
258
+ margin-bottom: 24rpx;
259
+ .type_item{
260
+ padding: unit(5, rpx) unit(22, rpx);
261
+ text-align: center;
262
+ line-height: unit(60, rpx);
263
+ border-radius: unit(60, rpx);
264
+ color: #B8B7BE;
265
+ & + .type_item{
266
+ margin-left: unit(30, rpx);
267
+ }
268
+ &.active{
269
+ background-color: var(--main-color);
270
+ color: #FFFFFF;
271
+ }
272
+ }
273
+ }
234
274
  .v3_title{
235
275
  padding: 16rpx 40rpx;
236
276
  border-radius: 40rpx;
@@ -11,5 +11,5 @@ module.exports = {
11
11
  "street_name": "崇文街道"
12
12
  },
13
13
  "request_id": "6777935abebcfb20"
14
- }
14
+ }
15
15
  }