jufubao-base 1.0.168 → 1.0.169-beta2
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/JfbBaseLogin/Attr.js +1109 -510
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +364 -63
- package/src/components/JfbBaseTfkCardBind/Attr.js +579 -33
- package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +453 -18
- package/src/components/JfbBaseTfkCardDetail/Api.js +13 -37
- package/src/components/JfbBaseTfkCardDetail/Attr.js +589 -33
- package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +497 -23
- package/src/components/JfbBaseTfkCardDetail/Mock.js +151 -11
- package/src/components/JfbBaseTfkCardLogin/Api.js +19 -34
- package/src/components/JfbBaseTfkCardLogin/Attr.js +609 -33
- package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +488 -17
- package/src/components/JfbBaseTfkCardLogin/Mock.js +721 -11
- package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +219 -0
|
@@ -14,30 +14,281 @@
|
|
|
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
|
+
<view class="bus_img">
|
|
53
|
+
<image :src="item.image_url" />
|
|
54
|
+
</view>
|
|
55
|
+
<view class="bus_name">{{item.entry_name}}</view>
|
|
56
|
+
</view>
|
|
57
|
+
</view>
|
|
58
|
+
</view>
|
|
59
|
+
<view v-else>
|
|
60
|
+
<xd-button type="primary">立即使用</xd-button>
|
|
61
|
+
</view>
|
|
62
|
+
</view>
|
|
63
|
+
<view class="list_col_wrap" :style="listColWrapBoxStyle">
|
|
64
|
+
<view class="list_item" :style="listColItemStyle">
|
|
65
|
+
<view class="list_title">使用规则</view>
|
|
66
|
+
<view class="list_icon">
|
|
67
|
+
<xd-font-icon icon="iconxiangyou_xian" size="24"></xd-font-icon>
|
|
68
|
+
</view>
|
|
69
|
+
</view>
|
|
70
|
+
<view class="list_item" :style="listColItemStyle">
|
|
71
|
+
<view class="list_title">提货码</view>
|
|
72
|
+
<view class="list_icon">
|
|
73
|
+
<xd-font-icon icon="iconxiangyou_xian" size="24"></xd-font-icon>
|
|
74
|
+
</view>
|
|
75
|
+
</view>
|
|
76
|
+
</view>
|
|
77
|
+
</view>
|
|
78
|
+
<view v-if="curModule === 'rule'">
|
|
79
|
+
<view v-if="cardRule" v-html="cardRule" class="rule_wrap" :style="ruleDetailBoxStyle">
|
|
80
|
+
</view>
|
|
81
|
+
<view v-else class="rule_wrap" :style="ruleDetailBoxStyle">
|
|
82
|
+
使用规则暂无
|
|
83
|
+
</view>
|
|
84
|
+
</view>
|
|
85
|
+
<view v-if="curModule === 'pickup'">
|
|
86
|
+
<view class="code_wrap" :style="codeDetailBoxStyle">
|
|
87
|
+
<view class="code_title">
|
|
88
|
+
<view><xd-font-icon :icon='payPreIcon || "iconsaoma1"' size="54"></xd-font-icon></view>
|
|
89
|
+
<view class="_title">向商家付款</view>
|
|
90
|
+
</view>
|
|
91
|
+
<view class="barcode">
|
|
92
|
+
<image :src="cardInfo.barcode" mode="widthFix"></image>
|
|
93
|
+
</view>
|
|
94
|
+
<view class="qrcode" :style="qrcodeBoxStyle">
|
|
95
|
+
<image :src="cardInfo.card_qrcode"></image>
|
|
96
|
+
</view>
|
|
97
|
+
<view class="time_loop">{{ timeStr }}后自动刷新</view>
|
|
98
|
+
<view class="refresh_btn" @click="handleRefresh">
|
|
99
|
+
<xd-font-icon class="btn_icon" :icon="refreshIcon"></xd-font-icon>
|
|
100
|
+
刷新二维码
|
|
101
|
+
</view>
|
|
102
|
+
</view>
|
|
103
|
+
</view>
|
|
18
104
|
</view>
|
|
19
105
|
</view>
|
|
20
106
|
</template>
|
|
21
107
|
|
|
22
108
|
<script>
|
|
23
109
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
110
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
111
|
+
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
24
112
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
25
113
|
import JfbBaseTfkCardDetailMixin from "./JfbBaseTfkCardDetailMixin";
|
|
26
114
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
27
115
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
28
116
|
import extsMixins from "@/mixins/extsMixins";
|
|
117
|
+
import getServiceUrl from '@/common/getServiceUrl'
|
|
29
118
|
export default {
|
|
30
119
|
name: "JfbBaseTfkCardDetail",
|
|
31
120
|
components: {
|
|
32
|
-
XdFontIcon
|
|
121
|
+
XdFontIcon,
|
|
122
|
+
XdButton,
|
|
123
|
+
XdUnit,
|
|
33
124
|
},
|
|
34
125
|
mixins: [
|
|
35
126
|
componentsMixins, extsMixins, JfbBaseTfkCardDetailMixin
|
|
36
127
|
],
|
|
37
128
|
data() {
|
|
38
129
|
return {
|
|
130
|
+
curModule: "main",
|
|
131
|
+
card_number: "",
|
|
132
|
+
cardInfo: {},
|
|
133
|
+
businessList: [],
|
|
134
|
+
timeStr: "",
|
|
135
|
+
timeer: null,
|
|
136
|
+
date: 2, //时间底数
|
|
137
|
+
time: 2, //时间幂指数
|
|
138
|
+
stopTimer: false, //停止轮询
|
|
39
139
|
|
|
140
|
+
cardRule: "",
|
|
141
|
+
showBusinessList: "Y",
|
|
40
142
|
//todo
|
|
143
|
+
cardInfoMargin: {},
|
|
144
|
+
cardInfoPadding: {},
|
|
145
|
+
cardImageUrl: "",
|
|
146
|
+
cardHeight: 260,
|
|
147
|
+
cardRadius: 10,
|
|
148
|
+
bussPadding: {},
|
|
149
|
+
bussMargin: {},
|
|
150
|
+
bussTempMargin: {},
|
|
151
|
+
bussTempBgColor: "",
|
|
152
|
+
listColMargin: {},
|
|
153
|
+
listColPadding: {},
|
|
154
|
+
listColSpace: 0,
|
|
155
|
+
cardFontColor: "",
|
|
156
|
+
ruleDetailMargin: {},
|
|
157
|
+
ruleDetailPadding: {},
|
|
158
|
+
ruleDetailBgColor: "",
|
|
159
|
+
codeDetailMargin: {},
|
|
160
|
+
codeDetailPadding: {},
|
|
161
|
+
codeDetailBgColor: "",
|
|
162
|
+
qrcodeWidth: 300,
|
|
163
|
+
payPreIcon: "",
|
|
164
|
+
refreshIcon: "",
|
|
165
|
+
bussWidth: 100,
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
computed: {
|
|
169
|
+
cardWrapBoxStyle(){
|
|
170
|
+
let padding = `${this.checkValue(this.cardInfoMargin.top, 20)}rpx`;
|
|
171
|
+
padding = `${padding} ${this.checkValue(this.cardInfoMargin.right, 20)}rpx`;
|
|
172
|
+
padding = `${padding} ${this.checkValue(this.cardInfoMargin.bottom, 20)}rpx`;
|
|
173
|
+
padding = `${padding} ${this.checkValue(this.cardInfoMargin.left, 20)}rpx`;
|
|
174
|
+
|
|
175
|
+
return this.styleObjectToString({
|
|
176
|
+
padding: padding,
|
|
177
|
+
})
|
|
178
|
+
},
|
|
179
|
+
businessWrapBox(){
|
|
180
|
+
let margin = `${this.checkValue(this.bussTempMargin.top, 20)}rpx`;
|
|
181
|
+
margin = `${margin} ${this.checkValue(this.bussTempMargin.right, 20)}rpx`;
|
|
182
|
+
margin = `${margin} ${this.checkValue(this.bussTempMargin.bottom, 20)}rpx`;
|
|
183
|
+
margin = `${margin} ${this.checkValue(this.bussTempMargin.left, 20)}rpx`;
|
|
184
|
+
|
|
185
|
+
let padding = `${this.checkValue(this.bussPadding.top, 20)}rpx`;
|
|
186
|
+
padding = `${padding} ${this.checkValue(this.bussPadding.right, 20)}rpx`;
|
|
187
|
+
padding = `${padding} ${this.checkValue(this.bussPadding.bottom, 20)}rpx`;
|
|
188
|
+
padding = `${padding} ${this.checkValue(this.bussPadding.left, 20)}rpx`;
|
|
189
|
+
|
|
190
|
+
return this.styleObjectToString({
|
|
191
|
+
margin: margin,
|
|
192
|
+
padding: padding,
|
|
193
|
+
backgroundColor: this.bussTempBgColor,
|
|
194
|
+
})
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
businessItemBox(){
|
|
198
|
+
let margin = `${this.checkValue(this.bussMargin.top, 20)}rpx`;
|
|
199
|
+
margin = `${margin} ${this.checkValue(this.bussMargin.right, 20)}rpx`;
|
|
200
|
+
margin = `${margin} ${this.checkValue(this.bussMargin.bottom, 20)}rpx`;
|
|
201
|
+
margin = `${margin} ${this.checkValue(this.bussMargin.left, 20)}rpx`;
|
|
202
|
+
return this.styleObjectToString({
|
|
203
|
+
margin: margin,
|
|
204
|
+
width: this.bussWidth + 'rpx'
|
|
205
|
+
})
|
|
206
|
+
},
|
|
207
|
+
cardBoxStyle(){
|
|
208
|
+
let style = {};
|
|
209
|
+
if(this.cardImageUrl) style = {
|
|
210
|
+
backgroundImage: `url(${this.getCardBgImage})`,
|
|
211
|
+
backgroundSize: '100%',
|
|
212
|
+
backgroundRepeat: 'no-repeat',
|
|
213
|
+
}
|
|
214
|
+
let padding = `${this.checkValue(this.cardInfoPadding.top, 20)}rpx`;
|
|
215
|
+
padding = `${padding} ${this.checkValue(this.cardInfoPadding.right, 20)}rpx`;
|
|
216
|
+
padding = `${padding} ${this.checkValue(this.cardInfoPadding.bottom, 20)}rpx`;
|
|
217
|
+
padding = `${padding} ${this.checkValue(this.cardInfoPadding.left, 20)}rpx`;
|
|
218
|
+
style = Object.assign(style, {
|
|
219
|
+
padding: padding,
|
|
220
|
+
height: this.cardHeight + 'rpx',
|
|
221
|
+
borderRadius: this.cardRadius + 'rpx',
|
|
222
|
+
color: this.cardFontColor,
|
|
223
|
+
})
|
|
224
|
+
return this.styleObjectToString(style)
|
|
225
|
+
},
|
|
226
|
+
getCardBgImage(){
|
|
227
|
+
let bg = '';
|
|
228
|
+
if(this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'object'
|
|
229
|
+
|| this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'array'
|
|
230
|
+
) {
|
|
231
|
+
if(!this.$xdUniHelper.isEmpty(this.cardImageUrl)) {
|
|
232
|
+
return getServiceUrl(this.cardImageUrl.url)
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return bg
|
|
236
|
+
},
|
|
237
|
+
listColWrapBoxStyle(){
|
|
238
|
+
let margin = `${this.checkValue(this.listColMargin.top, 20)}rpx`;
|
|
239
|
+
margin = `${margin} ${this.checkValue(this.listColMargin.right, 20)}rpx`;
|
|
240
|
+
margin = `${margin} ${this.checkValue(this.listColMargin.bottom, 20)}rpx`;
|
|
241
|
+
margin = `${margin} ${this.checkValue(this.listColMargin.left, 20)}rpx`;
|
|
242
|
+
return this.styleObjectToString({
|
|
243
|
+
margin: margin,
|
|
244
|
+
})
|
|
245
|
+
},
|
|
246
|
+
listColItemStyle(){
|
|
247
|
+
let padding = `${this.checkValue(this.listColPadding.top, 20)}rpx`;
|
|
248
|
+
padding = `${padding} ${this.checkValue(this.listColPadding.right, 20)}rpx`;
|
|
249
|
+
padding = `${padding} ${this.checkValue(this.listColPadding.bottom, 20)}rpx`;
|
|
250
|
+
padding = `${padding} ${this.checkValue(this.listColPadding.left, 20)}rpx`;
|
|
251
|
+
return this.styleObjectToString({
|
|
252
|
+
padding,
|
|
253
|
+
marginBottom: this.listColSpace + 'rpx',
|
|
254
|
+
})
|
|
255
|
+
},
|
|
256
|
+
ruleDetailBoxStyle(){
|
|
257
|
+
let padding = `${this.checkValue(this.ruleDetailPadding.top, 20)}rpx`;
|
|
258
|
+
padding = `${padding} ${this.checkValue(this.ruleDetailPadding.right, 20)}rpx`;
|
|
259
|
+
padding = `${padding} ${this.checkValue(this.ruleDetailPadding.bottom, 20)}rpx`;
|
|
260
|
+
padding = `${padding} ${this.checkValue(this.ruleDetailPadding.left, 20)}rpx`;
|
|
261
|
+
let margin = `${this.checkValue(this.ruleDetailMargin.top, 20)}rpx`;
|
|
262
|
+
margin = `${margin} ${this.checkValue(this.ruleDetailMargin.right, 20)}rpx`;
|
|
263
|
+
margin = `${margin} ${this.checkValue(this.ruleDetailMargin.bottom, 20)}rpx`;
|
|
264
|
+
margin = `${margin} ${this.checkValue(this.ruleDetailMargin.left, 20)}rpx`;
|
|
265
|
+
return this.styleObjectToString({
|
|
266
|
+
margin: margin,
|
|
267
|
+
padding: padding,
|
|
268
|
+
backgroundColor: this.ruleDetailBgColor,
|
|
269
|
+
})
|
|
270
|
+
},
|
|
271
|
+
codeDetailBoxStyle(){
|
|
272
|
+
let padding = `${this.checkValue(this.codeDetailPadding.top, 20)}rpx`;
|
|
273
|
+
padding = `${padding} ${this.checkValue(this.codeDetailPadding.right, 20)}rpx`;
|
|
274
|
+
padding = `${padding} ${this.checkValue(this.codeDetailPadding.bottom, 20)}rpx`;
|
|
275
|
+
padding = `${padding} ${this.checkValue(this.codeDetailPadding.left, 20)}rpx`;
|
|
276
|
+
let margin = `${this.checkValue(this.codeDetailMargin.top, 20)}rpx`;
|
|
277
|
+
margin = `${margin} ${this.checkValue(this.codeDetailMargin.right, 20)}rpx`;
|
|
278
|
+
margin = `${margin} ${this.checkValue(this.codeDetailMargin.bottom, 20)}rpx`;
|
|
279
|
+
margin = `${margin} ${this.checkValue(this.codeDetailMargin.left, 20)}rpx`;
|
|
280
|
+
return this.styleObjectToString({
|
|
281
|
+
margin: margin,
|
|
282
|
+
padding: padding,
|
|
283
|
+
backgroundColor: this.codeDetailBgColor,
|
|
284
|
+
})
|
|
285
|
+
},
|
|
286
|
+
qrcodeBoxStyle(){
|
|
287
|
+
|
|
288
|
+
return this.styleObjectToString({
|
|
289
|
+
width: this.qrcodeWidth + 'rpx',
|
|
290
|
+
height: this.qrcodeWidth + 'rpx',
|
|
291
|
+
})
|
|
41
292
|
}
|
|
42
293
|
},
|
|
43
294
|
watch: {
|
|
@@ -53,41 +304,130 @@
|
|
|
53
304
|
},
|
|
54
305
|
methods: {
|
|
55
306
|
onJfbLoad(options) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// vm: this,// data: {
|
|
60
|
-
|
|
61
|
-
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
62
|
-
|
|
63
|
-
// }
|
|
64
|
-
|
|
65
|
-
// }).then().catch()
|
|
307
|
+
this.card_number = options.card_number;
|
|
308
|
+
this.getCardDetail();
|
|
309
|
+
this.getContent();
|
|
66
310
|
},
|
|
67
311
|
/**
|
|
68
312
|
* @description 监听事件变化
|
|
69
313
|
* @param container {object} 业务组件对象自己
|
|
70
314
|
*/
|
|
71
|
-
init(
|
|
72
|
-
|
|
73
|
-
|
|
315
|
+
init(value) {
|
|
316
|
+
this.previewCurrent = getContainerPropsValue(value, 'content.previewCurrent', "main");
|
|
317
|
+
this.showBusinessList = getContainerPropsValue(value, 'content.showBusinessList', "Y");
|
|
318
|
+
this.cardInfoMargin = getContainerPropsValue(value, 'content.cardInfoMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
319
|
+
this.cardInfoPadding = getContainerPropsValue(value, 'content.cardInfoPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
320
|
+
this.cardImageUrl = getContainerPropsValue(value, 'content.cardImageUrl', '');
|
|
321
|
+
this.cardHeight = getContainerPropsValue(value, 'content.cardHeight', 260);
|
|
322
|
+
this.cardRadius = getContainerPropsValue(value, 'content.cardRadius', 16);
|
|
323
|
+
this.bussPadding = getContainerPropsValue(value, 'content.bussPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
324
|
+
this.bussMargin = getContainerPropsValue(value, 'content.bussMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
325
|
+
this.bussTempMargin = getContainerPropsValue(value, 'content.bussTempMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
326
|
+
this.bussTempBgColor = getContainerPropsValue(value, 'content.bussTempBgColor', '#fff');
|
|
327
|
+
this.listColMargin = getContainerPropsValue(value, 'content.listColMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
328
|
+
this.listColPadding = getContainerPropsValue(value, 'content.listColPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
329
|
+
this.listColSpace = getContainerPropsValue(value, 'content.listColSpace', 10);
|
|
330
|
+
this.cardFontColor = getContainerPropsValue(value, 'content.cardFontColor', '#333');
|
|
331
|
+
this.ruleDetailMargin = getContainerPropsValue(value, 'content.ruleDetailMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
332
|
+
this.ruleDetailPadding = getContainerPropsValue(value, 'content.ruleDetailPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
333
|
+
this.ruleDetailBgColor = getContainerPropsValue(value, 'content.ruleDetailBgColor', '#fff');
|
|
334
|
+
this.codeDetailMargin = getContainerPropsValue(value, 'content.codeDetailMargin', {top: 20, left: 20, right: 20, bottom: 20});
|
|
335
|
+
this.codeDetailPadding = getContainerPropsValue(value, 'content.codeDetailPadding', {top: 20, left: 20, right: 20, bottom: 20});
|
|
336
|
+
this.codeDetailBgColor = getContainerPropsValue(value, 'content.codeDetailBgColor', '#fff');
|
|
337
|
+
this.qrcodeWidth = getContainerPropsValue(value, 'content.qrcodeWidth', 300);
|
|
338
|
+
this.payPreIcon = getContainerPropsValue(value, 'content.payPreIcon', '');
|
|
339
|
+
this.refreshIcon = getContainerPropsValue(value, 'content.refreshIcon', '');
|
|
340
|
+
this.bussWidth = getContainerPropsValue(value, 'content.bussWidth', 100);
|
|
74
341
|
|
|
75
|
-
|
|
342
|
+
if(this.$configProject.isPreview){
|
|
343
|
+
this.curModule = this.previewCurrent;
|
|
344
|
+
}
|
|
76
345
|
},
|
|
77
|
-
|
|
78
|
-
|
|
346
|
+
getCardDetail(){
|
|
347
|
+
jfbRootExec("getTfkCardDetail", {
|
|
348
|
+
vm: this,
|
|
349
|
+
data: {
|
|
350
|
+
card_number: this.card_number,
|
|
351
|
+
is_show_entry_settings: this.showBusinessList,
|
|
352
|
+
}
|
|
353
|
+
}).then(res => {
|
|
354
|
+
this.cardInfo = Object.assign({}, res, {
|
|
355
|
+
other_card_point: res.other_card_point ? this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100) : 0
|
|
356
|
+
});
|
|
357
|
+
this.businessList = res.site_entry_settings.map(item => {
|
|
358
|
+
item['image_url'] = getServiceUrl(item.image_url);
|
|
359
|
+
return item;
|
|
360
|
+
})
|
|
361
|
+
if(!this.$configProject.isPreview) {
|
|
362
|
+
this.setIntval(res.card_qrcode_expire);
|
|
363
|
+
}else{
|
|
364
|
+
this.timeStr = "08分10秒";
|
|
365
|
+
}
|
|
366
|
+
})
|
|
79
367
|
},
|
|
80
|
-
|
|
81
|
-
|
|
368
|
+
getContent() {
|
|
369
|
+
jfbRootExec("getListBaseNewsContent", {
|
|
370
|
+
vm: this,
|
|
371
|
+
data: {
|
|
372
|
+
page_id: this.pageAttr["page_id"], //页面ID
|
|
373
|
+
container_id: this.containerId, //组件ID
|
|
374
|
+
limit: 1,
|
|
375
|
+
},
|
|
376
|
+
})
|
|
377
|
+
.then((res) => {
|
|
378
|
+
if (res.list.length > 0) {
|
|
379
|
+
if(res.list && res.list.length > 0) {
|
|
380
|
+
this.cardRule = this.$xdUniHelper.filterHtml(res.list[0].content);
|
|
381
|
+
}
|
|
382
|
+
// this.noticeStatus = true;
|
|
383
|
+
}
|
|
384
|
+
})
|
|
385
|
+
.catch((error) => {
|
|
386
|
+
console.error(error);
|
|
387
|
+
});
|
|
388
|
+
},
|
|
389
|
+
handleRefresh(){
|
|
390
|
+
clearInterval(this.timeer);
|
|
391
|
+
this.getCardDetail();
|
|
392
|
+
},
|
|
393
|
+
setIntval(time){
|
|
394
|
+
this.timeer = setInterval(() => {
|
|
395
|
+
if (time === 0) {
|
|
396
|
+
this.timeStr = "00分00秒";
|
|
397
|
+
clearInterval(this.timeer);
|
|
398
|
+
if (!this.stopTimer) this.getCardDetail();
|
|
399
|
+
} else {
|
|
400
|
+
time--;
|
|
401
|
+
let f = Math.floor(time / 60);
|
|
402
|
+
f = f < 10 ? "0" + f : f;
|
|
403
|
+
let m = time % 60;
|
|
404
|
+
m = m < 10 ? "0" + m : m;
|
|
405
|
+
this.timeStr = `${f}分${m}秒`;
|
|
406
|
+
}
|
|
407
|
+
}, 1000);
|
|
408
|
+
},
|
|
409
|
+
|
|
410
|
+
onJfbUnload(){
|
|
411
|
+
this.timeStr = ""
|
|
412
|
+
if (this.timeer) {
|
|
413
|
+
clearInterval(this.timeer);
|
|
414
|
+
}
|
|
82
415
|
},
|
|
83
416
|
onJfbShow(options) {
|
|
84
|
-
|
|
417
|
+
this.onJfbLoad(options)
|
|
85
418
|
},
|
|
86
419
|
onJfbHide(options) {
|
|
87
|
-
|
|
420
|
+
this.timeStr = ""
|
|
421
|
+
if (this.timeer) {
|
|
422
|
+
clearTimeout(this.timeer);
|
|
423
|
+
}
|
|
88
424
|
},
|
|
89
425
|
onJfbBack(options) {
|
|
90
|
-
|
|
426
|
+
this.timeStr = ""
|
|
427
|
+
if (this.timeer) {
|
|
428
|
+
clearTimeout(this.timeer);
|
|
429
|
+
}
|
|
430
|
+
this.$xdUniHelper.navigateBack();
|
|
91
431
|
},
|
|
92
432
|
onJfbUpdate(...data) {
|
|
93
433
|
console.log('event.onJfbUpdate', data)
|
|
@@ -105,7 +445,141 @@
|
|
|
105
445
|
|
|
106
446
|
.jfb-base-tfk-card-detail {
|
|
107
447
|
&__body{
|
|
448
|
+
.ticket_card{
|
|
449
|
+
display: flex;
|
|
450
|
+
flex-direction: column;
|
|
451
|
+
justify-content: space-between;
|
|
452
|
+
.card_top{
|
|
453
|
+
display: flex;
|
|
454
|
+
flex-direction: column;
|
|
455
|
+
.card_point_name{
|
|
456
|
+
display: flex;
|
|
457
|
+
justify-content: space-between;
|
|
458
|
+
align-items: center;
|
|
459
|
+
._point{
|
|
460
|
+
font-size: 40rpx;
|
|
461
|
+
font-weight: bold;
|
|
462
|
+
._unit{
|
|
463
|
+
font-size: 24rpx;
|
|
464
|
+
margin-left: 4rpx;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
._name{
|
|
468
|
+
font-size: 26rpx;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
.card_deduct{
|
|
472
|
+
font-size: 26rpx;
|
|
473
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
474
|
+
display: inline-block;
|
|
475
|
+
padding: 8rpx 16rpx;
|
|
476
|
+
border-radius: 8rpx;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
.card_bottom{
|
|
480
|
+
display: flex;
|
|
481
|
+
justify-content: space-between;
|
|
482
|
+
align-items: center;
|
|
483
|
+
font-weight: 400;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
.business_login{
|
|
487
|
+
.bus_title{
|
|
488
|
+
text-align: center;
|
|
489
|
+
}
|
|
490
|
+
.bus_list{
|
|
491
|
+
display: flex;
|
|
492
|
+
flex-wrap: wrap;
|
|
493
|
+
margin-top: 24rpx;
|
|
494
|
+
.bus_item{
|
|
495
|
+
margin: 0 10rpx;
|
|
496
|
+
display: flex;
|
|
497
|
+
flex-direction: column;
|
|
498
|
+
align-items: center;
|
|
499
|
+
.bus_img{
|
|
500
|
+
width: 76rpx;
|
|
501
|
+
height: 76rpx;
|
|
502
|
+
background-color: #DDD;
|
|
503
|
+
border-radius: 76rpx;
|
|
504
|
+
overflow: hidden;
|
|
505
|
+
image{
|
|
506
|
+
width: 100%;
|
|
507
|
+
height: 100%;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
.bus_name{
|
|
511
|
+
margin-top: 12rpx;
|
|
512
|
+
font-size: 24rpx;
|
|
513
|
+
color: #242424;
|
|
514
|
+
overflow: hidden;
|
|
515
|
+
text-overflow: ellipsis;
|
|
516
|
+
white-space: nowrap;
|
|
517
|
+
width: 100%;
|
|
518
|
+
text-align: center;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
.list_col_wrap{
|
|
524
|
+
margin: 40rpx 0;
|
|
525
|
+
|
|
526
|
+
.list_item{
|
|
527
|
+
display: flex;
|
|
528
|
+
align-items: center;
|
|
529
|
+
padding: 10rpx 24rpx;
|
|
530
|
+
background-color: #FFFFFF;
|
|
531
|
+
.list_title{
|
|
532
|
+
flex: 1;
|
|
533
|
+
font-size: 24rpx;
|
|
534
|
+
color: #333333;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
108
538
|
|
|
539
|
+
.code_wrap{
|
|
540
|
+
display: flex;
|
|
541
|
+
flex-direction: column;
|
|
542
|
+
.code_title{
|
|
543
|
+
display: flex;
|
|
544
|
+
align-items: center;
|
|
545
|
+
._title{
|
|
546
|
+
margin-left: 30rpx;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
.barcode{
|
|
550
|
+
width: 100%;
|
|
551
|
+
margin-top: 32rpx;
|
|
552
|
+
image{
|
|
553
|
+
width: 100%;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
.qrcode{
|
|
557
|
+
margin: 40rpx 24rpx;
|
|
558
|
+
align-self: center;
|
|
559
|
+
image{
|
|
560
|
+
width: 100%;
|
|
561
|
+
height: 100%;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
.time_loop{
|
|
565
|
+
align-self: center;
|
|
566
|
+
}
|
|
567
|
+
.refresh_btn{
|
|
568
|
+
align-self: center;
|
|
569
|
+
border: 1px solid #999999;
|
|
570
|
+
border-radius: 50rpx;
|
|
571
|
+
width: 300rpx;
|
|
572
|
+
height: 80rpx;
|
|
573
|
+
display: flex;
|
|
574
|
+
align-items: center;
|
|
575
|
+
justify-content: center;
|
|
576
|
+
margin-top: 40rpx;
|
|
577
|
+
color: #999999;
|
|
578
|
+
.btn_icon{
|
|
579
|
+
margin-right: 16rpx;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
109
583
|
}
|
|
110
584
|
}
|
|
111
585
|
</style>
|