jufubao-base 1.0.169-beta1 → 1.0.169-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 (39) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseLogin/Attr.js +54 -16
  3. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  4. package/src/components/JfbBaseOrderDetail/Api.js +12 -7
  5. package/src/components/JfbBaseOrderDetail/Attr.js +28 -14
  6. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +68 -18
  7. package/src/components/JfbBaseOrderDetail/Mock.js +3 -1
  8. package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
  9. package/src/components/JfbBaseTfkCardBind/Attr.js +61 -10
  10. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +169 -9
  11. package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
  12. package/src/components/JfbBaseTfkCardDetail/Api.js +26 -0
  13. package/src/components/JfbBaseTfkCardDetail/Attr.js +336 -9
  14. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +236 -30
  15. package/src/components/JfbBaseTfkCardDetail/Mock.js +2 -2
  16. package/src/components/JfbBaseTfkCardLogin/Attr.js +301 -5
  17. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +317 -158
  18. package/src/components/JfbBaseTfkCardLogin/Mock.js +2 -46
  19. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +271 -0
  20. package/src/components/JfbBaseTfkSearch/AllList.vue +232 -0
  21. package/src/components/JfbBaseTfkSearch/Api.js +11 -42
  22. package/src/components/JfbBaseTfkSearch/Attr.js +225 -33
  23. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +157 -0
  24. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +179 -0
  25. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +308 -0
  26. package/src/components/JfbBaseTfkSearch/ContentShop.vue +184 -0
  27. package/src/components/JfbBaseTfkSearch/CusAttr.js +213 -0
  28. package/src/components/JfbBaseTfkSearch/CustomList.vue +402 -0
  29. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +230 -26
  30. package/src/components/JfbBaseTfkSearch/Mock.js +90 -11
  31. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +45 -0
  32. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
  33. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +246 -0
  34. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
  35. package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
  36. package/src/components/JfbBaseTfkSearch/listMixins.js +153 -0
  37. package/src/components/JfbBaseTfkSearch/search.js +293 -0
  38. package/src/mixins/colorCardMixins.js +71 -9
  39. package/src/mixins/componentsMixins.js +346 -23
@@ -6,53 +6,72 @@
6
6
  */
7
7
  module.exports = [
8
8
  {
9
- //设置方法名字当别忘记加上【模块名字】:Tfk
10
- mapFnName: 'getTfkByIdFilmSquate',
11
- title: '获取电影广场列表',
12
- path: '/api/account/film/list-film-square',
9
+ mapFnName: 'qrcodeCardBind',
13
10
  isRule: false,
14
- params: {
15
- last_key: ['当前页', 'Number', '必选'],
16
- page_size: ['每页数量', 'Number', '必选'],
11
+ title: '根据二维码绑定卡',
12
+ prefix: 'qrcode',
13
+ path: '/card/v1/card-bind/bind-card-by-qrcode',
14
+ data: {
15
+ card_qrcode: ['二维码内容', 'String', '必选'],
17
16
  },
18
- isConsole: true,
19
17
  disabled: true,
20
18
  },
21
19
  {
22
- //设置方法名字当别忘记加上【模块名字】:Tfk
23
- mapFnName: 'updateTfkFilmPaiqiDate',
24
- title: '更新排期',
25
- path: '/api/account/film/paiqi-date',
20
+ mapFnName: 'getByPwdCardDetail',
26
21
  isRule: false,
27
- params: {
28
- film_id: ['电影id', 'Number', '必选'],
29
- cinema_id: ['影院id', 'Number', '必选'],
22
+ title: '根据卡号密码获得卡信息',
23
+ prefix: 'detal',
24
+ path: '/card/v1/card-bind/get-card-by-password',
25
+ data: {
26
+ card_number: ['卡号', 'String', '必选'],
27
+ card_password: ['卡号密码', 'String', '必选']
30
28
  },
31
- isConsole: true,
32
29
  disabled: true,
33
30
  },
34
31
  {
35
- //设置方法名字当别忘记加上【模块名字】:Tfk
36
- mapFnName: 'removeTfkFilmAddress',
37
- title: '删除我的配送地址',
38
- path: '/api/account/film/paiqi-date',
32
+ mapFnName: 'getByQrCardDetail',
39
33
  isRule: false,
40
- params: {
41
- film_id: ['电影id', 'Number', '必选'],
34
+ title: '根据二维码获得卡信息',
35
+ prefix: 'detal',
36
+ path: '/card/v1/card-bind/get-card-by-qrcode',
37
+ data: {
38
+ card_qrcode: ['二维码', 'String', '必选'],
42
39
  },
43
- isConsole: true,
44
40
  disabled: true,
45
41
  },
46
42
  {
47
- //设置方法名字当别忘记加上【模块名字】:Tfk
48
- mapFnName: 'addTfkFilmcart',
49
- title: '添加购物车',
50
- path: '/api/account/film/paiqi-date',
43
+ mapFnName: 'pwdCardBind',
51
44
  isRule: false,
52
- params: {
53
- film_id: ['电影id', 'Number', '必选'],
45
+ title: '根据卡号密码绑定卡',
46
+ prefix: 'pwd',
47
+ path: '/card/v1/card-bind/bind-card-by-password',
48
+ data: {
49
+ card_number: ['卡号', 'String', '必选'],
50
+ card_password: ['密码', 'String', '可选'],
51
+ },
52
+ disabled: true,
53
+ },
54
+ {
55
+ mapFnName: 'qrCardBind',
56
+ isRule: false,
57
+ title: '根据二维码绑定卡',
58
+ prefix: 'qrcode',
59
+ path: '/card/v1/card-bind/bind-card-by-qrcode',
60
+ data: {
61
+ card_qrcode: ['二维码', 'String', '必选'],
54
62
  },
55
- isConsole: true,
56
63
  disabled: true,
57
64
  },
65
+ {
66
+ mapFnName: "checkValidCode",
67
+ title: "图片验证码 - 校验",
68
+ path: "/common/v1/valid_code/image/check",
69
+ isRule: false,
70
+ data: {
71
+ token: ['随机请求码,前端生成', 'String', '必选'],
72
+ valid_code: ['验证码', 'String', '必选'],
73
+ },
74
+ isConsole: true,
75
+ disabled: true,
76
+ }
58
77
  ];
@@ -19,7 +19,7 @@ export default {
19
19
  ],
20
20
  },
21
21
  {
22
- label: "温馨提示文案:",
22
+ label: "温馨提示文案 - 通用:",
23
23
  ele: "xd-tinymce",
24
24
  valueKey: "tips",
25
25
  value: data.tips || null,
@@ -27,7 +27,7 @@ export default {
27
27
  },
28
28
  {
29
29
  ele: "title",
30
- label: "标题菜单配置",
30
+ label: "标题菜单配置 - 通用",
31
31
  size: "small",
32
32
  groupKey: "style",
33
33
  },
@@ -104,6 +104,7 @@ export default {
104
104
  label: "实体券表单样式配置",
105
105
  size: "small",
106
106
  groupKey: "style",
107
+ hidden: data.previewCurrent !== 'ticket',
107
108
  },
108
109
  {
109
110
  label: '表单容器设外边距:',
@@ -117,6 +118,7 @@ export default {
117
118
  placeholder: '请设置边距',
118
119
  inline: false,
119
120
  notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
121
+ hidden: data.previewCurrent !== 'ticket',
120
122
  },
121
123
  {
122
124
  label: "输入框样式:",
@@ -130,7 +132,8 @@ export default {
130
132
  list: [
131
133
  {label: '线性', value: "linear"},
132
134
  {label: '面性', value: "face"},
133
- ]
135
+ ],
136
+ hidden: data.previewCurrent !== 'ticket',
134
137
  },
135
138
  data.inputStyle === 'linear' && {
136
139
  label: "表单边框颜色:",
@@ -139,6 +142,7 @@ export default {
139
142
  value: data.formBorderColor || "#F9F9F9",
140
143
  groupKey:'style',
141
144
  placeholder: "请选择表单边框颜色",
145
+ hidden: data.previewCurrent !== 'ticket',
142
146
  },
143
147
  data.inputStyle === 'linear' && {
144
148
  label: "表单边框宽度:",
@@ -149,6 +153,7 @@ export default {
149
153
  groupKey:'style',
150
154
  placeholder: "请输入表单边框宽度",
151
155
  className: 'input60',
156
+ hidden: data.previewCurrent !== 'ticket',
152
157
  },
153
158
  {
154
159
  label: "输入框间隔距离:",
@@ -159,12 +164,14 @@ export default {
159
164
  type: "number",
160
165
  placeholder: "请输入输入框间隔距离",
161
166
  className: 'input60',
167
+ hidden: data.previewCurrent !== 'ticket',
162
168
  },
163
169
  {
164
170
  ele: 'title',
165
171
  label: '实体券标签样式配置',
166
172
  size: 'small',
167
173
  groupKey: 'style',
174
+ hidden: data.previewCurrent !== 'ticket',
168
175
  },
169
176
  data.inputStyle === 'linear' && {
170
177
  label: "标签位置:",
@@ -178,7 +185,8 @@ export default {
178
185
  list: [
179
186
  {label: '居左', value: "left"},
180
187
  {label: '居上', value: "top"},
181
- ]
188
+ ],
189
+ hidden: data.previewCurrent !== 'ticket',
182
190
  },
183
191
  data.inputStyle === 'linear' && {
184
192
  label: "标签文字对齐方式:",
@@ -193,7 +201,8 @@ export default {
193
201
  {label: '左对齐', value: "left"},
194
202
  {label: '右对齐', value: "right"},
195
203
  {label: '居中', value: "center"},
196
- ]
204
+ ],
205
+ hidden: data.previewCurrent !== 'ticket',
197
206
  },
198
207
  {
199
208
  label: "标签宽度:",
@@ -204,6 +213,7 @@ export default {
204
213
  groupKey:'style',
205
214
  placeholder: "请输入标签宽度",
206
215
  className: 'input60',
216
+ hidden: data.previewCurrent !== 'ticket',
207
217
  },
208
218
  {
209
219
  label: "标签文字是否显示:",
@@ -217,7 +227,8 @@ export default {
217
227
  list: [
218
228
  {label: '显示', value: "Y"},
219
229
  {label: '不显示', value: "N"},
220
- ]
230
+ ],
231
+ hidden: data.previewCurrent !== 'ticket',
221
232
  },
222
233
  data.labelShow === 'Y' && {
223
234
  label: "标签字体样式设置:",
@@ -241,6 +252,7 @@ export default {
241
252
  },
242
253
  inline: false,
243
254
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
255
+ hidden: data.previewCurrent !== 'ticket',
244
256
  },
245
257
  {
246
258
  label: "占位符字体样式设置:",
@@ -268,6 +280,7 @@ export default {
268
280
  },
269
281
  inline: false,
270
282
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
283
+ hidden: data.previewCurrent !== 'ticket',
271
284
  },
272
285
  {
273
286
  label: "内容字体样式设置:",
@@ -291,6 +304,7 @@ export default {
291
304
  },
292
305
  inline: false,
293
306
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
307
+ hidden: data.previewCurrent !== 'ticket',
294
308
  },
295
309
  {
296
310
  label: "票券号码图标:",
@@ -316,6 +330,7 @@ export default {
316
330
  },
317
331
  inline: false,
318
332
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
333
+ hidden: data.previewCurrent !== 'ticket',
319
334
  },
320
335
  {
321
336
  label: "票券密码图标:",
@@ -341,6 +356,7 @@ export default {
341
356
  },
342
357
  inline: false,
343
358
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
359
+ hidden: data.previewCurrent !== 'ticket',
344
360
  },
345
361
  {
346
362
  label: "验证码图标:",
@@ -366,12 +382,14 @@ export default {
366
382
  },
367
383
  inline: false,
368
384
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
385
+ hidden: data.previewCurrent !== 'ticket',
369
386
  },
370
387
  {
371
388
  ele: 'title',
372
389
  label: '表单右侧图标',
373
390
  size: 'small',
374
391
  groupKey: 'style',
392
+ hidden: data.previewCurrent !== 'ticket',
375
393
  },
376
394
  {
377
395
  label: "扫码图标:",
@@ -397,6 +415,7 @@ export default {
397
415
  },
398
416
  inline: false,
399
417
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
418
+ hidden: data.previewCurrent !== 'ticket',
400
419
  },
401
420
  {
402
421
  ele: 'title',
@@ -421,9 +440,10 @@ export default {
421
440
  placeholder: '请设置边距',
422
441
  inline: false,
423
442
  notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
443
+ hidden: data.previewCurrent !== 'ticket',
424
444
  },
425
445
  {
426
- label: "按钮圆角",
446
+ label: "按钮圆角 - 通用",
427
447
  ele: 'xd-site-select-list',
428
448
  valueKey: 'btnRadius',
429
449
  value: data['btnRadius'] || '',
@@ -442,7 +462,7 @@ export default {
442
462
  },
443
463
  },
444
464
  {
445
- label: "按钮图标设置",
465
+ label: "按钮图标设置 - 通用",
446
466
  ele: "xd-font",
447
467
  valueKey: "btnIcon",
448
468
  value: data.btnIcon || {},
@@ -471,6 +491,7 @@ export default {
471
491
  label: '电子码表单样式配置',
472
492
  size: 'small',
473
493
  groupKey: 'style',
494
+ hidden: data.previewCurrent !== 'code',
474
495
  },
475
496
  {
476
497
  label: "电子码表单外边距设置",
@@ -489,6 +510,7 @@ export default {
489
510
  placeholder: '请设置边距',
490
511
  inline: false,
491
512
  notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
513
+ hidden: data.previewCurrent !== 'code',
492
514
  },
493
515
  {
494
516
  label: "电子码按钮边距设置",
@@ -507,6 +529,7 @@ export default {
507
529
  placeholder: '请设置边距',
508
530
  inline: false,
509
531
  notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
532
+ hidden: data.previewCurrent !== 'code',
510
533
  },
511
534
  {
512
535
  label: "电子码票券号图标设置",
@@ -532,6 +555,7 @@ export default {
532
555
  },
533
556
  inline: false,
534
557
  notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
558
+ hidden: data.previewCurrent !== 'code',
535
559
  },
536
560
  {
537
561
  label: "电子码标签宽度设置",
@@ -540,6 +564,7 @@ export default {
540
564
  value: data.digitalCodeLabelWidth || 100,
541
565
  groupKey:'style',
542
566
  type: "number",
567
+ hidden: data.previewCurrent !== 'code',
543
568
  },
544
569
  {
545
570
  label: "电子码输入框颜色设置",
@@ -547,6 +572,7 @@ export default {
547
572
  valueKey: "digitalCodeColor",
548
573
  value: data.digitalCodeColor || "#dddddd",
549
574
  groupKey:'style',
575
+ hidden: data.previewCurrent !== 'code',
550
576
  },
551
577
  {
552
578
  label: '电子码输入框圆角设置:',
@@ -566,10 +592,11 @@ export default {
566
592
  console.error(error);
567
593
  });
568
594
  },
595
+ hidden: data.previewCurrent !== 'code',
569
596
  },
570
597
  {
571
598
  ele: 'title',
572
- label: '温馨提示样式配置',
599
+ label: '温馨提示样式配置 - 通用',
573
600
  size: 'small',
574
601
  groupKey: 'style',
575
602
  },
@@ -597,7 +624,31 @@ export default {
597
624
  placeholder: '请设置边距',
598
625
  inline: false,
599
626
  notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
600
- }
627
+ },
628
+ {
629
+ label: '我的票券跳转地址:',
630
+ ele: 'xd-select-pages-path',
631
+ valueKey: 'my_card_url',
632
+ groupKey: 'advanced',
633
+ placeholder: '请选择我的票券跳转地址',
634
+ value: null,
635
+ setting: {
636
+ router: XdBus.getParentApi('getPagesTree'),
637
+ },
638
+ inline: false,
639
+ },
640
+ {
641
+ label: '卡绑定成功回跳地址:',
642
+ ele: 'xd-select-pages-path',
643
+ valueKey: 'back_url',
644
+ groupKey: 'advanced',
645
+ placeholder: '请选择卡绑定成功回跳地址',
646
+ value: null,
647
+ setting: {
648
+ router: XdBus.getParentApi('getPagesTree'),
649
+ },
650
+ inline: false,
651
+ },
601
652
  ].filter(i=>i)
602
653
  },
603
654
  advanced: [],
@@ -35,11 +35,11 @@
35
35
  }">
36
36
  <view class="menu_wrap" :style="menuBoxStyle">
37
37
  <view class="menu_list">
38
- <view class="menu_item">
38
+ <view class="menu_item" @click="switchShowType('ticket')">
39
39
  <view class="menu_inner" :class="menuShowType"
40
40
  :style="[menuType == 'ticket' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">实体券</view>
41
41
  </view>
42
- <view class="menu_item">
42
+ <view class="menu_item" @click="switchShowType('code')">
43
43
  <view class="menu_inner" :class="menuShowType"
44
44
  :style="[menuType == 'code' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">电子码</view>
45
45
  </view>
@@ -67,7 +67,7 @@
67
67
  v-model="form.card_number"
68
68
  placeholder="请输入票券号"
69
69
  />
70
- <view>
70
+ <view @click="doScanCode">
71
71
  <xd-font-icon :icon="scanIcon.icon || 'iconsaoma'"
72
72
  :color="scanIcon.color"
73
73
  :style="{fontSize: scanIcon.fontSize}"
@@ -114,6 +114,7 @@
114
114
  <view :style="btnWrapStyle">
115
115
  <xd-button type="primary"
116
116
  :radius="btnRadius + 'rpx'"
117
+ @click="toBindCardTicket"
117
118
  >
118
119
  <xd-font-icon :icon="btnIcon.icon"
119
120
  style="display: inline-flex;margin-right: 12rpx;"
@@ -139,12 +140,13 @@
139
140
  :iconColor="digitalCodeIcon.color"
140
141
  content-align="left"
141
142
  >
142
- <xd-form-input placeholder="请输入票券号" v-model="form.code" />
143
+ <xd-form-input prefixIcon="1" placeholder="请输入票券号" v-model="form.code" />
143
144
  </xd-form-item>
144
145
  </xd-form>
145
146
  <view :style="digitalBtnWrapStyle">
146
147
  <xd-button type="primary"
147
148
  :radius="btnRadius + 'rpx'"
149
+ @click="toBindCardDigital"
148
150
  >
149
151
  <xd-font-icon :icon="btnIcon.icon"
150
152
  style="display: inline-flex;margin-right: 12rpx;"
@@ -193,6 +195,8 @@
193
195
  validImageAPIUrl: "",
194
196
  valid_token: "",
195
197
  formRenderKey: "formRenderKey",
198
+ hasCon: "", //是否有优惠券
199
+ jwxSDK: null,
196
200
 
197
201
  //todo
198
202
  tips: "",
@@ -252,6 +256,8 @@
252
256
  digitalCodeLabelWidth: "",
253
257
  digitalCodeRadius: 0,
254
258
  digitalCodeColor: "",
259
+ my_card_url: "",
260
+ backUrl: "",
255
261
  }
256
262
  },
257
263
  computed: {
@@ -316,6 +322,7 @@
316
322
  return this.styleObjectToString({
317
323
  background: this.tipBgColor,
318
324
  padding: padding,
325
+ fontSize: '24rpx',
319
326
  })
320
327
  },
321
328
  menuItemBoxStyle(){
@@ -363,6 +370,16 @@
363
370
  this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
364
371
  this.valid_token = this.$xdUniHelper.randomChar(20);
365
372
  //todo
373
+ // #ifdef H5
374
+ jfbRootExec("getH5WxAuthorize", {
375
+ vm: this,
376
+ data: {
377
+ jsApiList: ["chooseWXPay"],
378
+ }
379
+ }).then(res => {
380
+ this.jwxSDK = res.jwxSDK;
381
+ })
382
+ // #endif
366
383
  },
367
384
  methods: {
368
385
  onJfbLoad(options) {
@@ -407,6 +424,8 @@
407
424
  this.digitalCodeLabelWidth = getContainerPropsValue(value, "content.digitalCodeLabelWidth", '100');
408
425
  this.digitalCodeRadius = getContainerPropsValue(value, "content.digitalCodeRadius", '0');
409
426
  this.digitalCodeColor = getContainerPropsValue(value, "content.digitalCodeColor", '#dddddd');
427
+ this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
428
+ this.backUrl = getContainerPropsValue(this.container, 'content.back_url', { value: "" }).value;
410
429
 
411
430
  console.log(this.digitalCodeRadius, "digitalCodeRadius");
412
431
 
@@ -419,9 +438,147 @@
419
438
  this.formRenderKey = Date.now();
420
439
  }
421
440
  },
422
-
441
+ toShowCouponDialog(){
442
+ if(this.info){
443
+ jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.form.card_number})
444
+ }
445
+ },
446
+ switchShowType(type){
447
+ this.menuType = type;
448
+ },
449
+ handlerAfterBindCard(res){
450
+ //已绑定卡券处理
451
+ if(res.pop_info && res.pop_info.pop_code === '1001'){
452
+ this.handleBindConfirm();
453
+ return;
454
+ }
455
+ let path = this.getUrlCallback(this.my_card_url || this.backUrl);
456
+ //有优惠券处理
457
+ if(this.hasCon){
458
+ this.toShowCouponDialog();
459
+ this.$bus.$on("onCloseConDialog",(container_id) => {
460
+ if(container_id === this.hasCon){
461
+ this.$xdUniHelper.redirectTo({
462
+ url: path,
463
+ });
464
+ }
465
+ })
466
+ }
467
+
468
+ //票券绑定成功
469
+ else{
470
+ this.$xdAlert({
471
+ content: "票券绑定成功",
472
+ close: () => {
473
+ this.$xdUniHelper.redirectTo({
474
+ url: path,
475
+ });
476
+ },
477
+ });
478
+ }
479
+ },
480
+ //卡券已被自己绑定时的弹框
481
+ handleBindConfirm(){
482
+ this.$xdConfirm({
483
+ styles: this.styles,
484
+ width: '90%',
485
+ content: '您已绑定该票券,无需再次绑定',
486
+ confirmText: '我的票券',
487
+ cancelText: '返回',
488
+ showClose: false,
489
+ success: (res) => {
490
+ if (res.confirm) {
491
+ let path = this.getUrlCallback(this.my_card_url || this.backUrl);
492
+ this.$xdUniHelper.redirectTo({ url: path});
493
+ }else{
494
+ }
495
+ }
496
+ })
497
+ },
498
+ //绑定实体券
499
+ async toBindCardTicket(){
500
+ console.log(this.form, 'this.form')
501
+ const { card_password, card_number, valid_code } = this.form;
502
+ if(!valid_code) return uni.showToast({
503
+ title: '请输入验证码',
504
+ icon: "none"
505
+ })
506
+ await this.checkValidToken();
507
+
508
+ jfbRootExec("pwdCardBind", {
509
+ vm: this,
510
+ data: {
511
+ card_password: card_password,
512
+ card_number: card_number + "",
513
+ is_show_pop: "Y"
514
+ }
515
+ }).then(res => {
516
+ this.handlerAfterBindCard(res);
517
+ })
518
+ },
519
+ //绑定电子码票券
520
+ toBindCardDigital(){
521
+ const { code } = this.form;
522
+
523
+ if(!code) return "";
524
+ jfbRootExec("pwdCardBind", {
525
+ vm: this,
526
+ data: {
527
+ card_password: code,
528
+ is_show_pop: "Y"
529
+ }
530
+ }).then(res => {
531
+ this.handlerAfterBindCard(res);
532
+ })
533
+ },
534
+ checkValidToken(){
535
+ const { valid_code } = this.form;
536
+ let token = this.valid_token;
537
+ return new Promise((r,j) => {
538
+ jfbRootExec("checkValidCode", {
539
+ vm: this,
540
+ data: {
541
+ token,
542
+ valid_code
543
+ }
544
+ }).then(res => {
545
+ if(res.is_valid){
546
+ r();
547
+ }else{
548
+ uni.showToast({
549
+ title: '验证码错误',
550
+ duration: 2000,
551
+ icon: "none"
552
+ });
553
+ this.switchValidToken();
554
+ j();
555
+ }
556
+ })
557
+ })
558
+ },
559
+ switchValidToken(){
560
+ let valid_token = this.$xdUniHelper.randomChar(20);
561
+ this.valid_token = valid_token;
562
+ },
563
+ doScanCode(){
564
+ // #ifdef H5
565
+ this.jwxSDK.scanQRCode({
566
+ needResult: 1,
567
+ success: res => {
568
+ this.$set(this.form, 'card_number', res.resultStr)
569
+ }
570
+ })
571
+ // #endif
572
+ // #ifdef MP
573
+ uni.scanCode({
574
+ success: res => {
575
+ this.$set(this.form, 'card_number', res.result)
576
+ }
577
+ })
578
+ // #endif
579
+ },
423
580
  onJfbScroll(options) {
424
- console.log('event.onJfbScroll', options)
581
+ // console.log('event.onJfbScroll', options)
425
582
  },
426
583
  onJfbReachBottom(options) {
427
584
  console.log('event.onJfbReachBottom', options)
@@ -438,9 +595,12 @@
438
595
  onJfbUpdate(...data) {
439
596
  console.log('event.onJfbUpdate', data)
440
597
  },
441
- onJfbCustomEvent(options) {
442
- console.log('event.onJfbReachBottom', options)
443
- },
598
+ onJfbCustomEvent({action, data}){
599
+ if(action === 'baseConDialog@hasCon'){
600
+ this.hasCon = data;
601
+ }
602
+ console.log('onJfbCustomEvent',action, data);
603
+ }
444
604
  }
445
605
  }
446
606
 
@@ -1,13 +1,23 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
-
5
- getTfkByIdFilmSquate:{},
6
-
7
- updateTfkFilmPaiqiDate:{},
8
-
9
- removeTfkFilmAddress:{},
10
-
11
- addTfkFilmcart:{},
12
-
4
+ getByPwdCardDetail: {
5
+ "card_number": "101001000005195",
6
+ "card_point": 0,
7
+ "card_type_name": "聚福宝",
8
+ "end_time": "2024-10-31 23:59:59",
9
+ "card_status": "Y",
10
+ "card_status_name": "开启",
11
+ "unit": "点",
12
+ "main_product_name": "",
13
+ "is_exchange": "N",
14
+ "is_expired":'Y',
15
+ "request_id": "741c41d86c5ae0cf",
16
+ "main_business_code_name": "蛋糕(勿改)",
17
+ "other_card_point": 4073,
18
+ },
19
+ pwdCardBind: { "id": 20, "request_id": "91f76bd11d5889be" },
20
+ qrcodeCardBind: {},
21
+ getByQrCardDetail: {},
22
+ qrCardBind: {},
13
23
  }