jufubao-base 1.0.169 → 1.0.170
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 +1157 -510
- 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
|
@@ -14,30 +14,315 @@
|
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
16
|
<view class="jfb-base-tfk-card-detail__body">
|
|
17
|
-
<view
|
|
17
|
+
<view v-if="curModule === 'main'">
|
|
18
|
+
<view class="card_wrap" :style="cardWrapBoxStyle">
|
|
19
|
+
<view class="ticket_card" :style="cardBoxStyle">
|
|
20
|
+
<view class="card_top">
|
|
21
|
+
<view class="card_point_name">
|
|
22
|
+
<view class="_point">
|
|
23
|
+
<xd-unit
|
|
24
|
+
:unitFontSize="24"
|
|
25
|
+
:fontSize="40"
|
|
26
|
+
:price="cardInfo.card_point"
|
|
27
|
+
:isOld="false"
|
|
28
|
+
:colorNew="cardFontColor"
|
|
29
|
+
:unit="cardInfo.unit || ''"
|
|
30
|
+
></xd-unit>
|
|
31
|
+
</view>
|
|
32
|
+
<view class="_name">{{ cardInfo.card_type_name }}</view>
|
|
33
|
+
</view>
|
|
34
|
+
<view v-if="cardInfo.other_card_point && cardInfo.card_point_type !== 1">
|
|
35
|
+
<view class="card_deduct">
|
|
36
|
+
购买其他物品可抵扣:{{ cardInfo.other_card_point }}
|
|
37
|
+
</view>
|
|
38
|
+
</view>
|
|
39
|
+
</view>
|
|
40
|
+
<view class="card_bottom">
|
|
41
|
+
<view>ID:{{ cardInfo.card_number}}</view>
|
|
42
|
+
<view>{{ cardInfo.end_time }}到期</view>
|
|
43
|
+
</view>
|
|
44
|
+
</view>
|
|
45
|
+
</view>
|
|
46
|
+
<view class="business_login" :style="businessWrapBox">
|
|
47
|
+
<view v-if="showBusinessList === 'Y'">
|
|
48
|
+
<view class="bus_title">进入业务板块</view>
|
|
49
|
+
<view class="bus_list">
|
|
50
|
+
<view class="bus_item" v-for="(item, i) in businessList" :key="i"
|
|
51
|
+
:style="businessItemBox"
|
|
52
|
+
@click="handleBusinessLogin(item)"
|
|
53
|
+
>
|
|
54
|
+
<view class="bus_img">
|
|
55
|
+
<image :src="item.image_url" />
|
|
56
|
+
</view>
|
|
57
|
+
<view class="bus_name">{{item.entry_name}}</view>
|
|
58
|
+
</view>
|
|
59
|
+
</view>
|
|
60
|
+
</view>
|
|
61
|
+
<view v-else>
|
|
62
|
+
<xd-button type="primary" @click="doCardLogin()">立即使用</xd-button>
|
|
63
|
+
</view>
|
|
64
|
+
</view>
|
|
65
|
+
<view class="list_col_wrap" :style="listColWrapBoxStyle">
|
|
66
|
+
<view class="list_item" :style="listColItemStyle" @click="switchModule('rule')">
|
|
67
|
+
<view class="list_title">使用规则</view>
|
|
68
|
+
<view class="list_icon">
|
|
69
|
+
<xd-font-icon icon="iconxiangyou_xian" size="24"></xd-font-icon>
|
|
70
|
+
</view>
|
|
71
|
+
</view>
|
|
72
|
+
<view class="list_item" :style="listColItemStyle" @click="switchModule('pickup')">
|
|
73
|
+
<view class="list_title">提货码</view>
|
|
74
|
+
<view class="list_icon">
|
|
75
|
+
<xd-font-icon icon="iconxiangyou_xian" size="24"></xd-font-icon>
|
|
76
|
+
</view>
|
|
77
|
+
</view>
|
|
78
|
+
</view>
|
|
79
|
+
</view>
|
|
80
|
+
<view v-if="curModule === 'rule'">
|
|
81
|
+
<view v-if="cardRule" v-html="cardRule" class="rule_wrap" :style="ruleDetailBoxStyle">
|
|
82
|
+
</view>
|
|
83
|
+
<view v-else class="rule_wrap" :style="ruleDetailBoxStyle">
|
|
84
|
+
使用规则暂无
|
|
85
|
+
</view>
|
|
86
|
+
</view>
|
|
87
|
+
<view v-if="curModule === 'pickup'">
|
|
88
|
+
<view class="code_wrap" :style="codeDetailBoxStyle">
|
|
89
|
+
<view class="code_title">
|
|
90
|
+
<view><xd-font-icon :icon='payPreIcon || "iconsaoma1"' size="54"></xd-font-icon></view>
|
|
91
|
+
<view class="_title">向商家付款</view>
|
|
92
|
+
</view>
|
|
93
|
+
<view class="barcode">
|
|
94
|
+
<image :src="cardInfo.barcode" mode="widthFix"></image>
|
|
95
|
+
</view>
|
|
96
|
+
<view class="qrcode" :style="qrcodeBoxStyle">
|
|
97
|
+
<image :src="cardInfo.card_qrcode"></image>
|
|
98
|
+
</view>
|
|
99
|
+
<view class="time_loop">{{ timeStr }}后自动刷新</view>
|
|
100
|
+
<view class="refresh_btn" @click="handleRefresh">
|
|
101
|
+
<xd-font-icon class="btn_icon" :icon="refreshIcon"></xd-font-icon>
|
|
102
|
+
刷新二维码
|
|
103
|
+
</view>
|
|
104
|
+
</view>
|
|
105
|
+
</view>
|
|
18
106
|
</view>
|
|
19
107
|
</view>
|
|
20
108
|
</template>
|
|
21
109
|
|
|
22
110
|
<script>
|
|
23
111
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
112
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
113
|
+
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
24
114
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
25
115
|
import JfbBaseTfkCardDetailMixin from "./JfbBaseTfkCardDetailMixin";
|
|
26
116
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
27
117
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
28
118
|
import extsMixins from "@/mixins/extsMixins";
|
|
119
|
+
import colorCardMixins from "@/mixins/colorCardMixins";
|
|
120
|
+
import getServiceUrl from '@/common/getServiceUrl'
|
|
121
|
+
import { mapState, mapActions } from "vuex";
|
|
29
122
|
export default {
|
|
30
123
|
name: "JfbBaseTfkCardDetail",
|
|
31
124
|
components: {
|
|
32
|
-
XdFontIcon
|
|
125
|
+
XdFontIcon,
|
|
126
|
+
XdButton,
|
|
127
|
+
XdUnit,
|
|
33
128
|
},
|
|
34
129
|
mixins: [
|
|
35
|
-
componentsMixins, extsMixins, JfbBaseTfkCardDetailMixin
|
|
130
|
+
componentsMixins, extsMixins, JfbBaseTfkCardDetailMixin, colorCardMixins
|
|
36
131
|
],
|
|
37
132
|
data() {
|
|
38
133
|
return {
|
|
134
|
+
curModule: "main",
|
|
135
|
+
card_number: "",
|
|
136
|
+
cardInfo: {},
|
|
137
|
+
businessList: [],
|
|
138
|
+
timeStr: "",
|
|
139
|
+
timeer: null,
|
|
140
|
+
date: 2, //时间底数
|
|
141
|
+
time: 2, //时间幂指数
|
|
142
|
+
stopTimer: false, //停止轮询
|
|
39
143
|
|
|
144
|
+
cardRule: "",
|
|
145
|
+
showBusinessList: "Y",
|
|
40
146
|
//todo
|
|
147
|
+
cardInfoMargin: {},
|
|
148
|
+
cardInfoPadding: {},
|
|
149
|
+
cardImageUrl: "",
|
|
150
|
+
cardHeight: 340,
|
|
151
|
+
cardRadius: 10,
|
|
152
|
+
bussPadding: {},
|
|
153
|
+
bussMargin: {},
|
|
154
|
+
bussTempMargin: {},
|
|
155
|
+
bussTempBgColor: "",
|
|
156
|
+
listColMargin: {},
|
|
157
|
+
listColPadding: {},
|
|
158
|
+
listColSpace: 0,
|
|
159
|
+
cardFontColor: "",
|
|
160
|
+
ruleDetailMargin: {},
|
|
161
|
+
ruleDetailPadding: {},
|
|
162
|
+
ruleDetailBgColor: "",
|
|
163
|
+
codeDetailMargin: {},
|
|
164
|
+
codeDetailPadding: {},
|
|
165
|
+
codeDetailBgColor: "",
|
|
166
|
+
qrcodeWidth: 300,
|
|
167
|
+
payPreIcon: "",
|
|
168
|
+
refreshIcon: "",
|
|
169
|
+
bussWidth: 100,
|
|
170
|
+
codeDetailRadius: 16,
|
|
171
|
+
codeDetailBorder: {},
|
|
172
|
+
codeDetailShadow: {},
|
|
173
|
+
ruleDetailFontColor: "",
|
|
174
|
+
ruleDetailRadius: 0,
|
|
175
|
+
bussTempRadius: 16,
|
|
176
|
+
listColBgColor: "",
|
|
177
|
+
listColRadius: 16,
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
computed: {
|
|
181
|
+
...mapState({
|
|
182
|
+
jwxSDK: (state) => state.jwxSDK,
|
|
183
|
+
jfbAuthorize: (state) => state.jfbAuthorize,
|
|
184
|
+
}),
|
|
185
|
+
cardWrapBoxStyle(){
|
|
186
|
+
let padding = `${this.checkValue(this.cardInfoMargin.top, 20)}rpx`;
|
|
187
|
+
padding = `${padding} ${this.checkValue(this.cardInfoMargin.right, 20)}rpx`;
|
|
188
|
+
padding = `${padding} ${this.checkValue(this.cardInfoMargin.bottom, 20)}rpx`;
|
|
189
|
+
padding = `${padding} ${this.checkValue(this.cardInfoMargin.left, 20)}rpx`;
|
|
190
|
+
|
|
191
|
+
return this.styleObjectToString({
|
|
192
|
+
padding: padding,
|
|
193
|
+
})
|
|
194
|
+
},
|
|
195
|
+
businessWrapBox(){
|
|
196
|
+
let margin = `${this.checkValue(this.bussTempMargin.top, 20)}rpx`;
|
|
197
|
+
margin = `${margin} ${this.checkValue(this.bussTempMargin.right, 20)}rpx`;
|
|
198
|
+
margin = `${margin} ${this.checkValue(this.bussTempMargin.bottom, 20)}rpx`;
|
|
199
|
+
margin = `${margin} ${this.checkValue(this.bussTempMargin.left, 20)}rpx`;
|
|
200
|
+
|
|
201
|
+
let padding = `${this.checkValue(this.bussPadding.top, 20)}rpx`;
|
|
202
|
+
padding = `${padding} ${this.checkValue(this.bussPadding.right, 20)}rpx`;
|
|
203
|
+
padding = `${padding} ${this.checkValue(this.bussPadding.bottom, 20)}rpx`;
|
|
204
|
+
padding = `${padding} ${this.checkValue(this.bussPadding.left, 20)}rpx`;
|
|
205
|
+
|
|
206
|
+
return this.styleObjectToString({
|
|
207
|
+
margin: margin,
|
|
208
|
+
padding: padding,
|
|
209
|
+
backgroundColor: this.bussTempBgColor,
|
|
210
|
+
borderRadius: this.bussTempRadius + 'rpx',
|
|
211
|
+
})
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
businessItemBox(){
|
|
215
|
+
let margin = `${this.checkValue(this.bussMargin.top, 20)}rpx`;
|
|
216
|
+
margin = `${margin} ${this.checkValue(this.bussMargin.right, 20)}rpx`;
|
|
217
|
+
margin = `${margin} ${this.checkValue(this.bussMargin.bottom, 20)}rpx`;
|
|
218
|
+
margin = `${margin} ${this.checkValue(this.bussMargin.left, 20)}rpx`;
|
|
219
|
+
return this.styleObjectToString({
|
|
220
|
+
margin: margin,
|
|
221
|
+
width: this.bussWidth + 'rpx'
|
|
222
|
+
})
|
|
223
|
+
},
|
|
224
|
+
cardBoxStyle(){
|
|
225
|
+
let style = {};
|
|
226
|
+
if(this.cardImageUrl) style = {
|
|
227
|
+
backgroundImage: `url(${this.getCardBgImage})`,
|
|
228
|
+
backgroundSize: '100%',
|
|
229
|
+
backgroundRepeat: 'no-repeat',
|
|
230
|
+
}
|
|
231
|
+
let padding = `${this.checkValue(this.cardInfoPadding.top, 20)}rpx`;
|
|
232
|
+
padding = `${padding} ${this.checkValue(this.cardInfoPadding.right, 20)}rpx`;
|
|
233
|
+
padding = `${padding} ${this.checkValue(this.cardInfoPadding.bottom, 20)}rpx`;
|
|
234
|
+
padding = `${padding} ${this.checkValue(this.cardInfoPadding.left, 20)}rpx`;
|
|
235
|
+
style = Object.assign(style, {
|
|
236
|
+
padding: padding,
|
|
237
|
+
height: this.cardHeight + 'rpx',
|
|
238
|
+
borderRadius: this.cardRadius + 'rpx',
|
|
239
|
+
color: this.cardFontColor,
|
|
240
|
+
})
|
|
241
|
+
return this.styleObjectToString(style)
|
|
242
|
+
},
|
|
243
|
+
getCardBgImage(){
|
|
244
|
+
let bg = '';
|
|
245
|
+
if(this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'object'
|
|
246
|
+
|| this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'array'
|
|
247
|
+
) {
|
|
248
|
+
if(!this.$xdUniHelper.isEmpty(this.cardImageUrl)) {
|
|
249
|
+
return getServiceUrl(this.cardImageUrl.url)
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return bg
|
|
253
|
+
},
|
|
254
|
+
listColWrapBoxStyle(){
|
|
255
|
+
let padding = `${this.checkValue(this.listColMargin.top, 20)}rpx`;
|
|
256
|
+
padding = `${padding} ${this.checkValue(this.listColMargin.right, 20)}rpx`;
|
|
257
|
+
padding = `${padding} ${this.checkValue(this.listColMargin.bottom, 20)}rpx`;
|
|
258
|
+
padding = `${padding} ${this.checkValue(this.listColMargin.left, 20)}rpx`;
|
|
259
|
+
return this.styleObjectToString({
|
|
260
|
+
padding: padding,
|
|
261
|
+
})
|
|
262
|
+
},
|
|
263
|
+
listColItemStyle(){
|
|
264
|
+
let padding = `${this.checkValue(this.listColPadding.top, 20)}rpx`;
|
|
265
|
+
padding = `${padding} ${this.checkValue(this.listColPadding.right, 20)}rpx`;
|
|
266
|
+
padding = `${padding} ${this.checkValue(this.listColPadding.bottom, 20)}rpx`;
|
|
267
|
+
padding = `${padding} ${this.checkValue(this.listColPadding.left, 20)}rpx`;
|
|
268
|
+
return this.styleObjectToString({
|
|
269
|
+
padding,
|
|
270
|
+
marginBottom: this.listColSpace + 'rpx',
|
|
271
|
+
backgroundColor: this.listColBgColor,
|
|
272
|
+
borderRadius: this.listColRadius + 'rpx',
|
|
273
|
+
})
|
|
274
|
+
},
|
|
275
|
+
ruleDetailBoxStyle(){
|
|
276
|
+
let padding = `${this.checkValue(this.ruleDetailPadding.top, 20)}rpx`;
|
|
277
|
+
padding = `${padding} ${this.checkValue(this.ruleDetailPadding.right, 20)}rpx`;
|
|
278
|
+
padding = `${padding} ${this.checkValue(this.ruleDetailPadding.bottom, 20)}rpx`;
|
|
279
|
+
padding = `${padding} ${this.checkValue(this.ruleDetailPadding.left, 20)}rpx`;
|
|
280
|
+
let margin = `${this.checkValue(this.ruleDetailMargin.top, 20)}rpx`;
|
|
281
|
+
margin = `${margin} ${this.checkValue(this.ruleDetailMargin.right, 20)}rpx`;
|
|
282
|
+
margin = `${margin} ${this.checkValue(this.ruleDetailMargin.bottom, 20)}rpx`;
|
|
283
|
+
margin = `${margin} ${this.checkValue(this.ruleDetailMargin.left, 20)}rpx`;
|
|
284
|
+
return this.styleObjectToString({
|
|
285
|
+
margin: margin,
|
|
286
|
+
padding: padding,
|
|
287
|
+
backgroundColor: this.ruleDetailBgColor,
|
|
288
|
+
color: this.ruleDetailFontColor,
|
|
289
|
+
borderRadius: this.ruleDetailRadius + 'rpx',
|
|
290
|
+
})
|
|
291
|
+
},
|
|
292
|
+
codeDetailBoxStyle(){
|
|
293
|
+
let border = "none";
|
|
294
|
+
let boxShadow = "none";
|
|
295
|
+
if(this.codeDetailBorder && this.codeDetailBorder.type === 'Y'){
|
|
296
|
+
let { width, color } = this.codeDetailBorder.value || {};
|
|
297
|
+
border = `${width || 0}rpx solid ${color || 'transparent'}`;
|
|
298
|
+
}
|
|
299
|
+
if(this.codeDetailShadow && this.codeDetailShadow.type === 'Y'){
|
|
300
|
+
let { width, color } = this.codeDetailShadow.value || {};
|
|
301
|
+
boxShadow = `0 0 ${width || 0}rpx ${color || 'transparent'}`;
|
|
302
|
+
}
|
|
303
|
+
let padding = `${this.checkValue(this.codeDetailPadding.top, 20)}rpx`;
|
|
304
|
+
padding = `${padding} ${this.checkValue(this.codeDetailPadding.right, 20)}rpx`;
|
|
305
|
+
padding = `${padding} ${this.checkValue(this.codeDetailPadding.bottom, 20)}rpx`;
|
|
306
|
+
padding = `${padding} ${this.checkValue(this.codeDetailPadding.left, 20)}rpx`;
|
|
307
|
+
let margin = `${this.checkValue(this.codeDetailMargin.top, 20)}rpx`;
|
|
308
|
+
margin = `${margin} ${this.checkValue(this.codeDetailMargin.right, 20)}rpx`;
|
|
309
|
+
margin = `${margin} ${this.checkValue(this.codeDetailMargin.bottom, 20)}rpx`;
|
|
310
|
+
margin = `${margin} ${this.checkValue(this.codeDetailMargin.left, 20)}rpx`;
|
|
311
|
+
return this.styleObjectToString({
|
|
312
|
+
margin: margin,
|
|
313
|
+
padding: padding,
|
|
314
|
+
backgroundColor: this.codeDetailBgColor,
|
|
315
|
+
borderRadius: this.codeDetailRadius + 'rpx',
|
|
316
|
+
border: border,
|
|
317
|
+
boxShadow: boxShadow,
|
|
318
|
+
})
|
|
319
|
+
},
|
|
320
|
+
qrcodeBoxStyle(){
|
|
321
|
+
|
|
322
|
+
return this.styleObjectToString({
|
|
323
|
+
width: this.qrcodeWidth + 'rpx',
|
|
324
|
+
height: this.qrcodeWidth + 'rpx',
|
|
325
|
+
})
|
|
41
326
|
}
|
|
42
327
|
},
|
|
43
328
|
watch: {
|
|
@@ -53,41 +338,227 @@
|
|
|
53
338
|
},
|
|
54
339
|
methods: {
|
|
55
340
|
onJfbLoad(options) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// vm: this,// data: {
|
|
60
|
-
|
|
61
|
-
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
62
|
-
|
|
63
|
-
// }
|
|
64
|
-
|
|
65
|
-
// }).then().catch()
|
|
341
|
+
this.card_number = options.card_number;
|
|
342
|
+
this.getCardDetail();
|
|
343
|
+
this.getContent();
|
|
66
344
|
},
|
|
67
345
|
/**
|
|
68
346
|
* @description 监听事件变化
|
|
69
347
|
* @param container {object} 业务组件对象自己
|
|
70
348
|
*/
|
|
71
|
-
init(
|
|
349
|
+
init(value) {
|
|
350
|
+
this.previewCurrent = getContainerPropsValue(value, 'content.previewCurrent', "main");
|
|
351
|
+
this.showBusinessList = getContainerPropsValue(value, 'content.showBusinessList', "Y");
|
|
352
|
+
this.cardInfoMargin = getContainerPropsValue(value, 'content.cardInfoMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
353
|
+
this.cardInfoPadding = getContainerPropsValue(value, 'content.cardInfoPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
354
|
+
this.cardImageUrl = getContainerPropsValue(value, 'content.cardImageUrl', '');
|
|
355
|
+
this.cardHeight = getContainerPropsValue(value, 'content.cardHeight', 340);
|
|
356
|
+
this.cardRadius = getContainerPropsValue(value, 'content.cardRadius', 16);
|
|
357
|
+
this.bussPadding = getContainerPropsValue(value, 'content.bussPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
358
|
+
this.bussMargin = getContainerPropsValue(value, 'content.bussMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
359
|
+
this.bussTempMargin = getContainerPropsValue(value, 'content.bussTempMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
360
|
+
this.bussTempBgColor = getContainerPropsValue(value, 'content.bussTempBgColor', 'transparent');
|
|
361
|
+
this.listColMargin = getContainerPropsValue(value, 'content.listColMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
362
|
+
this.listColPadding = getContainerPropsValue(value, 'content.listColPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
363
|
+
this.listColSpace = getContainerPropsValue(value, 'content.listColSpace', 10);
|
|
364
|
+
this.cardFontColor = getContainerPropsValue(value, 'content.cardFontColor', '#333');
|
|
365
|
+
this.ruleDetailMargin = getContainerPropsValue(value, 'content.ruleDetailMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
366
|
+
this.ruleDetailPadding = getContainerPropsValue(value, 'content.ruleDetailPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
367
|
+
this.ruleDetailBgColor = getContainerPropsValue(value, 'content.ruleDetailBgColor', '#fff');
|
|
368
|
+
this.codeDetailMargin = getContainerPropsValue(value, 'content.codeDetailMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
369
|
+
this.codeDetailPadding = getContainerPropsValue(value, 'content.codeDetailPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
370
|
+
this.codeDetailBgColor = getContainerPropsValue(value, 'content.codeDetailBgColor', '#fff');
|
|
371
|
+
this.qrcodeWidth = getContainerPropsValue(value, 'content.qrcodeWidth', 300);
|
|
372
|
+
this.payPreIcon = getContainerPropsValue(value, 'content.payPreIcon', '');
|
|
373
|
+
this.refreshIcon = getContainerPropsValue(value, 'content.refreshIcon', '');
|
|
374
|
+
this.bussWidth = getContainerPropsValue(value, 'content.bussWidth', 100);
|
|
375
|
+
this.codeDetailRadius = getContainerPropsValue(value, 'content.codeDetailRadius', 16);
|
|
376
|
+
this.codeDetailBorder = getContainerPropsValue(value, 'content.codeDetailBorder', {});
|
|
377
|
+
this.codeDetailShadow = getContainerPropsValue(value, 'content.codeDetailShadow', {});
|
|
378
|
+
this.ruleDetailFontColor = getContainerPropsValue(value, 'content.ruleDetailFontColor', '');
|
|
379
|
+
this.ruleDetailRadius = getContainerPropsValue(value, 'content.ruleDetailRadius', 0);
|
|
380
|
+
this.bussTempRadius = getContainerPropsValue(value, 'content.bussTempRadius', 16);
|
|
381
|
+
this.listColBgColor = getContainerPropsValue(value, 'content.listColBgColor', '#fff');
|
|
382
|
+
this.listColRadius = getContainerPropsValue(value, 'content.listColRadius', 16);
|
|
72
383
|
|
|
73
|
-
|
|
384
|
+
console.log(this.codeDetailBorder, 'codeDetailBorder')
|
|
74
385
|
|
|
75
|
-
|
|
386
|
+
if(this.$configProject.isPreview){
|
|
387
|
+
this.curModule = this.previewCurrent;
|
|
388
|
+
}
|
|
76
389
|
},
|
|
77
|
-
|
|
78
|
-
|
|
390
|
+
switchModule(module){
|
|
391
|
+
this.curModule = module;
|
|
79
392
|
},
|
|
80
|
-
|
|
81
|
-
|
|
393
|
+
handleBusinessLogin(item){
|
|
394
|
+
this.doCardLogin(() => {
|
|
395
|
+
this.handleClick(item);
|
|
396
|
+
})
|
|
397
|
+
},
|
|
398
|
+
doCardLogin(cb){
|
|
399
|
+
this.$xdShowLoading({});
|
|
400
|
+
jfbRootExec("loginTfkCardBind", {
|
|
401
|
+
vm: this,
|
|
402
|
+
data: {
|
|
403
|
+
card_number: this.card_number
|
|
404
|
+
}
|
|
405
|
+
}).then(res => {
|
|
406
|
+
this.$xdHideLoading();
|
|
407
|
+
//#ifdef MP-WEIXIN
|
|
408
|
+
if (this.jfbAuthorize !== null) {
|
|
409
|
+
this.jfbAuthorize.setCardToken(res);
|
|
410
|
+
}
|
|
411
|
+
//#endif
|
|
412
|
+
|
|
413
|
+
if(cb) return cb();
|
|
414
|
+
|
|
415
|
+
if (this.$configProject.isPreview) {
|
|
416
|
+
console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
|
|
417
|
+
} else {
|
|
418
|
+
this.$xdUniHelper.redirectTo({
|
|
419
|
+
url: this.settings.index
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
}).catch((res) => {
|
|
423
|
+
this.$xdHideLoading();
|
|
424
|
+
});
|
|
425
|
+
},
|
|
426
|
+
getCardDetail(){
|
|
427
|
+
jfbRootExec("getTfkCardDetail", {
|
|
428
|
+
vm: this,
|
|
429
|
+
data: {
|
|
430
|
+
card_number: this.card_number,
|
|
431
|
+
is_show_entry_settings: this.curModule === 'main' ? this.showBusinessList : "N",
|
|
432
|
+
}
|
|
433
|
+
}).then(res => {
|
|
434
|
+
this.cardInfo = Object.assign({}, res, {
|
|
435
|
+
other_card_point: res.other_card_point ? this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100) : 0
|
|
436
|
+
});
|
|
437
|
+
let businessList = this.filterNotSupportEntry(res.site_entry_settings);
|
|
438
|
+
this.businessList = businessList.filter(item => {
|
|
439
|
+
item['image_url'] = getServiceUrl(item.image_url);
|
|
440
|
+
return res.business_codes.includes(item.business_code);
|
|
441
|
+
})
|
|
442
|
+
if(!this.$configProject.isPreview) {
|
|
443
|
+
this.setIntval(res.card_qrcode_expire);
|
|
444
|
+
}else{
|
|
445
|
+
this.timeStr = "08分10秒";
|
|
446
|
+
}
|
|
447
|
+
})
|
|
448
|
+
},
|
|
449
|
+
handleClick(entry){
|
|
450
|
+
const {dir, path, host, appType} = entry['redirect_data'];
|
|
451
|
+
let regHttp = /^(\/\/|http:\/\/|https:\/\/).+$/;
|
|
452
|
+
let regSp = /(-apiuri\/v)/;
|
|
453
|
+
|
|
454
|
+
if(!appType) entry.redirect_data.appType = 'h5';
|
|
455
|
+
let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
|
|
456
|
+
|
|
457
|
+
//外站配置地址
|
|
458
|
+
if(entry.redirect_type === 'URL') {
|
|
459
|
+
if(regHttp.test(entry.redirect_data['path']) || regSp.test(entry.redirect_data['path'])) {
|
|
460
|
+
this.$xdUniHelper.redirectTo({
|
|
461
|
+
url:`${entry.redirect_data['path']}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
|
|
462
|
+
}, false)
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
console.error(`配置错误:${entry.redirect_data['path']}`);
|
|
466
|
+
throw new Error(`配置错误:${entry.redirect_data['path']}`)
|
|
467
|
+
}
|
|
468
|
+
return
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
//站内应用处理
|
|
472
|
+
let jumpUrl = path;
|
|
473
|
+
let cardPathStr = '';
|
|
474
|
+
const {deploy_dir} = this.projectAttr;
|
|
475
|
+
if(host === this.projectAttr.host && deploy_dir !== dir){
|
|
476
|
+
jumpUrl = `//${host}/${dir}${path}`;
|
|
477
|
+
//#ifdef MP-WEIXIN
|
|
478
|
+
jumpUrl = `https:${jumpUrl}`;
|
|
479
|
+
//#endif
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
//#ifdef MP-WEIXIN
|
|
483
|
+
//获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
|
|
484
|
+
if(entry.redirect_data.appType === 'h5') {
|
|
485
|
+
const custom_redirect_data = this.$xdUniHelper.checkVarType(entry['custom_redirect_data']) === 'object'?entry['custom_redirect_data']:{};
|
|
486
|
+
const cardPathObject = this.getCardPath(custom_redirect_data);
|
|
487
|
+
if(cardPathObject !== null) {
|
|
488
|
+
const {cardPath, cardSelf} =cardPathObject
|
|
489
|
+
if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
//#endif
|
|
493
|
+
|
|
494
|
+
jumpUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`;
|
|
495
|
+
console.warn(`entry.path:${jumpUrl}`);
|
|
496
|
+
if(regHttp.test(jumpUrl)) this.$xdUniHelper.redirectTo({url:jumpUrl}, false)
|
|
497
|
+
else this.$xdUniHelper.navigateTo({url:jumpUrl}, false)
|
|
498
|
+
},
|
|
499
|
+
getContent() {
|
|
500
|
+
jfbRootExec("getListBaseNewsContent", {
|
|
501
|
+
vm: this,
|
|
502
|
+
data: {
|
|
503
|
+
page_id: this.pageAttr["page_id"], //页面ID
|
|
504
|
+
container_id: this.containerId, //组件ID
|
|
505
|
+
limit: 1,
|
|
506
|
+
},
|
|
507
|
+
})
|
|
508
|
+
.then((res) => {
|
|
509
|
+
if (res.list.length > 0) {
|
|
510
|
+
if(res.list && res.list.length > 0) {
|
|
511
|
+
this.cardRule = this.$xdUniHelper.filterHtml(res.list[0].content);
|
|
512
|
+
}
|
|
513
|
+
// this.noticeStatus = true;
|
|
514
|
+
}
|
|
515
|
+
})
|
|
516
|
+
.catch((error) => {
|
|
517
|
+
console.error(error);
|
|
518
|
+
});
|
|
519
|
+
},
|
|
520
|
+
handleRefresh(){
|
|
521
|
+
clearInterval(this.timeer);
|
|
522
|
+
this.getCardDetail();
|
|
523
|
+
},
|
|
524
|
+
setIntval(time){
|
|
525
|
+
this.timeer = setInterval(() => {
|
|
526
|
+
if (time === 0) {
|
|
527
|
+
this.timeStr = "00分00秒";
|
|
528
|
+
clearInterval(this.timeer);
|
|
529
|
+
if (!this.stopTimer) this.getCardDetail();
|
|
530
|
+
} else {
|
|
531
|
+
time--;
|
|
532
|
+
let f = Math.floor(time / 60);
|
|
533
|
+
f = f < 10 ? "0" + f : f;
|
|
534
|
+
let m = time % 60;
|
|
535
|
+
m = m < 10 ? "0" + m : m;
|
|
536
|
+
this.timeStr = `${f}分${m}秒`;
|
|
537
|
+
}
|
|
538
|
+
}, 1000);
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
onJfbUnload(){
|
|
542
|
+
this.timeStr = ""
|
|
543
|
+
if (this.timeer) {
|
|
544
|
+
clearInterval(this.timeer);
|
|
545
|
+
}
|
|
82
546
|
},
|
|
83
547
|
onJfbShow(options) {
|
|
84
|
-
|
|
548
|
+
this.onJfbLoad(options)
|
|
85
549
|
},
|
|
86
550
|
onJfbHide(options) {
|
|
87
|
-
|
|
551
|
+
this.timeStr = ""
|
|
552
|
+
if (this.timeer) {
|
|
553
|
+
clearTimeout(this.timeer);
|
|
554
|
+
}
|
|
88
555
|
},
|
|
89
556
|
onJfbBack(options) {
|
|
90
|
-
|
|
557
|
+
this.timeStr = ""
|
|
558
|
+
if (this.timeer) {
|
|
559
|
+
clearTimeout(this.timeer);
|
|
560
|
+
}
|
|
561
|
+
this.$xdUniHelper.navigateBack();
|
|
91
562
|
},
|
|
92
563
|
onJfbUpdate(...data) {
|
|
93
564
|
console.log('event.onJfbUpdate', data)
|
|
@@ -105,7 +576,152 @@
|
|
|
105
576
|
|
|
106
577
|
.jfb-base-tfk-card-detail {
|
|
107
578
|
&__body{
|
|
579
|
+
.ticket_card{
|
|
580
|
+
display: flex;
|
|
581
|
+
flex-direction: column;
|
|
582
|
+
justify-content: space-between;
|
|
583
|
+
font-size: 26rpx;
|
|
584
|
+
box-sizing: border-box;
|
|
585
|
+
.card_top{
|
|
586
|
+
display: flex;
|
|
587
|
+
flex-direction: column;
|
|
588
|
+
.card_point_name{
|
|
589
|
+
display: flex;
|
|
590
|
+
justify-content: space-between;
|
|
591
|
+
align-items: center;
|
|
592
|
+
._point{
|
|
593
|
+
font-size: 40rpx;
|
|
594
|
+
font-weight: bold;
|
|
595
|
+
::v-deep .xd-unit{
|
|
596
|
+
height: auto !important;
|
|
597
|
+
font-weight: bold;
|
|
598
|
+
align-items: flex-end;
|
|
599
|
+
.xd-unit__unit{
|
|
600
|
+
line-height: 1.5 !important;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
._unit{
|
|
604
|
+
font-size: 24rpx;
|
|
605
|
+
margin-left: 4rpx;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
._name{
|
|
609
|
+
font-size: 26rpx;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
.card_deduct{
|
|
613
|
+
font-size: 26rpx;
|
|
614
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
615
|
+
display: inline-block;
|
|
616
|
+
padding: 8rpx 16rpx;
|
|
617
|
+
border-radius: 8rpx;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
.card_bottom{
|
|
621
|
+
display: flex;
|
|
622
|
+
justify-content: space-between;
|
|
623
|
+
align-items: center;
|
|
624
|
+
font-weight: 400;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
.business_login{
|
|
628
|
+
.bus_title{
|
|
629
|
+
text-align: center;
|
|
630
|
+
}
|
|
631
|
+
.bus_list{
|
|
632
|
+
display: flex;
|
|
633
|
+
flex-wrap: wrap;
|
|
634
|
+
margin-top: 24rpx;
|
|
635
|
+
.bus_item{
|
|
636
|
+
margin: 0 10rpx;
|
|
637
|
+
display: flex;
|
|
638
|
+
flex-direction: column;
|
|
639
|
+
align-items: center;
|
|
640
|
+
.bus_img{
|
|
641
|
+
width: 76rpx;
|
|
642
|
+
height: 76rpx;
|
|
643
|
+
background-color: #DDD;
|
|
644
|
+
border-radius: 76rpx;
|
|
645
|
+
overflow: hidden;
|
|
646
|
+
image{
|
|
647
|
+
width: 100%;
|
|
648
|
+
height: 100%;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
.bus_name{
|
|
652
|
+
margin-top: 12rpx;
|
|
653
|
+
font-size: 24rpx;
|
|
654
|
+
color: #242424;
|
|
655
|
+
overflow: hidden;
|
|
656
|
+
text-overflow: ellipsis;
|
|
657
|
+
white-space: nowrap;
|
|
658
|
+
width: 100%;
|
|
659
|
+
text-align: center;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
.list_col_wrap{
|
|
108
665
|
|
|
666
|
+
.list_item{
|
|
667
|
+
display: flex;
|
|
668
|
+
align-items: center;
|
|
669
|
+
padding: 10rpx 24rpx;
|
|
670
|
+
background-color: #FFFFFF;
|
|
671
|
+
.list_title{
|
|
672
|
+
flex: 1;
|
|
673
|
+
font-size: 24rpx;
|
|
674
|
+
color: #333333;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.code_wrap{
|
|
680
|
+
display: flex;
|
|
681
|
+
flex-direction: column;
|
|
682
|
+
font-size: 28rpx;
|
|
683
|
+
.code_title{
|
|
684
|
+
display: flex;
|
|
685
|
+
align-items: center;
|
|
686
|
+
._title{
|
|
687
|
+
margin-left: 30rpx;
|
|
688
|
+
font-size: 32rpx;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
.barcode{
|
|
692
|
+
width: 100%;
|
|
693
|
+
margin-top: 32rpx;
|
|
694
|
+
image{
|
|
695
|
+
width: 100%;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
.qrcode{
|
|
699
|
+
margin: 40rpx 24rpx;
|
|
700
|
+
align-self: center;
|
|
701
|
+
image{
|
|
702
|
+
width: 100%;
|
|
703
|
+
height: 100%;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
.time_loop{
|
|
707
|
+
align-self: center;
|
|
708
|
+
}
|
|
709
|
+
.refresh_btn{
|
|
710
|
+
align-self: center;
|
|
711
|
+
border: 1px solid #999999;
|
|
712
|
+
border-radius: 50rpx;
|
|
713
|
+
width: 300rpx;
|
|
714
|
+
height: 80rpx;
|
|
715
|
+
display: flex;
|
|
716
|
+
align-items: center;
|
|
717
|
+
justify-content: center;
|
|
718
|
+
margin-top: 40rpx;
|
|
719
|
+
color: #999999;
|
|
720
|
+
.btn_icon{
|
|
721
|
+
margin-right: 16rpx;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
109
725
|
}
|
|
110
726
|
}
|
|
111
727
|
</style>
|