jufubao-base 1.0.439 → 1.0.440
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/get.package.path.js +2 -2
- package/package.json +1 -1
- package/src/components/JfbBaseCardConsumpCode/Api.js +39 -0
- package/src/components/JfbBaseCardConsumpCode/Attr.js +31 -0
- package/src/components/JfbBaseCardConsumpCode/JfbBaseCardConsumpCode.vue +802 -0
- package/src/components/JfbBaseCardConsumpCode/JfbBaseCardConsumpCodeLess.less +79 -0
- package/src/components/JfbBaseCardConsumpCode/JfbBaseCardConsumpCodeMixin.js +30 -0
- package/src/components/JfbBaseCardConsumpCode/Mock.js +71 -0
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +30 -3
package/get.package.path.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
|
|
10
10
|
if(packname === 'gxd-commands-bussiness') {
|
|
11
|
-
return `/Users/shiyonggao/
|
|
11
|
+
return `/Users/shiyonggao/home/root/Base-Jufubao/xd-commands-bussiness/${threePackagePath}`;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
if (packname === 'gxd-uni-library-editx') {
|
|
15
|
-
return `/Users/shiyonggao/
|
|
15
|
+
return `/Users/shiyonggao/home/root/Base-Jufubao/xd-uni-library-editx/${threePackagePath}`;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @description 接口配置,
|
|
4
|
+
* 在设置方法名字当时候,别忘记加上【模块名字】:Card
|
|
5
|
+
* @type {*[]}
|
|
6
|
+
*/
|
|
7
|
+
module.exports = [
|
|
8
|
+
{
|
|
9
|
+
mapFnName: 'getListEntryCardBind',
|
|
10
|
+
isRule: false,
|
|
11
|
+
title: '获得绑定卡',
|
|
12
|
+
prefix: 'list',
|
|
13
|
+
path: '/card/v1/card-bind/list-bind-card',
|
|
14
|
+
params: {},
|
|
15
|
+
disabled: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
mapFnName: 'getBaseByIdCardDetail',
|
|
19
|
+
isRule: false,
|
|
20
|
+
title: '获得绑定的卡详情',
|
|
21
|
+
prefix: 'detal',
|
|
22
|
+
path: '/card/v1/card-bind/get-bind-card',
|
|
23
|
+
params: {
|
|
24
|
+
card_number: ['卡号', 'String', '必选'],
|
|
25
|
+
},
|
|
26
|
+
disabled: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
mapFnName: 'getCardYue',
|
|
30
|
+
isRule: false,
|
|
31
|
+
title: '获得绑定的卡剩余点数',
|
|
32
|
+
prefix: 'yue',
|
|
33
|
+
path: '/card/v1/card-bind/get-bind-card-points',
|
|
34
|
+
params: {
|
|
35
|
+
card_number: ['卡号', 'String', '必选'],
|
|
36
|
+
},
|
|
37
|
+
disabled: true,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import { dataVal } from "@/utils/AttrTools";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
6
|
+
*/
|
|
7
|
+
export default {
|
|
8
|
+
style: [],
|
|
9
|
+
content: (data, gValue, gColor, oldData={}) => {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
ele: 'title',
|
|
13
|
+
label: '展示内容',
|
|
14
|
+
size: 'small',
|
|
15
|
+
groupKey:'content',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: '消费标题',
|
|
19
|
+
ele: 'el-input',
|
|
20
|
+
valueKey: 'takeTitleName',
|
|
21
|
+
value: dataVal({ data, key: 'takeTitleName', dValue: '提货二维码', gValue }),
|
|
22
|
+
groupKey: 'content',
|
|
23
|
+
className: 'input80',
|
|
24
|
+
labelInline: true,
|
|
25
|
+
inline: false,
|
|
26
|
+
placeholder: "输入消费标题"
|
|
27
|
+
},
|
|
28
|
+
].filter(i=>i)
|
|
29
|
+
},
|
|
30
|
+
advanced: [],
|
|
31
|
+
};
|
|
@@ -0,0 +1,802 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-card-consump-code"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-card-consump-code__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-card-consump-code__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-card-consump-code__body">
|
|
17
|
+
<view class="card-code">
|
|
18
|
+
<view class="card-code__title">
|
|
19
|
+
<xd-font-icon icon="icondaifahuo-main" :size="38"></xd-font-icon>
|
|
20
|
+
<text>{{ takeTitleName }}</text>
|
|
21
|
+
</view>
|
|
22
|
+
|
|
23
|
+
<template v-if="info">
|
|
24
|
+
<view class="barcode_wrap">
|
|
25
|
+
<view>
|
|
26
|
+
<image mode="aspectFit" :src="info.barcode"></image>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|
|
29
|
+
|
|
30
|
+
<view class="qrcode_wrap">
|
|
31
|
+
<image :src="info.card_qrcode"></image>
|
|
32
|
+
<image v-if="isBrandLogo" class="logo-icon" :src="brandLogo"></image>
|
|
33
|
+
</view>
|
|
34
|
+
|
|
35
|
+
<view class="card-code__refresh">
|
|
36
|
+
<view class="refresh-text" v-if="timeStr">{{ timeStr }}后自动刷新</view>
|
|
37
|
+
<view class="refresh-btn" @click="handleRefresh">
|
|
38
|
+
<xd-font-icon icon="iconmian-loading" :size="32" color="#333333"></xd-font-icon>
|
|
39
|
+
<text>刷新二维码</text>
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
|
|
43
|
+
<view class="card-code__choose" @click="handleChooseCard">
|
|
44
|
+
<view class="choose-left">
|
|
45
|
+
<xd-font-icon icon="iconkaquan" color="#FFCD5F" :size="34"></xd-font-icon>
|
|
46
|
+
<text>{{ card_number }}</text>
|
|
47
|
+
</view>
|
|
48
|
+
<view class="choose-right">
|
|
49
|
+
<text>切换票券</text>
|
|
50
|
+
<xd-font-icon icon="iconxiangyou_xian" :size="22"></xd-font-icon>
|
|
51
|
+
</view>
|
|
52
|
+
</view>
|
|
53
|
+
|
|
54
|
+
<view class="card-code__info">
|
|
55
|
+
<view class="info-row">有效期:{{ info.end_time }}</view>
|
|
56
|
+
<view class="info-row">
|
|
57
|
+
余 额:{{ info.card_point }}{{ info.unit || '' }}
|
|
58
|
+
<text
|
|
59
|
+
v-if="info.other_card_point && info.card_point_type === 2"
|
|
60
|
+
class="info-tip"
|
|
61
|
+
>(购买其他物品可抵:{{ info.other_card_point }})</text>
|
|
62
|
+
</view>
|
|
63
|
+
</view>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<view class="card-code__empty" v-else>
|
|
67
|
+
<xd-no-data height="600rpx" :scaleSize="2">
|
|
68
|
+
<view class="empty_txt">
|
|
69
|
+
{{ card_number ? '卡券信息加载失败,请稍后重试' : '暂无可用票券' }}
|
|
70
|
+
</view>
|
|
71
|
+
</xd-no-data>
|
|
72
|
+
</view>
|
|
73
|
+
</view>
|
|
74
|
+
|
|
75
|
+
<xd-down-drawer
|
|
76
|
+
:show.sync="showCardDialog"
|
|
77
|
+
height="50vh"
|
|
78
|
+
>
|
|
79
|
+
<view class="drawer_content">
|
|
80
|
+
<view class="ticket_title">使用票券</view>
|
|
81
|
+
<view class="ticket_tab">
|
|
82
|
+
<view
|
|
83
|
+
v-for="item in cardTypeData"
|
|
84
|
+
:key="item.value"
|
|
85
|
+
:style="[show_type === item.value ? activityType : '']"
|
|
86
|
+
@click="handleChangeType(item.value)"
|
|
87
|
+
>{{ item.label }}</view>
|
|
88
|
+
</view>
|
|
89
|
+
<view class="ticket_content">
|
|
90
|
+
<view class="ticket_list" :key="renderChecked" v-if="showCardList.length">
|
|
91
|
+
<view
|
|
92
|
+
class="ticket_item"
|
|
93
|
+
v-for="ticket in showCardList"
|
|
94
|
+
@click="handlerTicketSelect(!checkedCards.includes(ticket.card_number), ticket)"
|
|
95
|
+
:key="ticket.card_number"
|
|
96
|
+
>
|
|
97
|
+
<view class="_header">
|
|
98
|
+
<view class="flex align-center">
|
|
99
|
+
<xd-font-icon
|
|
100
|
+
style="margin-right: 8rpx;"
|
|
101
|
+
icon="iconkaquan"
|
|
102
|
+
color="#ffc65d"
|
|
103
|
+
size="32"
|
|
104
|
+
></xd-font-icon>
|
|
105
|
+
{{ ticket.card_type_name }}
|
|
106
|
+
</view>
|
|
107
|
+
<xd-radio
|
|
108
|
+
:isClickEvent="false"
|
|
109
|
+
:isOld="false"
|
|
110
|
+
:value="checkedCards.includes(ticket.card_number)"
|
|
111
|
+
:disabled="isTicketDisabled(ticket)"
|
|
112
|
+
></xd-radio>
|
|
113
|
+
</view>
|
|
114
|
+
<view class="_cont">
|
|
115
|
+
<view style="margin-right: 30rpx;">ID:{{ ticket.card_number }}</view>
|
|
116
|
+
<view>有效期至:{{ ticket.end_time }}</view>
|
|
117
|
+
</view>
|
|
118
|
+
<view class="_footer">
|
|
119
|
+
<view class="_item">
|
|
120
|
+
<text>剩余:</text>
|
|
121
|
+
<xd-unit
|
|
122
|
+
:price="ticket.card_point"
|
|
123
|
+
:isOld="false"
|
|
124
|
+
:font-size="24"
|
|
125
|
+
:icon-size="0.3"
|
|
126
|
+
:unit="ticket.unit || ''"
|
|
127
|
+
></xd-unit>
|
|
128
|
+
</view>
|
|
129
|
+
<view
|
|
130
|
+
v-if="ticket.card_use_point"
|
|
131
|
+
class="_item text-primary"
|
|
132
|
+
>
|
|
133
|
+
<text>使用:</text>
|
|
134
|
+
<xd-unit
|
|
135
|
+
:price="ticket.card_use_point"
|
|
136
|
+
:isOld="false"
|
|
137
|
+
:font-size="24"
|
|
138
|
+
:icon-size="0.3"
|
|
139
|
+
:unit="ticket.unit || ''"
|
|
140
|
+
></xd-unit>
|
|
141
|
+
<view v-if="ticket['card_discount_use_point'] > 0" class="discount">已优惠:{{ ticket['card_discount_use_point'] }}</view>
|
|
142
|
+
</view>
|
|
143
|
+
</view>
|
|
144
|
+
</view>
|
|
145
|
+
</view>
|
|
146
|
+
<view v-else>
|
|
147
|
+
<xd-no-data height="600rpx" :scaleSize="2">
|
|
148
|
+
<view class="empty_txt">
|
|
149
|
+
暂无可用票券
|
|
150
|
+
</view>
|
|
151
|
+
</xd-no-data>
|
|
152
|
+
</view>
|
|
153
|
+
<view class="bottom_btn" v-if="showCardDialog" :style="{bottom: (layoutInfo.bottom || 0) + 'rpx'}">
|
|
154
|
+
<xd-button
|
|
155
|
+
width="670rpx"
|
|
156
|
+
type="primary"
|
|
157
|
+
radius="40rpx"
|
|
158
|
+
v-if="checkedCards.length"
|
|
159
|
+
@click="handleChooseConfirm"
|
|
160
|
+
>确定</xd-button>
|
|
161
|
+
<xd-button
|
|
162
|
+
width="670rpx"
|
|
163
|
+
type="primary"
|
|
164
|
+
radius="40rpx"
|
|
165
|
+
v-else
|
|
166
|
+
:disabled="true"
|
|
167
|
+
@click="handleChooseConfirm"
|
|
168
|
+
>确定</xd-button>
|
|
169
|
+
</view>
|
|
170
|
+
</view>
|
|
171
|
+
</view>
|
|
172
|
+
</xd-down-drawer>
|
|
173
|
+
</view>
|
|
174
|
+
</view>
|
|
175
|
+
</template>
|
|
176
|
+
|
|
177
|
+
<script>
|
|
178
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
179
|
+
import XdNoData from "@/components/XdNoData/XdNoData";
|
|
180
|
+
import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer";
|
|
181
|
+
import XdRadio from "@/components/XdRadio/XdRadio";
|
|
182
|
+
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
183
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
184
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
185
|
+
import JfbBaseCardConsumpCodeMixin from "./JfbBaseCardConsumpCodeMixin";
|
|
186
|
+
import { gCPVal } from "@/utils/xd.base";
|
|
187
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
188
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
189
|
+
import { Base64 } from "js-base64";
|
|
190
|
+
|
|
191
|
+
export default {
|
|
192
|
+
name: "JfbBaseCardConsumpCode",
|
|
193
|
+
components: {
|
|
194
|
+
XdFontIcon,
|
|
195
|
+
XdNoData,
|
|
196
|
+
XdDownDrawer,
|
|
197
|
+
XdRadio,
|
|
198
|
+
XdUnit,
|
|
199
|
+
XdButton
|
|
200
|
+
},
|
|
201
|
+
mixins: [
|
|
202
|
+
componentsMixins, extsMixins, JfbBaseCardConsumpCodeMixin
|
|
203
|
+
],
|
|
204
|
+
data() {
|
|
205
|
+
return {
|
|
206
|
+
takeTitleName: '提货二维码',
|
|
207
|
+
info: null,
|
|
208
|
+
timeStr: "",
|
|
209
|
+
timeer: null,
|
|
210
|
+
date: 2, //时间底数
|
|
211
|
+
time: 2, //时间幂指数
|
|
212
|
+
refrushTimeer: null,
|
|
213
|
+
maxTime: 30, //最大执行时间幂指数
|
|
214
|
+
showCardList: [],
|
|
215
|
+
showCardDialog: false,
|
|
216
|
+
renderChecked: 'renderChecked',
|
|
217
|
+
chooseData: [],
|
|
218
|
+
checkedCards: [],
|
|
219
|
+
cardTypeData: [
|
|
220
|
+
{label: '已绑票券', value: 'normal'},
|
|
221
|
+
{label: '优惠券', value: 'coupon'},
|
|
222
|
+
],
|
|
223
|
+
show_type: 'normal', //normal:已绑定卡券 coupon: 优惠券
|
|
224
|
+
card_number: '',
|
|
225
|
+
|
|
226
|
+
//品牌logo
|
|
227
|
+
//#ifdef H5
|
|
228
|
+
brandLogo: '//img.jufubao.cn/common/jufubao_logo.png?v=1.0.0',
|
|
229
|
+
//#endif
|
|
230
|
+
//#ifdef MP-WEIXIN
|
|
231
|
+
brandLogo: 'https://img.jufubao.cn/common/jufubao_logo.png?v=1.0.0',
|
|
232
|
+
//#endif
|
|
233
|
+
isBrandLogo: false,
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
computed: {
|
|
237
|
+
activityType() {
|
|
238
|
+
return {
|
|
239
|
+
color: '#E5010E',
|
|
240
|
+
borderBottom: '6rpx solid #E5010E'
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
watch: {
|
|
245
|
+
container(value, oldValue) {
|
|
246
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
247
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
created() {
|
|
251
|
+
this.init(this.container);
|
|
252
|
+
},
|
|
253
|
+
methods: {
|
|
254
|
+
/**
|
|
255
|
+
* @description 监听页面进入,开始拉取展码数据
|
|
256
|
+
* @param options {object} 页面参数
|
|
257
|
+
*/
|
|
258
|
+
onJfbLoad(options) {
|
|
259
|
+
if (options["x-params"]) {
|
|
260
|
+
try {
|
|
261
|
+
let params = JSON.parse(Base64.decode(options["x-params"]));
|
|
262
|
+
if (params["qrcode_logo"]) this.brandLogo = params["qrcode_logo"];
|
|
263
|
+
} catch (e) {
|
|
264
|
+
console.warn(options["x-params"]);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
this.card_number = options.card_number;
|
|
268
|
+
if (this.card_number) {
|
|
269
|
+
this.dataInit();
|
|
270
|
+
} else {
|
|
271
|
+
//未带卡号入参时,拉取可用票券列表并默认选中登录卡
|
|
272
|
+
this.autoSelectCard();
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
* @description 拉取当前卡号的展码数据
|
|
277
|
+
*/
|
|
278
|
+
dataInit() {
|
|
279
|
+
if (!this.card_number) return;
|
|
280
|
+
this.detail();
|
|
281
|
+
this.refrush();
|
|
282
|
+
if (this.$configProject.isPreview) {
|
|
283
|
+
this.timeStr = "01分19秒"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
/**
|
|
287
|
+
* @description 监听事件变化
|
|
288
|
+
* @param container {object} 业务组件对象自己
|
|
289
|
+
*/
|
|
290
|
+
init(container) {
|
|
291
|
+
this.takeTitleName = gCPVal(container, 'takeTitleName', '提货二维码');
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
* @description 未带卡号入参时,拉取可用票券列表并默认选中登录卡
|
|
295
|
+
*/
|
|
296
|
+
autoSelectCard() {
|
|
297
|
+
this.fetchCardList('normal').then(normalList => {
|
|
298
|
+
let ticket = this.findDefaultTicket(normalList);
|
|
299
|
+
if (ticket) {
|
|
300
|
+
this.setCardList('normal', normalList);
|
|
301
|
+
this.useTicket(ticket);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
//已绑票券里没有可用的默认票券时,登录卡可能是一张优惠券(如满减券),切到优惠券再找一次
|
|
305
|
+
this.fetchCardList('coupon').then(couponList => {
|
|
306
|
+
let couponTicket = this.findDefaultTicket(couponList);
|
|
307
|
+
if (couponTicket) {
|
|
308
|
+
this.setCardList('coupon', couponList);
|
|
309
|
+
this.useTicket(couponTicket);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
//两处都没有可使用的票券:优先展示已绑票券,没有已绑票券时才展示优惠券
|
|
313
|
+
let isCoupon = !this.getVisibleCardList(normalList).length
|
|
314
|
+
&& this.getVisibleCardList(couponList).length > 0;
|
|
315
|
+
this.setCardList(isCoupon ? 'coupon' : 'normal', isCoupon ? couponList : normalList);
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
},
|
|
319
|
+
/**
|
|
320
|
+
* @description 取列表中的默认票券:优先登录卡,其次第一张可使用的票券
|
|
321
|
+
* @param list {Array} 票券列表
|
|
322
|
+
*/
|
|
323
|
+
findDefaultTicket(list) {
|
|
324
|
+
let usableList = list.filter(item => !this.isTicketDisabled(item));
|
|
325
|
+
return usableList.find(item => item.is_login === 'Y') || usableList[0];
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* @description 拉取指定类型的可用票券列表
|
|
329
|
+
* @param type {String} normal:已绑票券 coupon:优惠券
|
|
330
|
+
*/
|
|
331
|
+
fetchCardList(type) {
|
|
332
|
+
return jfbRootExec("getListEntryCardBind", {
|
|
333
|
+
vm: this,
|
|
334
|
+
data: {
|
|
335
|
+
is_all: 'Y',
|
|
336
|
+
is_show_entry_settings: 'N',
|
|
337
|
+
show_type: type
|
|
338
|
+
}
|
|
339
|
+
}).then(res => (res && res.list) || []).catch(() => []);
|
|
340
|
+
},
|
|
341
|
+
/**
|
|
342
|
+
* @description 设置当前展示的票券列表
|
|
343
|
+
* @param type {String} 列表对应的票券类型
|
|
344
|
+
* @param list {Array} 票券列表
|
|
345
|
+
*/
|
|
346
|
+
setCardList(type, list) {
|
|
347
|
+
this.show_type = type;
|
|
348
|
+
this.showCardList = this.getVisibleCardList(list);
|
|
349
|
+
this.renderChecked = Date.now();
|
|
350
|
+
},
|
|
351
|
+
/**
|
|
352
|
+
* @description 过滤出可展示的票券列表(已失效、已作废的票券不展示)
|
|
353
|
+
* @param list {Array} 票券列表
|
|
354
|
+
*/
|
|
355
|
+
getVisibleCardList(list) {
|
|
356
|
+
return list.filter(item => this.isCardVisible(item));
|
|
357
|
+
},
|
|
358
|
+
/**
|
|
359
|
+
* @description 票券是否可展示
|
|
360
|
+
* @param ticket {Object} 票券
|
|
361
|
+
*/
|
|
362
|
+
isCardVisible(ticket) {
|
|
363
|
+
return ticket.is_valid !== 'N' && ticket.card_status !== 'F';
|
|
364
|
+
},
|
|
365
|
+
/**
|
|
366
|
+
* @description 获取可切换的票券列表
|
|
367
|
+
* @param type {String} 指定拉取的票券类型,默认取当前选中tab
|
|
368
|
+
*/
|
|
369
|
+
getCardList(type) {
|
|
370
|
+
if (type) this.show_type = type;
|
|
371
|
+
this.fetchCardList(this.show_type).then(list => {
|
|
372
|
+
this.setCardList(this.show_type, list);
|
|
373
|
+
//回显当前正在使用的票券
|
|
374
|
+
let curTicket = this.showCardList.find(item => item.card_number === this.card_number);
|
|
375
|
+
this.chooseData = curTicket ? [curTicket] : [];
|
|
376
|
+
this.checkedCards = this.chooseData.map(item => item.card_number);
|
|
377
|
+
});
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* @description 选中并启用指定票券
|
|
381
|
+
* @param ticket {Object} 票券
|
|
382
|
+
*/
|
|
383
|
+
useTicket(ticket) {
|
|
384
|
+
this.handlerTicketSelect(true, ticket);
|
|
385
|
+
this.handleChooseConfirm();
|
|
386
|
+
},
|
|
387
|
+
handleRefresh() {
|
|
388
|
+
this.clearAllTimer();
|
|
389
|
+
this.dataInit();
|
|
390
|
+
},
|
|
391
|
+
handleChooseCard() {
|
|
392
|
+
this.showCardDialog = true;
|
|
393
|
+
this.getCardList();
|
|
394
|
+
},
|
|
395
|
+
/**
|
|
396
|
+
* @description 票券是否不可选中(不可展示或无可用点数)
|
|
397
|
+
* @param ticket {Object} 票券
|
|
398
|
+
*/
|
|
399
|
+
isTicketDisabled(ticket) {
|
|
400
|
+
return !this.isCardVisible(ticket) || ticket.card_point == 0;
|
|
401
|
+
},
|
|
402
|
+
handlerTicketSelect(flat, ticket) {
|
|
403
|
+
//不可使用的票券不允许选中
|
|
404
|
+
if (flat && this.isTicketDisabled(ticket)) return;
|
|
405
|
+
if (flat) {
|
|
406
|
+
this.chooseData = [ticket];
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
this.chooseData = [];
|
|
410
|
+
}
|
|
411
|
+
this.checkedCards = this.chooseData.map(item => item.card_number);
|
|
412
|
+
},
|
|
413
|
+
handleChangeType(type) {
|
|
414
|
+
if (this.show_type === type) return;
|
|
415
|
+
this.show_type = type;
|
|
416
|
+
this.getCardList();
|
|
417
|
+
},
|
|
418
|
+
handleChooseConfirm() {
|
|
419
|
+
if (!this.chooseData.length) return;
|
|
420
|
+
this.clearAllTimer();
|
|
421
|
+
this.card_number = this.chooseData[0].card_number;
|
|
422
|
+
this.dataInit();
|
|
423
|
+
this.showCardDialog = false;
|
|
424
|
+
},
|
|
425
|
+
/**
|
|
426
|
+
* @description 获取卡详情
|
|
427
|
+
*/
|
|
428
|
+
detail() {
|
|
429
|
+
jfbRootExec("getBaseByIdCardDetail", {
|
|
430
|
+
vm: this,
|
|
431
|
+
data: {card_number: this.card_number},
|
|
432
|
+
})
|
|
433
|
+
.then((res) => {
|
|
434
|
+
if (res && res.card_point) {
|
|
435
|
+
res["card_point"] = this.$xdUniHelper.divisionFloatNumber(res.card_point, 100);
|
|
436
|
+
}
|
|
437
|
+
if (res && res.other_card_point) {
|
|
438
|
+
res["other_card_point"] = this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100);
|
|
439
|
+
}
|
|
440
|
+
//展示品牌logo
|
|
441
|
+
if (res["is_show_qrcode_logo"] === "Y") {
|
|
442
|
+
this.isBrandLogo = true;
|
|
443
|
+
}
|
|
444
|
+
this.info = res;
|
|
445
|
+
this.showCardDialog = false;
|
|
446
|
+
if (!this.$configProject.isPreview) {
|
|
447
|
+
this.setInval(this.info.card_qrcode_expire);
|
|
448
|
+
}
|
|
449
|
+
})
|
|
450
|
+
.catch((err) => {
|
|
451
|
+
console.error(err);
|
|
452
|
+
});
|
|
453
|
+
},
|
|
454
|
+
/**
|
|
455
|
+
* @description 二维码过期倒计时
|
|
456
|
+
* @param time {Number} 过期秒数
|
|
457
|
+
*/
|
|
458
|
+
setInval(time) {
|
|
459
|
+
if (this.timeer) clearInterval(this.timeer);
|
|
460
|
+
this.timeer = setInterval(() => {
|
|
461
|
+
if (time <= 0) {
|
|
462
|
+
this.timeStr = "00分00秒";
|
|
463
|
+
clearInterval(this.timeer);
|
|
464
|
+
this.detail();
|
|
465
|
+
} else {
|
|
466
|
+
time--;
|
|
467
|
+
let f = Math.floor(time / 60);
|
|
468
|
+
f = f < 10 ? "0" + f : f;
|
|
469
|
+
let m = time % 60;
|
|
470
|
+
m = m < 10 ? "0" + m : m;
|
|
471
|
+
this.timeStr = `${f}分${m}秒`;
|
|
472
|
+
}
|
|
473
|
+
}, 1000);
|
|
474
|
+
},
|
|
475
|
+
/**
|
|
476
|
+
* @description 轮询刷新卡剩余点数
|
|
477
|
+
*/
|
|
478
|
+
refrush() {
|
|
479
|
+
if (this.time >= this.maxTime) {
|
|
480
|
+
clearTimeout(this.refrushTimeer);
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
this.time++;
|
|
484
|
+
let time = this.time >= 5 ? 32 * 1000 : Math.pow(this.date, this.time) * 1000;
|
|
485
|
+
this.refrushTimeer = setTimeout(() => {
|
|
486
|
+
jfbRootExec("getCardYue", {
|
|
487
|
+
vm: this,
|
|
488
|
+
data: {
|
|
489
|
+
card_number: this.card_number,
|
|
490
|
+
},
|
|
491
|
+
})
|
|
492
|
+
.then((res) => {
|
|
493
|
+
let refrushInfo = this.$xdUniHelper.cloneDeep(this.info);
|
|
494
|
+
if (res && res !== null && Object.keys(res).length > 0) {
|
|
495
|
+
if (res.card_point) {
|
|
496
|
+
refrushInfo.card_point = this.$xdUniHelper.divisionFloatNumber(
|
|
497
|
+
res.card_point,
|
|
498
|
+
100
|
|
499
|
+
);
|
|
500
|
+
}
|
|
501
|
+
if (res.other_card_point) {
|
|
502
|
+
refrushInfo.other_card_point =
|
|
503
|
+
this.$xdUniHelper.divisionFloatNumber(
|
|
504
|
+
res.other_card_point,
|
|
505
|
+
100
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
this.info = refrushInfo;
|
|
511
|
+
this.refrush();
|
|
512
|
+
})
|
|
513
|
+
.catch();
|
|
514
|
+
}, time);
|
|
515
|
+
},
|
|
516
|
+
/**
|
|
517
|
+
* @description 清除所有定时器
|
|
518
|
+
*/
|
|
519
|
+
clearAllTimer() {
|
|
520
|
+
this.timeStr = "";
|
|
521
|
+
if (this.timeer) {
|
|
522
|
+
clearInterval(this.timeer);
|
|
523
|
+
this.timeer = null;
|
|
524
|
+
}
|
|
525
|
+
if (this.refrushTimeer) {
|
|
526
|
+
clearTimeout(this.refrushTimeer);
|
|
527
|
+
this.refrushTimeer = null;
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
onJfbScroll(options) {
|
|
531
|
+
console.log('event.onJfbScroll', options)
|
|
532
|
+
},
|
|
533
|
+
onJfbReachBottom(options) {
|
|
534
|
+
console.log('event.onJfbReachBottom', options)
|
|
535
|
+
},
|
|
536
|
+
onJfbShow(options) {
|
|
537
|
+
console.log('event.onJfbShow', options)
|
|
538
|
+
//从其他页面返回时,二维码已失效且定时器已被清理,重新拉取展码数据
|
|
539
|
+
if (!this.card_number) return;
|
|
540
|
+
this.clearAllTimer();
|
|
541
|
+
this.dataInit();
|
|
542
|
+
},
|
|
543
|
+
onJfbHide(options) {
|
|
544
|
+
this.clearAllTimer();
|
|
545
|
+
},
|
|
546
|
+
onJfbUnload(options) {
|
|
547
|
+
this.clearAllTimer();
|
|
548
|
+
},
|
|
549
|
+
onJfbBack(options) {
|
|
550
|
+
this.clearAllTimer();
|
|
551
|
+
},
|
|
552
|
+
onJfbUpdate(...data) {
|
|
553
|
+
console.log('event.onJfbUpdate', data)
|
|
554
|
+
},
|
|
555
|
+
onJfbCustomEvent(options) {
|
|
556
|
+
console.log('event.onJfbReachBottom', options)
|
|
557
|
+
},
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
</script>
|
|
562
|
+
|
|
563
|
+
<style scoped lang="less">
|
|
564
|
+
@import "./JfbBaseCardConsumpCodeLess.less";
|
|
565
|
+
|
|
566
|
+
.jfb-base-card-consump-code {
|
|
567
|
+
&__body {
|
|
568
|
+
color: #333;
|
|
569
|
+
padding: unit(24, rpx);
|
|
570
|
+
|
|
571
|
+
.card-code {
|
|
572
|
+
background: #FFFFFF;
|
|
573
|
+
border-radius: unit(24, rpx);
|
|
574
|
+
padding: unit(32, rpx);
|
|
575
|
+
|
|
576
|
+
&__title {
|
|
577
|
+
display: flex;
|
|
578
|
+
align-items: center;
|
|
579
|
+
font-size: unit(32, rpx);
|
|
580
|
+
font-weight: 500;
|
|
581
|
+
|
|
582
|
+
& > text {
|
|
583
|
+
margin-left: unit(12, rpx);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.barcode_wrap {
|
|
588
|
+
display: flex;
|
|
589
|
+
justify-content: center;
|
|
590
|
+
align-items: center;
|
|
591
|
+
box-sizing: border-box;
|
|
592
|
+
padding-top: unit(40, rpx);
|
|
593
|
+
|
|
594
|
+
& > view {
|
|
595
|
+
width: 100%;
|
|
596
|
+
height: unit(160, rpx);
|
|
597
|
+
display: flex;
|
|
598
|
+
justify-content: center;
|
|
599
|
+
align-items: center;
|
|
600
|
+
|
|
601
|
+
& > image {
|
|
602
|
+
width: 100%;
|
|
603
|
+
max-height: unit(160, rpx);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.qrcode_wrap {
|
|
609
|
+
display: flex;
|
|
610
|
+
justify-content: center;
|
|
611
|
+
align-items: center;
|
|
612
|
+
position: relative;
|
|
613
|
+
padding: unit(40, rpx) 0;
|
|
614
|
+
|
|
615
|
+
& > image:first-child {
|
|
616
|
+
width: unit(280, rpx);
|
|
617
|
+
height: unit(280, rpx);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.logo-icon {
|
|
622
|
+
width: unit(64, rpx) !important;
|
|
623
|
+
height: unit(64, rpx) !important;
|
|
624
|
+
position: absolute;
|
|
625
|
+
top: 50%;
|
|
626
|
+
left: 50%;
|
|
627
|
+
transform: translate(unit(-32, rpx), unit(-32, rpx));
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
&__refresh {
|
|
631
|
+
display: flex;
|
|
632
|
+
flex-direction: column;
|
|
633
|
+
justify-content: center;
|
|
634
|
+
align-items: center;
|
|
635
|
+
padding-bottom: unit(30, rpx);
|
|
636
|
+
border-bottom: 1px solid #F2F2F2;
|
|
637
|
+
|
|
638
|
+
.refresh-text {
|
|
639
|
+
font-size: unit(28, rpx);
|
|
640
|
+
color: #333333;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.refresh-btn {
|
|
644
|
+
display: flex;
|
|
645
|
+
justify-content: center;
|
|
646
|
+
align-items: center;
|
|
647
|
+
height: unit(72, rpx);
|
|
648
|
+
margin-top: unit(24, rpx);
|
|
649
|
+
padding: 0 unit(44, rpx);
|
|
650
|
+
border: 1px solid #999;
|
|
651
|
+
border-radius: unit(36, rpx);
|
|
652
|
+
font-size: unit(28, rpx);
|
|
653
|
+
color: #333333;
|
|
654
|
+
|
|
655
|
+
& > text {
|
|
656
|
+
margin-left: unit(12, rpx);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
&__choose {
|
|
662
|
+
display: flex;
|
|
663
|
+
justify-content: space-between;
|
|
664
|
+
align-items: center;
|
|
665
|
+
padding: unit(30, rpx) 0;
|
|
666
|
+
font-size: unit(30, rpx);
|
|
667
|
+
|
|
668
|
+
.choose-left {
|
|
669
|
+
display: flex;
|
|
670
|
+
align-items: center;
|
|
671
|
+
|
|
672
|
+
& > text {
|
|
673
|
+
margin-left: unit(16, rpx);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.choose-right {
|
|
678
|
+
display: flex;
|
|
679
|
+
align-items: center;
|
|
680
|
+
color: #999999;
|
|
681
|
+
font-size: unit(26, rpx);
|
|
682
|
+
|
|
683
|
+
& > text {
|
|
684
|
+
margin-right: unit(4, rpx);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
&__info {
|
|
690
|
+
background: #F7F7F7;
|
|
691
|
+
border-radius: unit(12, rpx);
|
|
692
|
+
padding: unit(24, rpx) unit(28, rpx);
|
|
693
|
+
font-size: unit(28, rpx);
|
|
694
|
+
|
|
695
|
+
.info-row + .info-row {
|
|
696
|
+
margin-top: unit(16, rpx);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.info-tip {
|
|
700
|
+
color: #999999;
|
|
701
|
+
font-size: unit(26, rpx);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
&__empty {
|
|
706
|
+
.empty_txt {
|
|
707
|
+
padding: unit(30, rpx) 0;
|
|
708
|
+
color: #999999;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.drawer_content {
|
|
714
|
+
.ticket_title {
|
|
715
|
+
line-height: unit(100, rpx);
|
|
716
|
+
text-align: center;
|
|
717
|
+
font-size: unit(32, rpx);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.ticket_tab {
|
|
721
|
+
display: flex;
|
|
722
|
+
font-weight: 500;
|
|
723
|
+
font-size: unit(28, rpx);
|
|
724
|
+
|
|
725
|
+
& > view {
|
|
726
|
+
margin: 0 unit(24, rpx);
|
|
727
|
+
height: unit(72, rpx);
|
|
728
|
+
line-height: unit(72, rpx);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.ticket_content {
|
|
733
|
+
padding-bottom: unit(150, rpx);
|
|
734
|
+
overflow: auto;
|
|
735
|
+
position: relative;
|
|
736
|
+
|
|
737
|
+
.ticket_list {
|
|
738
|
+
max-height: 42vh;
|
|
739
|
+
overflow: auto;
|
|
740
|
+
|
|
741
|
+
.ticket_item {
|
|
742
|
+
width: unit(690, rpx);
|
|
743
|
+
border-radius: unit(10, rpx);
|
|
744
|
+
background: rgba(255, 255, 255, 1);
|
|
745
|
+
box-shadow: 0 0 6rpx 0 rgba(0, 0, 0, 0.1);
|
|
746
|
+
margin: unit(30, rpx) auto;
|
|
747
|
+
padding: unit(30, rpx) 0 unit(20, rpx);
|
|
748
|
+
|
|
749
|
+
._header {
|
|
750
|
+
display: flex;
|
|
751
|
+
justify-content: space-between;
|
|
752
|
+
padding: 0 unit(30, rpx);
|
|
753
|
+
font-size: unit(28, rpx);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
._cont {
|
|
757
|
+
display: flex;
|
|
758
|
+
font-size: unit(18, rpx);
|
|
759
|
+
padding: unit(24, rpx) unit(30, rpx);
|
|
760
|
+
border-bottom: 1px solid rgba(242, 242, 242, 1);
|
|
761
|
+
color: #777777;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
._footer {
|
|
765
|
+
display: flex;
|
|
766
|
+
justify-content: space-between;
|
|
767
|
+
padding: unit(24, rpx) unit(30, rpx) unit(12, rpx);
|
|
768
|
+
font-size: unit(24, rpx);
|
|
769
|
+
|
|
770
|
+
._item {
|
|
771
|
+
display: flex;
|
|
772
|
+
align-items: center;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.bottom_btn {
|
|
779
|
+
position: fixed;
|
|
780
|
+
width: 100%;
|
|
781
|
+
padding: unit(24, rpx) 0;
|
|
782
|
+
background: #FFFFFF;
|
|
783
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
784
|
+
box-sizing: border-box;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.flex {
|
|
790
|
+
display: flex;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.align-center {
|
|
794
|
+
align-items: center;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
::v-deep .xd-up-drawer {
|
|
800
|
+
z-index: 9999 !important;
|
|
801
|
+
}
|
|
802
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-base-card-consump-code {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&__body{
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
z-index: 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.editx,&.editx:hover {
|
|
25
|
+
position: relative;
|
|
26
|
+
min-height: unit(100, rpx);
|
|
27
|
+
z-index: 3;
|
|
28
|
+
&::after {
|
|
29
|
+
border: 2rpx dashed blue;
|
|
30
|
+
content: " ";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top:0;
|
|
33
|
+
left:0;
|
|
34
|
+
bottom:0;
|
|
35
|
+
right:0;
|
|
36
|
+
z-index: 4;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&__edit {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
position: absolute;
|
|
46
|
+
right: unit(0, rpx);
|
|
47
|
+
top: unit(-52, rpx);
|
|
48
|
+
height: unit(50, rpx);
|
|
49
|
+
line-height: unit(50, rpx);
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
background: rgba(0, 0, 0, .6);
|
|
54
|
+
border-radius: unit(10, rpx);
|
|
55
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
|
+
color: #fff;
|
|
57
|
+
font-size: unit(22, rpx);
|
|
58
|
+
|
|
59
|
+
&-icon{
|
|
60
|
+
padding: 0 unit(20, rpx);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.editx {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//end
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**notPreview**/
|
|
73
|
+
.jfb-base-card-consump-code {
|
|
74
|
+
//&:before {
|
|
75
|
+
//content: " ";
|
|
76
|
+
//display: table;
|
|
77
|
+
//}
|
|
78
|
+
}
|
|
79
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-base-card-consump-code'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
getCardYue: {},
|
|
5
|
+
getListEntryCardBind: {
|
|
6
|
+
list: [
|
|
7
|
+
{
|
|
8
|
+
card_number: "101001000008586",
|
|
9
|
+
card_type_name: "聚福宝福卡测试蛋糕",
|
|
10
|
+
end_time: "2027-07-31",
|
|
11
|
+
card_point: 99432830,
|
|
12
|
+
is_bind_card: true,
|
|
13
|
+
is_valid: "Y",
|
|
14
|
+
is_login: "Y",
|
|
15
|
+
unit: "点",
|
|
16
|
+
show_name: "聚福宝福卡测试蛋糕",
|
|
17
|
+
card_use_rule: "可凭本券到蛋糕(勿改)、电影(勿改)使用",
|
|
18
|
+
consume_type: "1",
|
|
19
|
+
is_auto_use: "N"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
card_number: "101001000009318",
|
|
23
|
+
card_type_name: "聚福宝福卡(点12位)",
|
|
24
|
+
end_time: "2027-03-31",
|
|
25
|
+
card_point: 98700,
|
|
26
|
+
is_bind_card: true,
|
|
27
|
+
is_valid: "Y",
|
|
28
|
+
is_login: "N",
|
|
29
|
+
unit: "点",
|
|
30
|
+
show_name: "聚福宝福卡(点12位)",
|
|
31
|
+
card_use_rule: "可凭本券到电影(勿改)、商城(对应百货)(勿改)、蛋糕(勿改)使用",
|
|
32
|
+
consume_type: "1",
|
|
33
|
+
is_auto_use: "N"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
card_number: "101001000009382",
|
|
37
|
+
card_type_name: "满50减50",
|
|
38
|
+
end_time: "2030-08-31",
|
|
39
|
+
card_point: 848815,
|
|
40
|
+
is_bind_card: true,
|
|
41
|
+
is_valid: "N",
|
|
42
|
+
is_login: "N",
|
|
43
|
+
unit: "点",
|
|
44
|
+
show_name: "满50减50",
|
|
45
|
+
card_use_rule: "满50减50",
|
|
46
|
+
consume_type: "2",
|
|
47
|
+
is_auto_use: "N"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
getBaseByIdCardDetail: {
|
|
52
|
+
is_show_qrcode_logo: "Y",
|
|
53
|
+
card_number: "101001000008586",
|
|
54
|
+
card_point: 99432830,
|
|
55
|
+
card_type_name: "聚福宝福卡测试蛋糕",
|
|
56
|
+
end_time: "2027-07-31",
|
|
57
|
+
card_status: "Y",
|
|
58
|
+
card_status_name: "开启",
|
|
59
|
+
card_qrcode: "//sandbox-apis.jufubao.cn/common/v1/image/qrcode?code_content=h.161.ktrd9ie2jnbkdb8",
|
|
60
|
+
barcode: "//sandbox-apis.jufubao.cn/common/v1/image/barcode?code_content=h.161.ktrd9ie2jnbkdb8",
|
|
61
|
+
card_qrcode_expire: 600,
|
|
62
|
+
unit: "点",
|
|
63
|
+
main_business_code_name: "蛋糕(勿改)",
|
|
64
|
+
other_card_point: 4073,
|
|
65
|
+
is_exchange: "N",
|
|
66
|
+
exchange_card_type_name: "福券",
|
|
67
|
+
exchange_card_point: 18330,
|
|
68
|
+
card_point_type: 2,
|
|
69
|
+
request_id: "ce26274fa52c8412"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -179,7 +179,9 @@
|
|
|
179
179
|
<view :style="{ color: mainColor }">{{item.status.status_name}}</view>
|
|
180
180
|
</view>
|
|
181
181
|
<view
|
|
182
|
-
style="
|
|
182
|
+
:style="{
|
|
183
|
+
borderBottom: info.is_ride_order ? '': '1px solid #eeeeee'
|
|
184
|
+
}"
|
|
183
185
|
v-for="(Sitem, Sindex) in item.products"
|
|
184
186
|
:key="Sindex"
|
|
185
187
|
>
|
|
@@ -238,7 +240,7 @@
|
|
|
238
240
|
</view>
|
|
239
241
|
<view
|
|
240
242
|
class="jfb-base-order-detail__body-delivery-bottom"
|
|
241
|
-
v-if="item.info && item.info.length > 0"
|
|
243
|
+
v-if="item.info && item.info.length > 0 && !info.is_ride_order"
|
|
242
244
|
>
|
|
243
245
|
<view class="jfb-base-order-detail__body-delivery-bottom-title">{{item.service_name}}</view>
|
|
244
246
|
<view
|
|
@@ -259,6 +261,30 @@
|
|
|
259
261
|
</view>
|
|
260
262
|
</view>
|
|
261
263
|
<!--mall code orders info-->
|
|
264
|
+
|
|
265
|
+
<view
|
|
266
|
+
v-if="info.is_ride_order"
|
|
267
|
+
:style="{
|
|
268
|
+
background: backgroundColor,
|
|
269
|
+
border: borderBox,
|
|
270
|
+
borderRadius: radius + 'rpx',
|
|
271
|
+
boxShadow: shadowBox,
|
|
272
|
+
marginBottom: padding + 'rpx',
|
|
273
|
+
}"
|
|
274
|
+
class="jfb-base-order-detail__body-card jfb-base-order-detail__body-booking"
|
|
275
|
+
>
|
|
276
|
+
<view class="jfb-base-order-detail__body-delivery-bottom-title">{{info.contacts_v2['title']}}</view>
|
|
277
|
+
<view class="jfb-base-order-detail__body-line"></view>
|
|
278
|
+
<view class="jfb-base-order-detail__body-booking-list">
|
|
279
|
+
<view v-for="(item,index) in info.contacts_v2['data']" :key="index" class="jfb-base-order-detail__body-booking-list-item">
|
|
280
|
+
<!-- <view :style="{color:mainColor,background:bgColor}" class="jfb-base-order-detail__body-booking-list-item-num">{{item.sub_title}}</view> -->
|
|
281
|
+
<view class="jfb-base-order-detail__body-booking-list-item-info">
|
|
282
|
+
<view class="jfb-base-order-detail__body-booking-list-item-info-item" v-for="(ls,index) in item['contact']" :key="index">{{ls.label}}:{{ls.value}}</view>
|
|
283
|
+
</view>
|
|
284
|
+
</view>
|
|
285
|
+
</view>
|
|
286
|
+
</view>
|
|
287
|
+
|
|
262
288
|
<view
|
|
263
289
|
v-if="info.settle_tag_info"
|
|
264
290
|
class="jfb-base-order-detail__body-card jfb-base-order-detail__body-settle"
|
|
@@ -913,7 +939,8 @@
|
|
|
913
939
|
v-if="info.contacts_v2 &&
|
|
914
940
|
info.contacts_v2['title'] &&
|
|
915
941
|
info.contacts_v2['data'] &&
|
|
916
|
-
info.contacts_v2['data'].length > 0
|
|
942
|
+
info.contacts_v2['data'].length > 0 &&
|
|
943
|
+
!info.is_ride_order"
|
|
917
944
|
:style="{
|
|
918
945
|
background: backgroundColor,
|
|
919
946
|
border: borderBox,
|