jufubao-base 1.0.56-beta2005 → 1.0.56-beta2007

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.
@@ -2,109 +2,715 @@
2
2
  <view
3
3
  class="jfb-base-card-detail-entry"
4
4
  @click="handleEditxSelect"
5
- :class="{ editx : isEditx && active }"
5
+ :class="{ editx: isEditx && active }"
6
6
  >
7
7
  <!--#ifdef H5-->
8
8
  <view
9
9
  class="jfb-base-card-detail-entry__edit"
10
- :class="{ editx : isEditx && active }"
10
+ :class="{ editx: isEditx && active }"
11
11
  v-if="isEditx && active"
12
12
  >
13
- <view class="jfb-base-card-detail-entry__edit-icon" @click="delEdit">删除</view>
13
+ <view class="jfb-base-card-detail-entry__edit-icon" @click="delEdit"
14
+ >删除</view
15
+ >
14
16
  </view>
15
17
  <!-- #endif -->
16
- <view class="jfb-base-card-detail-entry__body">
17
- <view>测试插件( {{containerId}} )</view>
18
+ <view class="jfb-base-card-detail-entry__body" v-if="info!==null">
19
+ <view
20
+ class="jfb-base-card-detail-entry__body-header"
21
+ :style="{
22
+ background: headerBg.color,
23
+ backgroundSize: '100%',
24
+ }"
25
+ >
26
+ <view
27
+ class="jfb-base-card-detail-entry__body-header-wrap"
28
+ :style="{
29
+ backgroundImage: `url(${headerBg.image})`,
30
+ }"
31
+ >
32
+ <view class="jfb-base-card-detail-entry__body-header-item">
33
+ <view>券名:</view>
34
+ <view>{{info.card_type_name}}</view>
35
+ </view>
36
+ <view
37
+ style="padding-bottom: 0px"
38
+ class="jfb-base-card-detail-entry__body-header-item"
39
+ >
40
+ <view>券号:</view>
41
+ <view>{{info.card_number}}</view>
42
+ </view>
43
+ </view>
44
+ </view>
45
+ <view
46
+ class="jfb-base-card-detail-entry__body-content"
47
+ >
48
+ <view
49
+ :class="
50
+ item.key === 'other_card_point'
51
+ ? 'jfb-base-card-detail-entry__body-content-special'
52
+ : 'jfb-base-card-detail-entry__body-content-item'
53
+ "
54
+ v-for="(item, index) in valueKey"
55
+ :key="index"
56
+ >
57
+ <view> {{ item.label }}: </view>
58
+ <xd-unit v-if="item.type === 'price'&&info.unit==='点'" fontSize="28" :price="info[item.key]">
59
+ </xd-unit>
60
+ <view :style="{color:mainColor,fontWeight:500}" v-else-if="item.type === 'price'&&info.unit==='次'">
61
+ {{ info[item.key] }}
62
+ <text>{{info.unit}}</text>
63
+ </view>
64
+ <view style="color: #333; font-weight: 500" v-else>
65
+ {{ info[item.key] }}
66
+ <text v-if="item.type === 'type'">券</text>
67
+ </view>
68
+ </view>
69
+ </view>
70
+ <view class="jfb-base-card-detail-entry__body-qrcode">
71
+ <view>
72
+ <view>
73
+ <image mode="aspectFit" :src="info.barcode"></image>
74
+ </view>
75
+ </view>
76
+ <view style="position: relative">
77
+ <image
78
+ :style="{width: '300rpx', height: '300rpx'}"
79
+ :src="info.card_qrcode"
80
+ ></image>
81
+ <image v-if="isBrandLogo" class="logo-icon" :src="brandLogo"></image>
82
+ </view>
83
+ <view :style="{marginTop: '20rpx'}" v-if="timeStr">消费二维码,有效期为{{ info["card_qrcode_expire"] / 60 }}分钟</view>
84
+ <view v-if="timeStr">距离刷新还有{{ timeStr }}</view>
85
+ </view>
86
+ <view
87
+ v-if="info.site_entry_settings&&info.site_entry_settings.length>0"
88
+ class="jfb-base-card-detail-entry__body-business"
89
+ >
90
+ <view
91
+ class="jfb-base-card-detail-entry__body-business-title"
92
+ >
93
+ 业务板块
94
+ </view>
95
+ <view style="display:flex;align-content:center;justify-content:center">
96
+ <view class="jfb-base-card-detail-entry__body-business-content">
97
+ <view
98
+ class="jfb-base-card-detail-entry__body-business-content-item"
99
+ v-for="(item,index) in info.site_entry_settings"
100
+ :key="index">
101
+ <view><image :src="item.image_url"></image></view>
102
+ <view>{{item.entry_name}}</view>
103
+ </view>
104
+ </view>
105
+ </view>
106
+ </view>
107
+ <view :style="{height: '100rpx'}"></view>
108
+ <!-- 靠底支付 -->
109
+ <view class="fixe_bottom" :style="prod_bottom">
110
+ <!-- <xd-button
111
+ radius="8rpx"
112
+ size="small"
113
+ type="primary">
114
+ 消费记录
115
+ </xd-button> -->
116
+ <xd-button
117
+ v-if="info.is_exchange==='Y'"
118
+ @click="handleToShift"
119
+ radius="8rpx"
120
+ size="small"
121
+ type="primary">
122
+ 券转换
123
+ </xd-button>
124
+ <xd-button
125
+ v-if="isShowUnbind"
126
+ @click="handleUnBindCard"
127
+ radius="8rpx"
128
+ size="small"
129
+ type="primary">
130
+ 解除绑定
131
+ </xd-button>
132
+ </view>
18
133
  </view>
19
134
  </view>
20
135
  </template>
21
136
 
22
137
  <script>
23
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
- import { jfbRootExec } from "@/utils/xd.event";
25
- import JfbBaseCardDetailEntryMixin from "./JfbBaseCardDetailEntryMixin";
26
- import { getContainerPropsValue } from "@/utils/xd.base";
27
- import componentsMixins from "@/mixins/componentsMixins";
28
- import extsMixins from "@/mixins/extsMixins";
29
- export default {
30
- name: "JfbBaseCardDetailEntry",
31
- components: {
32
- XdFontIcon
33
- },
34
- mixins: [
35
- componentsMixins, extsMixins, JfbBaseCardDetailEntryMixin
36
- ],
37
- data() {
38
- return {
138
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
139
+ import { jfbRootExec } from "@/utils/xd.event";
140
+ import JfbBaseCardDetailEntryMixin from "./JfbBaseCardDetailEntryMixin";
141
+ import { getContainerPropsValue } from "@/utils/xd.base";
142
+ import componentsMixins from "@/mixins/componentsMixins";
143
+ import extsMixins from "@/mixins/extsMixins";
144
+ import colorCardMixins from "@/mixins/colorCardMixins";
145
+ import getServiceUrl from "@/common/getServiceUrl";
146
+ import { mapState } from "vuex";
147
+ import { Base64 } from "js-base64";
148
+ import XdPwPay from "./XdPwPay";
149
+ import XdEditPwd from "./XdEditPwd";
150
+ import XdUnit from "@/components/XdUnit/XdUnit";
151
+ import XdButton from '@/components/XdButton/XdButton'
152
+ export default {
153
+ name: "JfbBaseCardDetailEntry",
154
+ components: {
155
+ XdFontIcon,
156
+ XdPwPay,
157
+ XdEditPwd,
158
+ XdUnit,
159
+ XdButton
160
+ },
161
+ mixins: [
162
+ componentsMixins,extsMixins,JfbBaseCardDetailEntryMixin,colorCardMixins,
163
+ ],
164
+ data() {
165
+ return {
166
+ userInfo: null, //用户信息(暂时不可用)
167
+
168
+ info: null,
169
+ valueKey: [
170
+ {
171
+ label: "票券余额",
172
+ key: "card_point",
173
+ type: "price",
174
+ },
175
+ {
176
+ label: "购买其他物品可抵",
177
+ key: "other_card_point",
178
+ type: "price",
179
+ },
180
+ {
181
+ label: "有效期限",
182
+ key: "end_time",
183
+ type: "normal",
184
+ },
185
+ ],
186
+ timeStr: "",
187
+ timeer: null,
188
+ date: 2, //时间底数
189
+ time: 2, //时间幂指数
190
+ refrushTimeer: null,
191
+ maxTime: 30, //最大执行时间幂指数
192
+ editShow: false,
193
+ pwdTitle: "",
194
+ editPhone: "",
195
+ editTitle: "",
196
+ show: false,
197
+ textList: [],
198
+ password: "",
199
+ card_number: "",
200
+ stopTimer: false, //停止轮询
201
+ download: "",
202
+ qrcode: "",
203
+ backUrl: "",
204
+ shift_url: "",
39
205
 
40
- //todo
206
+ //品牌logo
207
+ brandLogo:
208
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsSAAALEgHS3X78AAAAAXNSR0IArs4c6QAADe5JREFUaEPdmQl0FFW6x3+3qqvTSxKSzgYkJEHZBEVQQFAWAfFlEBHJqMjiqCOyH/T5xsHRAXTwCTo6TzYFUVkUNxBmUAT1MQiIIJsog4AiEEMW0h0CWXqrundOdQIHfCqEp8ixzsnJOd23bn+/+v+/797vluBXcolfCQcXNEhuWlrDg2VlJWfzsC9IkGY+X2LEENt0TWtmSTmtoDQw4UwwFwxITmpqI6WrW4A+wLW6rsWjQKEISj2+tLS0+sdgfnGQpunpGZaw5uqa1t8O1JLyK2A30N9w6CJqWmsKSgM2nLxgQbIzUv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361TJpigKZrDeMMudflZFngeOB7D9B+bqB6gdgvKVWwcq2EFd+WBh7/uYOrz/z1AmnSKK2bMi1vYVn5qvr8yPkYWy8Qu2MAzPMRWH1/o74g9Z3/vI3/1YD8GzZW034Elz4yAAAAAElFTkSuQmCC",
209
+ isBrandLogo: false,
210
+
211
+ isShowUnbind: false, //是否启动绑定按钮
212
+ headerBg: {},
213
+ };
214
+ },
215
+ watch: {
216
+ container(value) {
217
+ this.init(value);
218
+ },
219
+ },
220
+ computed: {
221
+ ...mapState(["brandInfo"]),
222
+ prod_bottom() {
223
+ return this.fixedStyle({height: 0, zIndex: 111});
224
+ },
225
+ },
226
+ created() {},
227
+ methods: {
228
+ onJfbLoad(options) {
229
+ console.log(options,'optionsoptionsoptionsoptions');
230
+ if (options["x-params"]) {
231
+ try {
232
+ let params = JSON.parse(Base64.decode(options["x-params"]));
233
+ this.brandLogo = params["qrcode_logo"];
234
+ } catch (e) {
235
+ console.warn(options["x-params"]);
236
+ }
41
237
  }
238
+
239
+ this.$nextTick(() => {
240
+ this.card_number = options.card_number;
241
+ this.init();
242
+
243
+ // if (card_number) {
244
+ // this.card_number = card_number;
245
+ // if (this.brandInfo['is_enable_pay_password'] === 'N') {
246
+ // this.init();
247
+ // } else if (this.brandInfo['is_enable_pay_password'] === 'Y' && this.userInfo['has_user_set_password'] === 'N') {
248
+ // this.editShow = true
249
+ // this.pwdTitle = '您还未设置支付密码,请设置您的平台支付密码'
250
+ // } else if (this.brandInfo['is_enable_pay_password'] === 'Y' && this.userInfo['has_user_set_password'] === 'Y') {
251
+ // this.show = true
252
+ // this.textList = [
253
+ // {
254
+ // label: '查看卡详情',
255
+ // },
256
+ // {
257
+ // label: '请输入支付密码',
258
+ // }
259
+ // ]
260
+ // }
261
+ // this.first = true;
262
+ // } else {
263
+ // setTimeout(() => {
264
+ // this.$xdUniHelper.navigateTo({
265
+ // url: `/pages/index/index`
266
+ // }, false)
267
+ // }, 2000)
268
+ // }
269
+ });
42
270
  },
43
- watch: {
44
- container(value) {
45
- this.init(value)
271
+ /**
272
+ * @description 监听事件变化
273
+ * @param container {object} 业务组件对象自己
274
+ */
275
+ init() {
276
+ this.detail();
277
+ this.refrush();
278
+ this.backUrl = getContainerPropsValue( this.container, "content.back_url", { value: "" }).value;
279
+ this.shift_url = getContainerPropsValue( this.container, "content.shift_url", { value: "" }).value;
280
+ },
281
+ /**
282
+ * @description 获取卡详情
283
+ */
284
+ detail() {
285
+ jfbRootExec("getBaseByIdCardDetailEntry", {
286
+ vm: this,
287
+ data: {
288
+ card_number: this.card_number,
289
+ is_show_entry_settings: "Y",
290
+ },
291
+ })
292
+ .then((res) => {
293
+ if (res && res.card_point) {
294
+ res["card_point"] = this.$xdUniHelper.divisionFloatNumber(
295
+ res.card_point,
296
+ 100
297
+ );
298
+ }
299
+ if (res && res.card_point) {
300
+ res["other_card_point"] = this.$xdUniHelper.divisionFloatNumber(
301
+ res.other_card_point,
302
+ 100
303
+ );
304
+ }
305
+ if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
306
+ res.site_entry_settings = res.site_entry_settings.map(item=>{
307
+ item['image_url'] = getServiceUrl(item['image_url'])
308
+ return item
309
+ })
310
+ }
311
+ this.info = res;
312
+ this.setInval(this.info.card_qrcode_expire);
313
+ this.show = false;
314
+ this.headerBg = this.getCardThemes(res.card_type_name);
315
+
316
+ //显示按钮
317
+ if (res["is_show_qrcode_logo"] === "Y") {
318
+ this.isBrandLogo = true;
319
+ }
320
+
321
+ this.isShowUnbind =
322
+ res["is_can_unbind"] === "Y" || res["is_can_unbind"] === undefined;
323
+ })
324
+ .catch((err) => {
325
+ // this.$refs["pwPay"].clearPwd();
326
+ });
327
+ },
328
+ refrush() {
329
+ if (this.stopTimer) return;
330
+ if (this.time >= this.maxTime) {
331
+ clearTimeout(this.refrushTimeer);
332
+ console.log("refrushTimeer.end");
333
+ return;
46
334
  }
335
+ this.time++;
336
+ let time =
337
+ this.time >= 5 ? 32 * 1000 : Math.pow(this.date, this.time) * 1000;
338
+ this.refrushTimeer = setTimeout(() => {
339
+ jfbRootExec("getCardYueEntry", {
340
+ vm: this,
341
+ data: {
342
+ card_number: this.card_number,
343
+ },
344
+ })
345
+ .then((res) => {
346
+ //res[4]['value'] = this.$xdUniHelper.random(20,30);
347
+ let refrushInfo = this.$xdUniHelper.cloneDeep(this.info);
348
+ if (res && res !== null && Object.keys(res).length > 0) {
349
+ if (res.card_point) {
350
+ refrushInfo.card_point = this.$xdUniHelper.divisionFloatNumber(
351
+ res.card_point,
352
+ 100
353
+ );
354
+ }
355
+ if (res.other_card_point) {
356
+ refrushInfo.other_card_point =
357
+ this.$xdUniHelper.divisionFloatNumber(
358
+ res.other_card_point,
359
+ 100
360
+ );
361
+ }
362
+ }
363
+
364
+ this.info = refrushInfo;
365
+ this.refrush();
366
+ this.show = false;
367
+ })
368
+ .catch();
369
+ }, time);
370
+ },
371
+ handleOnClose() {
372
+ this.editShow = false;
373
+ },
374
+ handlePwdOnSubmit(val) {
375
+ this.password = val;
376
+ this.init();
377
+ },
378
+
379
+ handleOnForget() {
380
+ this.editShow = true;
381
+ this.editTitle = "请验证您的手机并修改支付密码";
47
382
  },
48
- created() {
49
- this.init(this.container);
50
383
 
51
- //todo
384
+ handlePwdClose() {
385
+ this.$helper.navigateBack();
52
386
  },
53
- methods: {
54
- onJfbLoad(options) {
387
+ handleUnBindCard() {
388
+ this.$xdConfirm({
389
+ $vm: this,
390
+ content: "您确定要解除绑定卡券吗",
391
+ title: "系统提示",
392
+ width: "80%",
393
+ isTitle: true,
394
+ zIndex: 2000,
395
+ vm: this,
396
+ success: (res) => {
397
+ if (res.confirm) {
398
+ clearTimeout(this.timeer);
399
+ clearTimeout(this.refrushTimeer);
400
+ this.stopTimer = true;
401
+ jfbRootExec("deleteCardUnbindEntry", {
402
+ vm: this,
403
+ data: {
404
+ card_number: this.card_number + "",
405
+ },
406
+ })
407
+ .then((res) => {
408
+ this.$xdAlert({
409
+ content: "解绑成功",
410
+ close: () => {
411
+ this.$xdUniHelper.redirectTo({
412
+ url: this.backUrl || this.settings.index,
413
+ });
414
+ },
415
+ });
416
+ })
417
+ .catch((err) => {
418
+ console.log(err, "err");
419
+ this.stopTimer = false;
420
+ });
421
+ }
422
+ },
423
+ });
424
+ },
425
+ setInval(time) {
426
+ console.log("pppppp", time);
427
+ this.timeer = setInterval(() => {
428
+ if (time === 0) {
429
+ this.timeStr = "00分00秒";
430
+ clearInterval(this.timeer);
431
+ if (!this.stopTimer) this.detail();
432
+ } else {
433
+ time--;
434
+ let f = Math.floor(time / 60);
435
+ f = f < 10 ? "0" + f : f;
436
+ let m = time % 60;
437
+ m = m < 10 ? "0" + m : m;
438
+ this.timeStr = `${f}分${m}秒`;
439
+ }
440
+ }, 1000);
441
+ },
442
+ handleToShift() {
443
+ this.$xdUniHelper.navigateTo({
444
+ url: this.shift_url,
445
+ });
446
+ },
447
+ onJfbBack(options) {
448
+ if (this.timeer) {
449
+ clearTimeout(this.timeer);
450
+ }
451
+ if (this.refrushTimeer) {
452
+ clearTimeout(this.refrushTimeer);
453
+ }
454
+ this.$xdUniHelper.navigateBack();
455
+ },
456
+ onJfbUnload() {
457
+ if (this.timeer) {
458
+ clearTimeout(this.timeer);
459
+ }
460
+ if (this.refrushTimeer) {
461
+ clearTimeout(this.refrushTimeer);
462
+ }
463
+ },
464
+ onJfbScroll(options) {
465
+ console.log("event.onJfbScroll", options);
466
+ },
467
+ onJfbReachBottom(options) {
468
+ console.log("event.onJfbReachBottom", options);
469
+ },
470
+ onJfbShow(options) {
471
+ console.log("event.onJfbShow", options);
472
+ this.onJfbLoad(options)
473
+ // if (this.first) {
474
+ // if (this.brandInfo["is_enable_pay_password"] === "N") {
475
+ // this.init();
476
+ // } else if (
477
+ // this.brandInfo["is_enable_pay_password"] === "Y" &&
478
+ // this.userInfo["has_user_set_password"] === "N"
479
+ // ) {
480
+ // this.editShow = true;
481
+ // this.pwdTitle = "您还未设置支付密码,请设置您的平台支付密码";
482
+ // } else if (
483
+ // this.brandInfo["is_enable_pay_password"] === "Y" &&
484
+ // this.userInfo["has_user_set_password"] === "Y"
485
+ // ) {
486
+ // this.show = true;
487
+ // this.textList = [
488
+ // {
489
+ // label: "查看卡详情",
490
+ // },
491
+ // {
492
+ // label: "请输入支付密码",
493
+ // },
494
+ // ];
495
+ // }
496
+ // }
497
+ },
498
+ onJfbHide(options) {
499
+ console.log("event.onJfbHide", options);
500
+ },
501
+ onJfbBack(options) {
502
+ console.log("event.onJfbBack", options);
503
+ },
504
+ onJfbUpdate(...data) {
505
+ console.log("event.onJfbUpdate", data);
506
+ },
507
+ onJfbCustomEvent(options) {
508
+ console.log("event.onJfbReachBottom", options);
509
+ },
510
+ },
511
+ };
512
+ </script>
55
513
 
56
- // jfbRootExec('baiduUserLogin', {
514
+ <style scoped lang="less">
515
+ @import "./JfbBaseCardDetailEntryLess.less";
57
516
 
58
- // vm: this,// data: {
517
+ .jfb-base-card-detail-entry {
518
+ &__body {
519
+ color: #333;
520
+ .logo-icon {
521
+ width: unit(100, rpx) !important;
522
+ height: unit(100, rpx) !important;
523
+ position: absolute;
524
+ top: 50%;
525
+ left: 50%;
526
+ transform: translate(-50rpx, -50rpx);
527
+ }
528
+ margin: unit(26, rpx);
529
+ &-header {
530
+ border-radius: unit(16, rpx);
531
+ font-size: unit(40, rpx);
532
+ font-weight: 700;
533
+ padding: unit(48, rpx) unit(32, rpx);
534
+ color: #fff;
59
535
 
60
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
536
+ &-wrap {
537
+ width: unit(700, rpx);
538
+ border-radius: unit(16, rpx);
539
+ background-size: 100%;
540
+ }
61
541
 
62
- // }
542
+ &-item {
543
+ display: flex;
544
+ justify-content: flex-start;
545
+ align-content: center;
546
+ padding-bottom: unit(32, rpx);
547
+ }
548
+ }
63
549
 
64
- // }).then().catch()
65
- },
66
- /**
67
- * @description 监听事件变化
68
- * @param container {object} 业务组件对象自己
69
- */
70
- init(container) {
550
+ &-content {
551
+ background: #fff;
552
+ border-radius: unit(16, rpx);
553
+ padding: unit(38, rpx) 0;
554
+ margin-top: unit(24, rpx);
71
555
 
72
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
556
+ &-item {
557
+ display: flex;
558
+ color: #666;
559
+ justify-content: space-between;
560
+ align-content: center;
561
+ font-size: unit(28, rpx);
562
+ padding: unit(16, rpx) unit(48, rpx);
563
+ }
73
564
 
74
- //this.height = getContainerPropsValue(container, 'content.height', 10);
75
- },
76
- onJfbScroll(options) {
77
- console.log('event.onJfbScroll', options)
78
- },
79
- onJfbReachBottom(options) {
80
- console.log('event.onJfbReachBottom', options)
81
- },
82
- onJfbShow(options) {
83
- console.log('event.onJfbShow', options)
84
- },
85
- onJfbHide(options) {
86
- console.log('event.onJfbHide', options)
87
- },
88
- onJfbBack(options) {
89
- console.log('event.onJfbBack', options)
90
- },
91
- onJfbUpdate(...data) {
92
- console.log('event.onJfbUpdate', data)
93
- },
94
- onJfbCustomEvent(options) {
95
- console.log('event.onJfbReachBottom', options)
96
- },
565
+ &-special {
566
+ display: flex;
567
+ color: #666;
568
+ justify-content: space-between;
569
+ font-size: unit(24, rpx);
570
+ padding: unit(18, rpx) unit(24, rpx);
571
+ margin: 0 unit(24, rpx);
572
+ border-radius: unit(16, rpx);
573
+ background: #f9f9f9;
574
+ align-content: center;
575
+ }
97
576
  }
98
- }
99
577
 
100
- </script>
578
+ &-qrcode {
579
+ text-align: center;
580
+ font-size: @xd-font-size-base;
581
+ line-height: unit(36, rpx);
582
+ background: #fff;
583
+ border-radius: unit(16,rpx);
584
+ margin-top: unit(24, rpx);
585
+ padding: unit(20,rpx) unit(70,rpx) unit(70,rpx) unit(70,rpx);
101
586
 
102
- <style scoped lang="less">
103
- @import "./JfbBaseCardDetailEntryLess.less";
587
+ & > view {
588
+ // margin-bottom: unit(20, rpx);
589
+
590
+ & > view {
591
+ margin-bottom: 0;
592
+ }
593
+ }
594
+
595
+ & > view:nth-child(1) {
596
+ display: flex;
597
+ justify-content: center;
598
+ align-items: center;
599
+ box-sizing: border-box;
600
+ height: unit(200, rpx);
601
+ width: 100%;
602
+ margin-top: unit(20, rpx);
603
+
604
+ & > view {
605
+ width: 100%;
606
+ height: unit(200, rpx);
607
+ padding: unit(10, rpx);
608
+ display: flex;
609
+ justify-content: center;
610
+ align-items: center;
611
+
612
+ & > image {
613
+ max-width: 100%;
614
+ max-height: unit(200, rpx);
615
+ }
616
+ }
617
+ }
618
+
619
+ & > view:nth-child(2) {
620
+ display: flex;
621
+ justify-content: center;
622
+ align-items: center;
623
+ padding: unit(20, rpx);
624
+
625
+ & > view {
626
+ width: unit(450, rpx);
627
+ height: unit(450, rpx);
628
+ padding: unit(10, rpx);
104
629
 
105
- .jfb-base-card-detail-entry {
106
- &__body{
630
+ & > image {
631
+ width: unit(450, rpx);
632
+ height: unit(450, rpx);
633
+ }
634
+ }
635
+ }
636
+ }
637
+
638
+ &-business {
639
+ background: #fff;
640
+ border-radius: unit(16,rpx);
641
+ margin-top: unit(24,rpx);
642
+
643
+ &-title {
644
+ font-size: unit(28,rpx);
645
+ font-weight: 500;
646
+ text-align: center;
647
+ padding: unit(28,rpx);
648
+ }
107
649
 
650
+ &-content {
651
+ display: flex;
652
+ justify-content: flex-start;
653
+ align-items: center;
654
+ flex-flow: wrap;
655
+ padding-left: unit(30, rpx);
656
+
657
+ & > view {
658
+ width: unit(120, rpx);
659
+ margin-right: unit(10, rpx);
660
+ flex-shrink: 0;
661
+ display: flex;
662
+ justify-content: center;
663
+ flex-direction: column;
664
+ align-items: center;
665
+
666
+ & > view:first-child {
667
+ width: unit(76, rpx);
668
+ height: unit(76, rpx);
669
+ overflow: hidden;
670
+
671
+ & > image {
672
+ height: 100%;
673
+ width: 100%;
674
+ }
675
+ }
676
+
677
+ & > view:nth-child(2) {
678
+ margin-top: unit(10, rpx);
679
+ font-size: unit(24, rpx);
680
+ line-height: unit(36, rpx);
681
+ margin-bottom: unit(10, rpx);
682
+ }
683
+
684
+ & > view:nth-child(3) {
685
+ display: flex;
686
+ justify-content: flex-start;
687
+ align-items: center;
688
+ flex-shrink: 0;
689
+ font-size: unit(20, rpx);
690
+ color: #999;
691
+ }
692
+
693
+ &:last-child {
694
+ margin-right: 0;
695
+ }
696
+ }
697
+ }
108
698
  }
699
+
700
+ .fixe_bottom{
701
+ display: flex;
702
+ align-items: center;
703
+ justify-content: space-between;
704
+ height: unit(100, rpx);
705
+ padding: 0 unit(40, rpx);
706
+ background: #FFF;
707
+ box-shadow: 0 0 unit(16, rpx) rgba(0,0,0,.05);
708
+ .flex_l{
709
+ display: flex;
710
+ align-items: center;
711
+ font-size: unit(32,rpx);
712
+ }
713
+ }
109
714
  }
715
+ }
110
716
  </style>