jufubao-base 1.0.160-beta1 → 1.0.162-beta10

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 (50) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAfterOrderDetail/Attr.js +9 -0
  3. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +40 -75
  4. package/src/components/JfbBaseAfterOrderDetail/Mock.js +3 -2
  5. package/src/components/JfbBaseAfterOrderList/Attr.js +9 -0
  6. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +63 -83
  7. package/src/components/JfbBaseAfterOrderList/Mock.js +8 -0
  8. package/src/components/JfbBaseCard/Attr.js +220 -194
  9. package/src/components/JfbBaseCard/JfbBaseCard.vue +50 -17
  10. package/src/components/JfbBaseCard/Mock.js +7 -6
  11. package/src/components/JfbBaseCardBind/JfbBaseCardBind.vue +2 -0
  12. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +3 -3
  13. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +2 -2
  14. package/src/components/JfbBaseCardEntry/Attr.js +12 -0
  15. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +35 -2
  16. package/src/components/JfbBaseCardEntry/Mock.js +1 -0
  17. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +43 -32
  18. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +27 -8
  19. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +32 -13
  20. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +61 -24
  21. package/src/components/JfbBaseCardV2/Attr.js +39 -2
  22. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +46 -24
  23. package/src/components/JfbBaseCardV2/Mock.js +12 -11
  24. package/src/components/JfbBaseCardV3/Attr.js +13 -1
  25. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +5 -1
  26. package/src/components/JfbBaseCardV3/Mock.js +1 -1
  27. package/src/components/JfbBaseConDialog/XdCouCardBind.vue +14 -2
  28. package/src/components/JfbBaseMultipleExpress/Attr.js +9 -0
  29. package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +20 -28
  30. package/src/components/JfbBaseMultipleExpress/Mock.js +10 -0
  31. package/src/components/JfbBaseOrderDetail/Attr.js +23 -0
  32. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +57 -137
  33. package/src/components/JfbBaseOrderDetail/bizMock.js +4 -2
  34. package/src/components/JfbBaseOrderList/Attr.js +9 -0
  35. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +37 -90
  36. package/src/components/JfbBaseOrderList/Mock.js +27 -5
  37. package/src/components/JfbBasePhoneCollect/Attr.js +11 -0
  38. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +3 -0
  39. package/src/components/JfbBasePoster/Attr.js +1 -0
  40. package/src/components/JfbBasePosterBigSmall/Attr.js +3 -0
  41. package/src/components/JfbBasePosterType/Attr.js +35 -25
  42. package/src/components/JfbBasePosterType/FourScreen.vue +18 -19
  43. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +12 -0
  44. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +2 -2
  45. package/src/components/JfbBaseSweep/Api.js +13 -0
  46. package/src/components/JfbBaseSweep/Attr.js +34 -0
  47. package/src/components/JfbBaseSweep/JfbBaseSweep.vue +353 -0
  48. package/src/components/JfbBaseSweep/JfbBaseSweepLess.less +79 -0
  49. package/src/components/JfbBaseSweep/JfbBaseSweepMixin.js +30 -0
  50. package/src/components/JfbBaseSweep/Mock.js +3 -0
@@ -52,6 +52,8 @@ import JfbBaseCardBindMixin from "./JfbBaseCardBindMixin";
52
52
  import { Base64 } from "js-base64";
53
53
  import { getContainerPropsValue } from "@/utils/xd.base";
54
54
 
55
+
56
+ //未启用
55
57
  export default {
56
58
  name: "JfbBaseCardBind",
57
59
  components: {
@@ -81,7 +81,7 @@
81
81
  @click.stop="handleUnBindCard(item)"
82
82
  v-if="isShowUnbind"
83
83
  :style="{ background: '#fff',color:'#999',border: '1px solid #999' }"
84
- >解绑</view>
84
+ >解绑</view>
85
85
  </view>
86
86
  </view>
87
87
  </view>
@@ -110,7 +110,7 @@ export default {
110
110
  data() {
111
111
  return {
112
112
  disableList: [],
113
- isShowUnbind: false,
113
+ isShowUnbind: true,
114
114
  loadingList: true,
115
115
  };
116
116
  },
@@ -138,7 +138,7 @@ export default {
138
138
  })
139
139
  .then((res) => {
140
140
  this.loadingList = false;
141
- this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
141
+ //this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
142
142
  res.list = res.list.map((item) => {
143
143
  return {
144
144
  ...item,
@@ -169,7 +169,7 @@ export default {
169
169
  mixins: [componentsMixins, extsMixins, JfbBaseCardDisabledEntryMixin, colorCardMixins, cardListMixins],
170
170
  data() {
171
171
  return {
172
- isShowUnbind: false,
172
+ isShowUnbind: true,
173
173
  isShowIndex:false,
174
174
  };
175
175
  },
@@ -200,7 +200,7 @@ export default {
200
200
  this.$xdShowLoading({});
201
201
  jfbRootExec("getDisableCardListEntry", {vm: this, data: {is_all: "Y", is_show_entry_settings: 'Y'},})
202
202
  .then((res) => {
203
- this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
203
+ //this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
204
204
  res.list = res.list.map((item) => {
205
205
  return {
206
206
  ...item,
@@ -252,6 +252,18 @@ export default {
252
252
  inline: false,
253
253
  notice: '请配置温馨提示内容,未配置的情况将不显示此模块',
254
254
  },
255
+ {
256
+ label: '票券已登录文案:',
257
+ ele: 'el-input',
258
+ type: 'text',
259
+ valueKey: 'logged_name',
260
+ groupKey:'content',
261
+ value: '',
262
+ placeholder: '请输入票券已登录文案',
263
+ className: 'input80',
264
+ inline: false,
265
+ notice: '当未设置文案时候,前台页面显示为"<span style="color:red">已登录</span>",建议不超过<span style="color:red">4</span>个汉字'
266
+ },
255
267
  {
256
268
  label: "是否展示核销二维码",
257
269
  ele: "xd-radio",
@@ -173,7 +173,12 @@
173
173
  }"
174
174
  >
175
175
  <view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
176
- <view class="card-list__title"><view>{{item['card_type_name']}}</view></view>
176
+ <view class="card-list__title">
177
+ <view>
178
+ <view>{{item['card_type_name']}}</view>
179
+ <view v-if="item['is_login'] === 'Y'"><text></text><text>已登录</text></view>
180
+ </view>
181
+ </view>
177
182
  <view class="card-list__content">
178
183
  <view>
179
184
  <text>券号:</text>
@@ -957,16 +962,44 @@ export default {
957
962
  align-items: center;
958
963
 
959
964
  & > view {
960
- padding: 0 unit(80, rpx);
965
+ padding: 0 unit(40, rpx);
961
966
  font-size: unit(24, rpx);
962
967
  line-height: unit(56, rpx);
963
968
  background: rgba(102, 102, 102, 0.4);
964
969
  color: #fff;
965
970
  border-radius: 0 0 unit(16, rpx) 0;
971
+ display: flex;
972
+ justify-content: center;
973
+ align-items: center;
966
974
 
967
975
  .skeleton-card &{
968
976
  .skeleton-item(120rpx, 50rpx, 0 0 16rpx 0, #EEEEEE);
969
977
  }
978
+
979
+ & > view:nth-child(2) {
980
+ height: 36rpx;
981
+ line-height: 36rpx;
982
+ background-color: rgb(41, 203, 151);
983
+ display: flex;
984
+ justify-content: center;
985
+ align-items: center;
986
+ margin-left: 30rpx;
987
+ padding: 0 20rpx;
988
+ border-radius: 8rpx;
989
+
990
+ & > text:nth-child(1) {
991
+ width: 10rpx;
992
+ height: 10rpx;
993
+ border-radius: 50%;
994
+ background-color: #fff;
995
+ margin-right: 10rpx;
996
+ }
997
+
998
+ & > text:nth-child(2) {
999
+ font-size: 24rpx;
1000
+ }
1001
+ }
1002
+
970
1003
  }
971
1004
 
972
1005
  }
@@ -14,6 +14,7 @@ module.exports = {
14
14
  "other_card_point": 0,
15
15
  "is_exchange": "N",
16
16
  "card_point_type": 1,
17
+ "is_login":'Y',
17
18
  "business_codes": ["health"]
18
19
  }, {
19
20
  "card_number": "121000100000028",
@@ -19,27 +19,31 @@
19
19
  <view class="jfb-base-card-info__body" style="position: relative">
20
20
  <view v-if="!qrcode && showForm">
21
21
  <view>
22
- <view class="jfb-base-card-info__body-form">
22
+ <view class="jfb-base-card-info__body-form" @click="handleLabel('card_number')">
23
23
  <view class="jfb-base-card-info__body-form-label">票券号码</view>
24
24
  <input
25
+ placeholder-style="line-height:26rpx;font-size:28rpx;color:#ccc"
25
26
  type="number"
27
+ :focus="card_number_focus"
26
28
  max="32"
27
29
  v-model="card_number"
28
30
  :placeholder="card_num_placeholder"
29
31
  />
30
32
  </view>
31
- <view class="jfb-base-card-info__body-form">
33
+ <view class="jfb-base-card-info__body-form" @click="handleLabel('card_password')">
32
34
  <view class="jfb-base-card-info__body-form-label">票券密码</view>
33
35
  <input
34
36
  class="mp"
37
+ placeholder-style="line-height:26rpx;font-size:28rpx;color:#ccc"
35
38
  max="18"
36
39
  :password="isPassword"
40
+ :focus="card_password_focus"
37
41
  v-model="card_password"
38
42
  :placeholder="card_pwd_placeholder"
39
43
  />
40
44
  <!--#ifdef H5-->
41
45
  <xd-font-icon
42
- @click="handleIcon()"
46
+ @click.stop="handleIcon()"
43
47
  :icon="isPassword ? 'iconbiyan' : 'iconchakan'"
44
48
  ></xd-font-icon>
45
49
  <!--#endif-->
@@ -47,7 +51,7 @@
47
51
  <xd-font-icon
48
52
  :width="72"
49
53
  :height="72"
50
- @click="handleIcon()"
54
+ @click.stop="handleIcon()"
51
55
  :icon="isPassword ? 'iconbiyan' : 'iconchakan'"
52
56
  ></xd-font-icon>
53
57
  <!--#endif-->
@@ -160,6 +164,10 @@ export default {
160
164
  my_card_url: "", //我的票券跳转地址
161
165
 
162
166
  inCallbackUrlOrg:'',//是否带有回调地址
167
+
168
+ card_password_focus: false,
169
+ card_number_focus: false,
170
+
163
171
  };
164
172
  },
165
173
  computed: {
@@ -177,10 +185,25 @@ export default {
177
185
  return this.valueKey.filter(item => item.key !== "end_time");
178
186
  }
179
187
  return this.valueKey;
180
- }
188
+ },
189
+ },
190
+ watch:{
191
+ container(value,oldValue) {
192
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
193
+ if (this.$configProject['isPreview']) this.init(value)
194
+ },
195
+ },
196
+ created() {
197
+ this.init(this.container)
181
198
  },
182
- created() {},
183
199
  methods: {
200
+ handleLabel(el){
201
+ this.card_password_focus = false;
202
+ this.card_number_focus = false;
203
+ setTimeout(()=>{
204
+ this[`${el}_focus`] = true;
205
+ },50)
206
+ },
184
207
  handleIcon(){
185
208
  this.isPassword = !this.isPassword
186
209
  },
@@ -269,39 +292,26 @@ export default {
269
292
  }
270
293
  })
271
294
  },
272
- init() {
273
- this.backUrl = getContainerPropsValue(
274
- this.container,
275
- "content.back_url",
276
- { value: "/pages/card/card" }
277
- ).value;
278
- this.card_num_placeholder = getContainerPropsValue(
279
- this.container,
280
- "content.card_num_placeholder",
281
- "请输入券号(电子券除外)"
282
- );
283
- this.card_pwd_placeholder = getContainerPropsValue(
284
- this.container,
285
- "content.card_pwd_placeholder",
286
- "请输入密码"
287
- );
288
- this.is_show_balance = getContainerPropsValue(this.container, 'content.is_show_balance', "N");
289
- this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
295
+ init(container) {
296
+ this.backUrl = getContainerPropsValue(container, "content.back_url", { value: "/pages/card/card" }).value;
297
+ this.card_num_placeholder = getContainerPropsValue(container, "content.card_num_placeholder", "请输入券号(电子券除外)");
298
+ this.card_pwd_placeholder = getContainerPropsValue(container, "content.card_pwd_placeholder", "请输入密码");
299
+ this.is_show_balance = getContainerPropsValue(container, 'content.is_show_balance', "N");
300
+ this.my_card_url = getContainerPropsValue(container, 'content.my_card_url', { value: "" }).value;
290
301
  },
291
302
  onJfbLoad(options) {
292
- this.init();
293
-
294
- this.qrcode = options.qrcode;
303
+ this.qrcode = options.qrcode || options.pa;
295
304
 
296
305
  //#ifdef MP-WEIXIN
297
- if(options.qrcode) {
298
- this.qrcode = decodeURIComponent(options.qrcode);
306
+ if(this.qrcode) {
307
+ this.qrcode = decodeURIComponent(this.qrcode);
299
308
  }
300
309
  //#endif
301
310
 
302
311
  if(options.inCallback) {
303
312
  this.inCallbackUrlOrg = options.inCallback;
304
313
  }
314
+
305
315
  if (this.qrcode) {
306
316
  jfbRootExec("getByQrCardDetail", {
307
317
  vm: this,
@@ -413,8 +423,7 @@ export default {
413
423
  color: #a6a6a6;
414
424
  margin-right: unit(70, rpx);
415
425
  text-align: center;
416
-
417
-
426
+ font-size: unit(28, rpx);
418
427
  }
419
428
 
420
429
  & .mp {
@@ -425,7 +434,8 @@ export default {
425
434
  }
426
435
 
427
436
  input {
428
- font-size: unit(24, rpx);
437
+ font-size: unit(28, rpx);
438
+ flex: 1;
429
439
  }
430
440
 
431
441
  &-value {
@@ -458,6 +468,7 @@ export default {
458
468
  color: #a6a6a6;
459
469
  margin-right: unit(70, rpx);
460
470
  text-align: center;
471
+
461
472
  }
462
473
 
463
474
  &-value {
@@ -16,26 +16,30 @@
16
16
  <view class="jfb-base-card-info-entry__body" :style="{minHeight: layoutInfo.bodyMinHeightRpx + 'rpx'}">
17
17
  <view v-if="!qrcode && showForm">
18
18
  <view>
19
- <view class="jfb-base-card-info-entry__body-form">
19
+ <view class="jfb-base-card-info-entry__body-form" @click="handleLabel('card_number')">
20
20
  <view class="jfb-base-card-info-entry__body-form-label">票券号码</view>
21
21
  <input
22
+ placeholder-style="line-height:26rpx;font-size:28rpx;color:#ccc"
22
23
  type="number"
24
+ :focus="card_number_focus"
23
25
  max="32"
24
26
  v-model="card_number"
25
27
  :placeholder="card_num_placeholder"
26
28
  />
27
29
  </view>
28
- <view class="jfb-base-card-info-entry__body-form">
30
+ <view class="jfb-base-card-info-entry__body-form" @click="handleLabel('card_password')">
29
31
  <view class="jfb-base-card-info-entry__body-form-label">票券密码</view>
30
32
  <input
31
33
  max="18"
34
+ placeholder-style="line-height:26rpx;font-size:28rpx;color:#ccc"
32
35
  :password="isPassword"
36
+ :focus="card_password_focus"
33
37
  v-model="card_password"
34
38
  :placeholder="card_pwd_placeholder"
35
39
  />
36
40
  <!--#ifdef H5-->
37
41
  <xd-font-icon
38
- @click="handleIcon()"
42
+ @click.stop="handleIcon()"
39
43
  :icon="isPassword ? 'iconbiyan' : 'iconchakan'"
40
44
  ></xd-font-icon>
41
45
  <!--#endif-->
@@ -43,7 +47,7 @@
43
47
  <xd-font-icon
44
48
  :width="72"
45
49
  :height="72"
46
- @click="handleIcon()"
50
+ @click.stop="handleIcon()"
47
51
  :icon="isPassword ? 'iconbiyan' : 'iconchakan'"
48
52
  ></xd-font-icon>
49
53
  <!--#endif-->
@@ -165,6 +169,9 @@ export default {
165
169
  my_card_url: "", //我的票券跳转地址
166
170
  inCallbackUrlOrg:'',//是否带有回调地址
167
171
  is_show_balance: "N", //是否显示余额
172
+
173
+ card_password_focus: false,
174
+ card_number_focus: false,
168
175
  };
169
176
  },
170
177
  watch: {
@@ -190,6 +197,14 @@ export default {
190
197
  },
191
198
 
192
199
  methods: {
200
+ handleLabel(el){
201
+ this.card_password_focus = false;
202
+ this.card_number_focus = false;
203
+ setTimeout(()=>{
204
+ this[`${el}_focus`] = true;
205
+ },50)
206
+ },
207
+
193
208
  handleIcon(){
194
209
  this.isPassword = !this.isPassword
195
210
  },
@@ -302,17 +317,19 @@ export default {
302
317
  this.entryGroupId = getContainerPropsValue(container,"content.entryGroupId","default");
303
318
  },
304
319
  onJfbLoad(options) {
305
- this.qrcode = options.qrcode;
320
+ this.qrcode = options.qrcode || options.pa;
306
321
 
307
322
  //#ifdef MP-WEIXIN
308
- if(options.qrcode) {
309
- this.qrcode = decodeURIComponent(options.qrcode);
323
+ if(this.qrcode) {
324
+ this.qrcode = decodeURIComponent(this.qrcode);
310
325
  }
311
326
  //#endif
312
327
 
313
328
  if(options.inCallback) {
314
329
  this.inCallbackUrlOrg = options.inCallback;
315
330
  }
331
+
332
+
316
333
  if (this.qrcode) {
317
334
  jfbRootExec("getByQrCardDetailEntry", {
318
335
  vm: this,
@@ -447,6 +464,7 @@ export default {
447
464
  color: #a6a6a6;
448
465
  margin-right: unit(70, rpx);
449
466
  text-align: center;
467
+ font-size: unit(28, rpx);
450
468
  }
451
469
 
452
470
  & .mp {
@@ -458,7 +476,8 @@ export default {
458
476
  }
459
477
 
460
478
  input {
461
- font-size: unit(24, rpx);
479
+ font-size: unit(28, rpx);
480
+ flex: 1;
462
481
  }
463
482
 
464
483
  &-value {
@@ -40,11 +40,11 @@
40
40
  </view>
41
41
  <view :style="{height:bottomHeight+100+'rpx'}"></view>
42
42
  <view class="jfb-base-card-shift__body-footer" :style="prod_bottom">
43
+ <xd-button type="primary" width="360rpx" @click="handleChange">立即转换</xd-button>
43
44
  <view class="jfb-base-card-shift__body-agree">
44
45
  <xd-radio size="small" v-model="isCheck"></xd-radio>
45
46
  <view>我已经阅读和同意积分转换规则</view>
46
47
  </view>
47
- <xd-button type="primary" width="360rpx" @click="handleChange">立即转换</xd-button>
48
48
  </view>
49
49
  <xd-dailog
50
50
  class="dialog"
@@ -55,14 +55,22 @@
55
55
  :cancel="false"
56
56
  >
57
57
  <view class="jfb-base-card-shift__body-success">
58
- <xd-font-icon
59
- size="100"
60
- color="#52C41A"
61
- icon="icondui-01"
62
- ></xd-font-icon>
63
- <view class="jfb-base-card-shift__body-success-title">转换成功</view>
64
- <view class="jfb-base-card-shift__body-success-content">您已成功将{{ card_number }} 转换为{{ changeNumber }}已自动帮您绑定成功,可在卡列表查询</view>
65
- <xd-button type="primarys" width="360rpx" @click="handleToLink">返回列表</xd-button>
58
+ <view class="jfb-base-card-shift__body-success-head">
59
+ <xd-font-icon
60
+ size="42"
61
+ :color="mainColor"
62
+ icon="icondui-01"
63
+ ></xd-font-icon>
64
+ <view class="jfb-base-card-shift__body-success-title" :style="{
65
+ color: mainColor
66
+ }">票券转换成功</view>
67
+ </view>
68
+
69
+ <view class="jfb-base-card-shift__body-success-content">
70
+ 已成功将 <text class="b">{{ card_number }}</text><br/> 转换成为 <text class="b">{{ changeNumber }}</text><br/>
71
+ <text @click="handleToLink">可在券包中查看</text>
72
+ </view>
73
+ <!-- <xd-button type="primarys" width="360rpx" @click="handleToLink">返回列表</xd-button> -->
66
74
  </view>
67
75
  </xd-dailog>
68
76
  </view>
@@ -270,8 +278,7 @@ export default {
270
278
  justify-content: center;
271
279
  font-size: unit(24, rpx);
272
280
  color: #bbb;
273
- padding: unit(20, rpx) 0;
274
- margin-bottom: unit(40,rpx);
281
+ margin: unit(40,rpx) 0;
275
282
 
276
283
  & > view {
277
284
  margin-left: unit(25, rpx);
@@ -284,13 +291,21 @@ export default {
284
291
  right: 0;
285
292
  // bottom: unit(120,rpx) !important;
286
293
  height: unit(100, rpx);
294
+ background: #FFFFFF;
295
+ padding-top: unit(20, rpx);
287
296
  }
288
297
 
289
298
  &-success {
290
299
  padding: unit(70, rpx);
291
300
  &-title {
292
- font-size: unit(42, rpx);
301
+ font-size: unit(36, rpx);
293
302
  color: #242424;
303
+ margin-left: 8px;
304
+ }
305
+ &-head{
306
+ display: flex;
307
+ align-items: center;
308
+ justify-content: center;
294
309
  }
295
310
 
296
311
  &-content {
@@ -298,7 +313,11 @@ export default {
298
313
  color: #5a5a5a;
299
314
  text-align: center;
300
315
  line-height: unit(42, rpx);
301
- margin: unit(50, rpx) 0;
316
+ margin: unit(40, rpx) 0 0;
317
+ .b{
318
+ font-weight: bold;
319
+ margin-left: 8rpx;
320
+ }
302
321
  }
303
322
  }
304
323
 
@@ -10,9 +10,7 @@
10
10
  :class="{ editx: isEditx && active }"
11
11
  v-if="isEditx && active"
12
12
  >
13
- <view class="jfb-base-card-sweep-info__edit-icon" @click="delEdit"
14
- >删除</view
15
- >
13
+ <view class="jfb-base-card-sweep-info__edit-icon" @click="delEdit">删除</view>
16
14
  </view>
17
15
  <!-- #endif -->
18
16
  <view class="jfb-base-card-sweep-info__body" style="position: relative">
@@ -65,7 +63,7 @@
65
63
 
66
64
  <script>
67
65
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
68
- import { jfbRootExec } from "@/utils/xd.event";
66
+ import { jfbRootExec, jfbRootFnExec } from "@/utils/xd.event";
69
67
  import JfbBaseCardSweepInfoMixin from "./JfbBaseCardSweepInfoMixin";
70
68
  import XdButton from "@/components/XdButton/XdButton";
71
69
  import XdUnit from "@/components/XdUnit/XdUnit";
@@ -111,6 +109,7 @@ export default {
111
109
 
112
110
  inCallbackUrlOrg:'',//是否带有回调地址
113
111
  is_show_balance: "N", //是否显示余额
112
+ hasCon: "", //是否有优惠券
114
113
  };
115
114
  },
116
115
  watch: {
@@ -143,6 +142,11 @@ export default {
143
142
 
144
143
  },
145
144
  methods: {
145
+ toShowCouponDialog(){
146
+ if(this.info){
147
+ jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.info.card_number})
148
+ }
149
+ },
146
150
  handleToLink(path) {
147
151
  if (this.pa) {
148
152
  jfbRootExec("qrCardBind", {
@@ -152,30 +156,56 @@ export default {
152
156
  },
153
157
  })
154
158
  .then((res) => {
155
- this.$xdAlert({
156
- content: "绑定成功",
157
- close: () => {
158
- //#ifdef H5
159
- let base = this.jfbAuthorize.getBasePath(this);
160
- let url = `${location.origin}${base}${this.backUrl}`;
161
- url = this.getUrlCallback(url)
162
- this.$xdLog.setARMSInfo({url}, 'static_qr_card_bind');
159
+ //有优惠券处理
160
+ if(this.hasCon){
161
+ this.toShowCouponDialog();
162
+ this.$bus.$on("onCloseConDialog",(container_id) => {
163
+ if(container_id === this.hasCon){
164
+ //#ifdef H5
165
+ let base = this.jfbAuthorize.getBasePath(this);
166
+ let url = `${location.origin}${base}${this.backUrl}`;
167
+ url = this.getUrlCallback(url)
168
+ this.$xdLog.setARMSInfo({url}, 'static_qr_card_bind');
163
169
 
164
- setTimeout(()=>{
165
- window.location.href = url;
166
- },50);
167
- // #endif
170
+ setTimeout(()=>{
171
+ window.location.href = url;
172
+ },50);
173
+ // #endif
168
174
 
169
- //#ifndef H5
170
- let wPath = this.getUrlCallback(this.backUrl)
171
- this.$xdUniHelper.redirectTo({
172
- url:wPath,
173
- });
174
- // #endif
175
+ //#ifndef H5
176
+ let wPath = this.getUrlCallback(this.backUrl)
177
+ this.$xdUniHelper.redirectTo({
178
+ url:wPath,
179
+ });
180
+ // #endif
181
+ }
182
+ })
183
+ } else {
184
+ this.$xdAlert({
185
+ content: "绑定成功",
186
+ close: () => {
187
+ //#ifdef H5
188
+ let base = this.jfbAuthorize.getBasePath(this);
189
+ let url = `${location.origin}${base}${this.backUrl}`;
190
+ url = this.getUrlCallback(url)
191
+ this.$xdLog.setARMSInfo({url}, 'static_qr_card_bind');
175
192
 
193
+ setTimeout(()=>{
194
+ window.location.href = url;
195
+ },50);
196
+ // #endif
176
197
 
177
- },
178
- });
198
+ //#ifndef H5
199
+ let wPath = this.getUrlCallback(this.backUrl)
200
+ this.$xdUniHelper.redirectTo({
201
+ url:wPath,
202
+ });
203
+ // #endif
204
+
205
+
206
+ },
207
+ });
208
+ }
179
209
  })
180
210
  .catch();
181
211
  }
@@ -186,6 +216,7 @@ export default {
186
216
  },
187
217
  onJfbLoad(options) {
188
218
  this.pa = options.pa;
219
+
189
220
  if(options.inCallback) {
190
221
  this.inCallbackUrlOrg = options.inCallback;
191
222
  }
@@ -233,6 +264,12 @@ export default {
233
264
  onJfbShow(options) {
234
265
  this.onJfbLoad(options);
235
266
  },
267
+ onJfbCustomEvent({action, data}){
268
+ if(action === 'baseConDialog@hasCon'){
269
+ this.hasCon = data;
270
+ }
271
+ console.log('onJfbCustomEvent',action, data);
272
+ }
236
273
  },
237
274
  };
238
275
  </script>