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,349 +13,31 @@
13
13
  <view class="jfb-base-tfk-card-bind__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view class="jfb-base-tfk-card-bind__body" :style="{
17
- '--form-border-color': formBorderColor,
18
- '--form-border-width': formBorderWidth + 'px',
19
- '--form-input-padding': inputPadding + 'px',
20
- '--label-font-size': ($rpxNum * parseInt(labelFont.fontSize)) + 'px',
21
- '--label-font-color': labelFont.color,
22
- '--label-font-weight': labelFont.fontWeight,
23
- '--content-font-size': ($rpxNum * parseInt(contentFont.fontSize)) + 'px',
24
- '--content-font-color': contentFont.color,
25
- '--content-font-weight': contentFont.fontWeight,
26
- '--placeholder-font-size': ($rpxNum * parseInt(placeholderFont.fontSize)) + 'px',
27
- '--placeholder-font-color': placeholderFont.color,
28
- '--placeholder-font-weight': placeholderFont.fontWeight,
29
- '--ticket-icon-size': ($rpxNum * parseInt(ticketIcon.fontSize)) + 'px',
30
- '--password-icon-size': ($rpxNum * parseInt(passwordIcon.fontSize)) + 'px',
31
- '--valid-icon-size': ($rpxNum * parseInt(validCodeIcon.fontSize)) + 'px',
32
- '--digital-icon-size': ($rpxNum * parseInt(digitalCodeIcon.fontSize)) + 'px',
33
- '--digital-border-radius': ($rpxNum * Number(digitalCodeRadius)) + 'px',
34
- '--digital-border-color': digitalCodeColor
35
- }">
36
- <view class="menu_wrap" :style="menuBoxStyle">
37
- <view class="menu_list">
38
- <view class="menu_item" @click="switchShowType('ticket')">
39
- <view class="menu_inner" :class="menuShowType"
40
- :style="[menuType == 'ticket' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">实体券</view>
41
- </view>
42
- <view class="menu_item" @click="switchShowType('code')">
43
- <view class="menu_inner" :class="menuShowType"
44
- :style="[menuType == 'code' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">电子码</view>
45
- </view>
46
- </view>
47
- </view>
48
- <view v-if="menuType === 'ticket'" class="form_wrap" :style="cardFormStyle">
49
- <template v-if="menuType === 'ticket'">
50
- <xd-form :label-align="labelAlign"
51
- :key="formRenderKey"
52
- :labelPosition="labelPosition"
53
- :border="true"
54
- paddingBetween="0"
55
- >
56
- <xd-form-item
57
- class="form-item ticket_item"
58
- :class="[inputStyle]"
59
- :label="labelShow ==='N'?'':'票券号码'"
60
- :labelWidth="labelWidth"
61
- :leftIcon="ticketIcon.icon"
62
- :iconColor="ticketIcon.color"
63
- content-align="left"
64
- >
65
- <view class="align-center">
66
- <xd-form-input
67
- v-model="form.card_number"
68
- placeholder="请输入票券号"
69
- />
70
- <view>
71
- <xd-font-icon :icon="scanIcon.icon || 'iconsaoma'"
72
- :color="scanIcon.color"
73
- :style="{fontSize: scanIcon.fontSize}"
74
- ></xd-font-icon>
75
- </view>
76
- </view>
77
- </xd-form-item>
78
- <xd-form-item
79
- class="form-item password_item"
80
- :class="[inputStyle]"
81
- :label="labelShow ==='N'?'':'票券密码'"
82
- :labelWidth="labelWidth"
83
- :leftIcon="passwordIcon.icon"
84
- :iconColor="passwordIcon.color"
85
- content-align="left"
86
- >
87
- <xd-form-input type="password" placeholder="请输入票券密码" v-model="form.card_password" />
88
- </xd-form-item>
89
- <xd-form-item
90
- class="form-item valid_item"
91
- :class="[inputStyle]"
92
- style="border-top: none;"
93
- :label="labelShow ==='N'?'':'验证号码'"
94
- :labelWidth="labelWidth"
95
- :leftIcon="validCodeIcon.icon"
96
- :iconColor="validCodeIcon.color"
97
- content-align="left"
98
- lastBorder
99
- >
100
- <view class="align-center">
101
- <xd-form-input
102
- v-model="form.valid_code"
103
- placeholder="请输入验证码"
104
- />
105
- <view class="form_valid_code">
106
- <image
107
- style="width: 100%;height:100%"
108
- :src="validImageAPIUrl + '?image_width=160&image_height=50&token='+ valid_token"
109
- />
110
- </view>
111
- </view>
112
- </xd-form-item>
113
- </xd-form>
114
- <view :style="btnWrapStyle">
115
- <xd-button type="primary"
116
- :radius="btnRadius + 'rpx'"
117
- @click="toBindCardTicket"
118
- >
119
- <xd-font-icon :icon="btnIcon.icon"
120
- style="display: inline-flex;margin-right: 12rpx;"
121
- :color="btnIcon.color"
122
- :style="{fontSize: btnIcon.fontSize}"
123
- ></xd-font-icon>
124
- 确定
125
- </xd-button>
126
- </view>
127
- </template>
128
- </view>
129
- <view v-else class="form_wrap" :style="digitalFormStyle">
130
- <xd-form :key="formRenderKey"
131
- label-align="left"
132
- labelPosition="left"
133
- :border="true"
134
- paddingBetween="0"
135
- >
136
- <xd-form-item class="form-item digital_item"
137
- label=""
138
- :labelWidth="digitalCodeLabelWidth"
139
- :leftIcon="digitalCodeIcon.icon"
140
- :iconColor="digitalCodeIcon.color"
141
- content-align="left"
142
- >
143
- <xd-form-input prefixIcon="1" placeholder="请输入票券号" v-model="form.code" />
144
- </xd-form-item>
145
- </xd-form>
146
- <view :style="digitalBtnWrapStyle">
147
- <xd-button type="primary"
148
- :radius="btnRadius + 'rpx'"
149
- @click="toBindCardDigital"
150
- >
151
- <xd-font-icon :icon="btnIcon.icon"
152
- style="display: inline-flex;margin-right: 12rpx;"
153
- :color="btnIcon.color"
154
- :style="{fontSize: btnIcon.fontSize}"
155
- ></xd-font-icon>
156
- 确定
157
- </xd-button>
158
- </view>
159
- </view>
160
- <view :style="tipBoxStyle" v-html="tips"></view>
16
+ <view class="jfb-base-tfk-card-bind__body">
17
+ <view>测试插件( {{containerId}} )</view>
161
18
  </view>
162
19
  </view>
163
20
  </template>
164
21
 
165
22
  <script>
166
- import XdButton from "@/components/XdButton/XdButton";
167
- import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox";
168
- import XdFormInput from "@/components/XdFormInput/XdFormInput";
169
- import XdForm from "@/components/XdForm/XdForm";
170
- import XdFormItem from "@/components/XdFormItem/XdFormItem";
171
23
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
172
24
  import { jfbRootExec } from "@/utils/xd.event";
173
25
  import JfbBaseTfkCardBindMixin from "./JfbBaseTfkCardBindMixin";
174
26
  import { getContainerPropsValue } from "@/utils/xd.base";
175
27
  import componentsMixins from "@/mixins/componentsMixins";
176
28
  import extsMixins from "@/mixins/extsMixins";
177
- import { mapState } from "vuex";
178
29
  export default {
179
30
  name: "JfbBaseTfkCardBind",
180
31
  components: {
181
- XdFontIcon,
182
- XdButton,
183
- XdFormCheckbox,
184
- XdFormInput,
185
- XdFormItem,
186
- XdForm,
32
+ XdFontIcon
187
33
  },
188
34
  mixins: [
189
35
  componentsMixins, extsMixins, JfbBaseTfkCardBindMixin
190
36
  ],
191
37
  data() {
192
38
  return {
193
- menuType: "ticket", //ticket,code
194
- form: {},
195
- validImageAPIUrl: "",
196
- valid_token: "",
197
- formRenderKey: "formRenderKey",
198
- hasCon: "", //是否有优惠券
199
-
200
- //todo
201
- tips: "",
202
- labelWidth: 180,
203
- labelAlign: "left",
204
- labelPosition: "left",
205
- inputStyle: "linear", //输入框样式 linear:线性 face: 面性
206
- formBorderColor: "#F9F9F9", //
207
- formBorderWidth: 1, //表单边框宽度
208
-
209
- formPadding: {
210
- top: 0,
211
- left: 0,
212
- right: 0,
213
- bottom: 0
214
- },
215
- digitalFormMargin: {},
216
- menuPadding: {
217
- top: 0,
218
- left: 0,
219
- right: 0,
220
- bottom: 0
221
- },
222
- menuBtnPadding: {},
223
-
224
- passwordIcon: {},
225
- validCodeIcon: {},
226
- btnMargin: {},
227
- btnRadius: 0,
228
- tipBgColor: "",
229
- tipPadding: {},
230
- menuTabColor: {},
231
- menuShowType: "text",
232
- menuBorderWidth: 1,
233
- labelShow: "Y",
234
- inputPadding: "20",
235
- labelFont: { //表单label字体
236
- color: "#333",
237
- fontSize: "24rpx",
238
- fontWeight: "normal",
239
- },
240
- contentFont: { //表单内容字体
241
- color: "#333",
242
- fontSize: "24rpx",
243
- fontWeight: "normal",
244
- },
245
- placeholderFont: {
246
- color: "#d4d4d4",
247
- fontSize: "24rpx",
248
- fontWeight: "normal",
249
- },
250
- scanIcon: {},
251
- ticketIcon: {},
252
- btnIcon: {},
253
- digitalCodeIcon: {},
254
- digitalBtnMargin: {},
255
- digitalCodeLabelWidth: "",
256
- digitalCodeRadius: 0,
257
- digitalCodeColor: "",
258
- my_card_url: "",
259
- backUrl: "",
260
- }
261
- },
262
- computed: {
263
- ...mapState({
264
- brandInfo: state => state.brandInfo
265
- }),
266
- cardFormStyle(){
267
- let padding = `${this.checkValue(this.formPadding.top, 20)}rpx`;
268
- padding = `${padding} ${this.checkValue(this.formPadding.right, 20)}rpx`;
269
- padding = `${padding} ${this.checkValue(this.formPadding.bottom, 20)}rpx`;
270
- padding = `${padding} ${this.checkValue(this.formPadding.left, 20)}rpx`;
271
-
272
- return this.styleObjectToString({
273
- // background: this.formBgColor,
274
- padding: padding,
275
- })
276
- },
277
- digitalFormStyle(){
278
- let padding = `${this.checkValue(this.digitalFormMargin.top, 20)}rpx`;
279
- padding = `${padding} ${this.checkValue(this.digitalFormMargin.right, 20)}rpx`;
280
- padding = `${padding} ${this.checkValue(this.digitalFormMargin.bottom, 20)}rpx`;
281
- padding = `${padding} ${this.checkValue(this.digitalFormMargin.left, 20)}rpx`;
282
39
 
283
- return this.styleObjectToString({
284
- padding: padding,
285
- })
286
- },
287
- menuBoxStyle(){
288
- let padding = `${this.checkValue(this.menuPadding.top, 20)}rpx`;
289
- padding = `${padding} ${this.checkValue(this.menuPadding.right, 20)}rpx`;
290
- padding = `${padding} ${this.checkValue(this.menuPadding.bottom, 20)}rpx`;
291
- padding = `${padding} ${this.checkValue(this.menuPadding.left, 20)}rpx`;
292
-
293
- return this.styleObjectToString({
294
- // background: this.formBgColor,
295
- padding: padding,
296
- })
297
- },
298
- btnWrapStyle(){
299
- let padding = `${this.checkValue(this.btnMargin.top, 20)}rpx`;
300
- padding = `${padding} ${this.checkValue(this.btnMargin.right, 20)}rpx`;
301
- padding = `${padding} ${this.checkValue(this.btnMargin.bottom, 20)}rpx`;
302
- padding = `${padding} ${this.checkValue(this.btnMargin.left, 20)}rpx`;
303
- return this.styleObjectToString({
304
- padding: padding,
305
- })
306
- },
307
- digitalBtnWrapStyle(){
308
- let padding = `${this.checkValue(this.digitalBtnMargin.top, 20)}rpx`;
309
- padding = `${padding} ${this.checkValue(this.digitalBtnMargin.right, 20)}rpx`;
310
- padding = `${padding} ${this.checkValue(this.digitalBtnMargin.bottom, 20)}rpx`;
311
- padding = `${padding} ${this.checkValue(this.digitalBtnMargin.left, 20)}rpx`;
312
- return this.styleObjectToString({
313
- padding: padding,
314
- })
315
- },
316
- tipBoxStyle(){
317
- let padding = `${this.checkValue(this.tipPadding.top, 20)}rpx`;
318
- padding = `${padding} ${this.checkValue(this.tipPadding.right, 20)}rpx`;
319
- padding = `${padding} ${this.checkValue(this.tipPadding.bottom, 20)}rpx`;
320
- padding = `${padding} ${this.checkValue(this.tipPadding.left, 20)}rpx`;
321
- return this.styleObjectToString({
322
- background: this.tipBgColor,
323
- padding: padding,
324
- fontSize: '24rpx',
325
- })
326
- },
327
- menuItemBoxStyle(){
328
- let padding = `${this.checkValue(this.menuBtnPadding.top, 20)}rpx`;
329
- padding = `${padding} ${this.checkValue(this.menuBtnPadding.right, 20)}rpx`;
330
- padding = `${padding} ${this.checkValue(this.menuBtnPadding.bottom, 20)}rpx`;
331
- padding = `${padding} ${this.checkValue(this.menuBtnPadding.left, 20)}rpx`;
332
- return this.styleObjectToString({
333
- padding
334
- })
335
- },
336
- menuItemStyle(){
337
- let styleObj = {
338
- color: this.menuTabColor['color'] || '#333',
339
- background: this.menuTabColor['bgColor'] || '#fff',
340
- fontSize: this.menuTabColor['fontSize'] || '30rpx',
341
- fontWeight: this.menuTabColor['fontWeight'] || 'normal',
342
- }
343
-
344
- return this.styleObjectToString(styleObj)
345
- },
346
- menuItemActiveStyle(){
347
- let defaultTextColor = '#ff5a39';
348
- let styleActiveObj = {
349
- color: this.menuTabColor['actColor'] || defaultTextColor,
350
- background: this.menuTabColor['actBgColor'] || '#fff',
351
- fontSize: this.menuTabColor['actFontSize'] || '30rpx',
352
- fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
353
- }
354
- if(this.menuShowType === 'text'){
355
- styleActiveObj['borderBottom'] = `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`;
356
- }else{
357
- }
358
- return this.styleObjectToString(styleActiveObj)
40
+ //todo
359
41
  }
360
42
  },
361
43
  watch: {
@@ -366,191 +48,34 @@
366
48
  },
367
49
  created() {
368
50
  this.init(this.container);
369
- this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
370
- this.valid_token = this.$xdUniHelper.randomChar(20);
51
+
371
52
  //todo
372
53
  },
373
54
  methods: {
374
55
  onJfbLoad(options) {
375
56
 
57
+ // jfbRootExec('baiduUserLogin', {
58
+
59
+ // vm: this,// data: {
60
+
61
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
62
+
63
+ // }
64
+
65
+ // }).then().catch()
376
66
  },
377
67
  /**
378
68
  * @description 监听事件变化
379
69
  * @param container {object} 业务组件对象自己
380
70
  */
381
- init(value) {
382
- this.previewCurrent = getContainerPropsValue(value, "content.previewCurrent", 'ticket');
383
- this.tips = getContainerPropsValue(value, "content.tips", '');
384
- this.formPadding = getContainerPropsValue(value, "content.formPadding", {top: 20, left: 20, right: 20, bottom: 20});
385
- this.digitalFormMargin = getContainerPropsValue(value, "content.digitalFormMargin", {top: 20, left: 20, right: 20, bottom: 20});
386
- this.menuPadding = getContainerPropsValue(value, "content.menuPadding", {top: 20, left: 20, right: 20, bottom: 20});
387
- this.menuBtnPadding = getContainerPropsValue(value, "content.menuBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
388
- this.labelAlign = getContainerPropsValue(value, "content.labelAlign", 'left');
389
- this.labelPosition = getContainerPropsValue(value, "content.labelPosition", 'left');
390
- this.labelWidth = getContainerPropsValue(value, "content.labelWidth", '180');
391
- this.ticketIcon = getContainerPropsValue(value, "content.ticketIcon", {});
392
- this.passwordIcon = getContainerPropsValue(value, "content.passwordIcon", {});
393
- this.validCodeIcon = getContainerPropsValue(value, "content.validCodeIcon", {});
394
- this.btnMargin = getContainerPropsValue(value, "content.btnMargin", {});
395
- this.btnRadius = getContainerPropsValue(value, "content.btnRadius", 0);
396
- this.tipBgColor = getContainerPropsValue(value, "content.tipBgColor", '#fff');
397
- this.tipPadding = getContainerPropsValue(value, "content.tipPadding", {top: 20, left: 20, right: 20, bottom: 20});
398
- this.menuTabColor = getContainerPropsValue(value, "content.menuTabColor", {});
399
- this.menuShowType = getContainerPropsValue(value, "content.menuShowType", 'text');
400
- this.menuBorderWidth = getContainerPropsValue(value, "content.menuBorderWidth", 1);
401
- this.inputStyle = getContainerPropsValue(value, "content.inputStyle", 'linear');
402
- this.formBorderColor = getContainerPropsValue(value, "content.formBorderColor", '#F9F9F9');
403
- this.formBorderWidth = getContainerPropsValue(value, "content.formBorderWidth", '1');
404
- this.labelShow = getContainerPropsValue(value, "content.labelShow", true);
405
- this.inputPadding = getContainerPropsValue(value, "content.inputPadding", 20);
406
- this.labelFont = getContainerPropsValue(value, "content.labelFont", {});
407
- this.contentFont = getContainerPropsValue(value, "content.contentFont", {});
408
- this.placeholderFont = getContainerPropsValue(value, "content.placeholderFont", {});
409
- this.scanIcon = getContainerPropsValue(value, "content.scanIcon", {});
410
- this.btnIcon = getContainerPropsValue(value, "content.btnIcon", {});
411
- this.digitalCodeIcon = getContainerPropsValue(value, "content.digitalCodeIcon", {});
412
- this.digitalBtnMargin = getContainerPropsValue(value, "content.digitalBtnMargin", {});
413
- this.digitalCodeLabelWidth = getContainerPropsValue(value, "content.digitalCodeLabelWidth", '100');
414
- this.digitalCodeRadius = getContainerPropsValue(value, "content.digitalCodeRadius", '0');
415
- this.digitalCodeColor = getContainerPropsValue(value, "content.digitalCodeColor", '#dddddd');
416
- this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
417
- this.backUrl = getContainerPropsValue(this.container, 'content.back_url', { value: "" }).value;
71
+ init(container) {
418
72
 
419
- console.log(this.digitalCodeRadius, "digitalCodeRadius");
73
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
420
74
 
421
- if(this.inputStyle === 'face'){
422
- this.labelPosition = 'left';
423
- this.labelAlign = 'left';
424
- }
425
- if(this.$configProject.isPreview){
426
- this.menuType = this.previewCurrent;
427
- this.formRenderKey = Date.now();
428
- }
429
- },
430
- toShowCouponDialog(){
431
- if(this.info){
432
- jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.form.card_number})
433
- }
434
- },
435
- switchShowType(type){
436
- this.menuType = type;
437
- },
438
- handlerAfterBindCard(res){
439
- //已绑定卡券处理
440
- if(res.pop_info && res.pop_info.pop_code === '1001'){
441
- this.handleBindConfirm();
442
- return;
443
- }
444
- let path = this.getUrlCallback(this.my_card_url || this.backUrl);
445
- //有优惠券处理
446
- if(this.hasCon){
447
- this.toShowCouponDialog();
448
- this.$bus.$on("onCloseConDialog",(container_id) => {
449
- if(container_id === this.hasCon){
450
- this.$xdUniHelper.redirectTo({
451
- url: path,
452
- });
453
- }
454
- })
455
- }
456
-
457
- //票券绑定成功
458
- else{
459
- this.$xdAlert({
460
- content: "票券绑定成功",
461
- close: () => {
462
- this.$xdUniHelper.redirectTo({
463
- url: path,
464
- });
465
- },
466
- });
467
- }
468
- },
469
- //卡券已被自己绑定时的弹框
470
- handleBindConfirm(){
471
- this.$xdConfirm({
472
- styles: this.styles,
473
- width: '90%',
474
- content: '您已绑定该票券,无需再次绑定',
475
- confirmText: '我的票券',
476
- cancelText: '返回',
477
- showClose: false,
478
- success: (res) => {
479
- if (res.confirm) {
480
- let path = this.getUrlCallback(this.my_card_url || this.backUrl);
481
- this.$xdUniHelper.redirectTo({ url: path});
482
- }else{
483
- }
484
- }
485
- })
486
- },
487
- //绑定实体券
488
- async toBindCardTicket(){
489
- console.log(this.form, 'this.form')
490
- const { card_password, card_number, valid_code } = this.form;
491
- if(!valid_code) return uni.showToast({
492
- title: '请输入验证码',
493
- icon: "none"
494
- })
495
- await this.checkValidToken();
496
-
497
- jfbRootExec("pwdCardBind", {
498
- vm: this,
499
- data: {
500
- card_password: card_password,
501
- card_number: card_number + "",
502
- is_show_pop: "Y"
503
- }
504
- }).then(res => {
505
- this.handlerAfterBindCard(res);
506
- })
507
- },
508
- //绑定电子码票券
509
- toBindCardDigital(){
510
- const { code } = this.form;
511
-
512
- if(!code) return "";
513
- jfbRootExec("pwdCardBind", {
514
- vm: this,
515
- data: {
516
- card_password: code,
517
- is_show_pop: "Y"
518
- }
519
- }).then(res => {
520
- this.handlerAfterBindCard(res);
521
- })
522
- },
523
- checkValidToken(){
524
- const { valid_code } = this.form;
525
- let token = this.valid_token;
526
- return new Promise((r,j) => {
527
- jfbRootExec("checkValidCode", {
528
- vm: this,
529
- data: {
530
- token,
531
- valid_code
532
- }
533
- }).then(res => {
534
- if(res.is_valid){
535
- r();
536
- }else{
537
- uni.showToast({
538
- title: '验证码错误',
539
- duration: 2000,
540
- icon: "none"
541
- });
542
- this.switchValidToken();
543
- j();
544
- }
545
- })
546
- })
547
- },
548
- switchValidToken(){
549
- let valid_token = this.$xdUniHelper.randomChar(20);
550
- this.valid_token = valid_token;
75
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
551
76
  },
552
77
  onJfbScroll(options) {
553
- // console.log('event.onJfbScroll', options)
78
+ console.log('event.onJfbScroll', options)
554
79
  },
555
80
  onJfbReachBottom(options) {
556
81
  console.log('event.onJfbReachBottom', options)
@@ -567,12 +92,9 @@
567
92
  onJfbUpdate(...data) {
568
93
  console.log('event.onJfbUpdate', data)
569
94
  },
570
- onJfbCustomEvent({action, data}){
571
- if(action === 'baseConDialog@hasCon'){
572
- this.hasCon = data;
573
- }
574
- console.log('onJfbCustomEvent',action, data);
575
- }
95
+ onJfbCustomEvent(options) {
96
+ console.log('event.onJfbReachBottom', options)
97
+ },
576
98
  }
577
99
  }
578
100
 
@@ -580,99 +102,10 @@
580
102
 
581
103
  <style scoped lang="less">
582
104
  @import "./JfbBaseTfkCardBindLess.less";
583
- .align-center{
584
- display: flex;
585
- align-items: center;
586
- }
587
105
 
588
106
  .jfb-base-tfk-card-bind {
589
107
  &__body{
590
- .form-item {
591
- ::v-deep &.uni-forms-item {
592
- .uni-input-input{
593
- font-size: var(--content-font-size);
594
- color: var(--content-font-color);
595
- font-weight: var(--content-font-weight);
596
- }
597
- .label-text {
598
- font-size: var(--label-font-size);
599
- color: var(--label-font-color);
600
- font-weight: var(--label-font-weight);
601
- }
602
- .uni-easyinput__placeholder-class{
603
- font-size: var(--placeholder-font-size);
604
- color: var(--placeholder-font-color);
605
- font-weight: var(--placeholder-font-weight);
606
- }
607
- }
608
- ::v-deep &.uni-forms-item--border{
609
- padding: var(--form-input-padding) 0;
610
- }
611
- &.linear{
612
- ::v-deep &.uni-forms-item--border{
613
- border-color: var(--form-border-color) !important;
614
- border-width: var(--form-border-width) !important;
615
- }
616
- }
617
- &.face{
618
- ::v-deep .uni-forms-item__box{
619
- background: #F7F7F7;
620
- border-radius: 16rpx;
621
- padding-right: 20rpx;
622
- }
623
- ::v-deep &.uni-forms-item--border{
624
- border: none;
625
- }
626
- }
627
- &.ticket_item{
628
- ::v-deep .label-icon{
629
- font-size: var(--ticket-icon-size) !important;
630
- }
631
- }
632
- &.password_item{
633
- ::v-deep .label-icon{
634
- font-size: var(--password-icon-size) !important;
635
- }
636
- }
637
- &.valid_item{
638
- ::v-deep .label-icon{
639
- font-size: var(--valid-icon-size) !important;
640
- }
641
- }
642
- &.digital_item{
643
- ::v-deep .label-icon{
644
- font-size: var(--digital-icon-size) !important;
645
- }
646
- ::v-deep .uni-forms-item__inner{
647
- padding-bottom: 0% !important;
648
- border: 1px solid var(--digital-border-color);
649
- border-radius: var(--digital-border-radius);
650
- }
651
- }
652
- }
653
- .menu_wrap{
654
- .menu_list{
655
- display: flex;
656
- .menu_item{
657
- flex: 1;
658
- text-align: center;
659
-
660
- .menu_inner{
661
- display: inline-block;
662
- &.button{
663
- border-radius: 50rpx;
664
- }
665
- }
666
- }
667
- }
668
- }
669
- .form_valid_code{
670
- width: 160rpx;
671
- height: 50rpx;
672
- background: #DDD;
673
- border-radius: 8rpx;
674
- overflow: hidden;
675
- }
108
+
676
109
  }
677
110
  }
678
111
  </style>