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