jufubao-base 1.0.56-beta17 → 1.0.56-beta19
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/JfbBaseCardDisabledEntry/Api.js +34 -0
- package/src/components/JfbBaseCardDisabledEntry/Attr.js +14 -0
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +275 -0
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntryLess.less +80 -0
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntryMixin.js +30 -0
- package/src/components/JfbBaseCardDisabledEntry/Mock.js +370 -0
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +2 -68
- package/src/mixins/colorCardMixins.js +60 -0
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description API模型
|
|
5
|
+
* 建议:Ffff=>模块 Xxxx=>自定义名字
|
|
6
|
+
* 获取单记录(getByIdFfffXxxx)
|
|
7
|
+
* 获取列表记录(getByListFfffXxxx)
|
|
8
|
+
* 添加列表记录(addFfffXxxxx)
|
|
9
|
+
* 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
|
|
10
|
+
* 更新列表记录(updateFfffXxxxx)
|
|
11
|
+
* @type {*[]}
|
|
12
|
+
*/
|
|
13
|
+
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mapFnName: 'disabledCardUnbindEntry',
|
|
16
|
+
isRule: false,
|
|
17
|
+
title: '解绑卡',
|
|
18
|
+
prefix: 'unbind',
|
|
19
|
+
path: '/card/v1/card-bind/unbind-card',
|
|
20
|
+
data: {
|
|
21
|
+
card_number: ['卡号', 'String', '必选'],
|
|
22
|
+
},
|
|
23
|
+
disabled: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
mapFnName: 'getDisableCardListEntry',
|
|
27
|
+
isRule: false,
|
|
28
|
+
title: '获得绑定卡',
|
|
29
|
+
prefix: 'list',
|
|
30
|
+
path: '/card/v1/card-bind/list-bind-card',
|
|
31
|
+
params: {},
|
|
32
|
+
disabled: true,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-card-disabled-entry"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx: isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-card-disabled-entry__edit"
|
|
10
|
+
:class="{ editx: isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-card-disabled-entry__edit-icon" @click="delEdit"
|
|
14
|
+
>删除</view
|
|
15
|
+
>
|
|
16
|
+
</view>
|
|
17
|
+
<!-- #endif -->
|
|
18
|
+
<view class="jfb-base-card-disabled-entry__body">
|
|
19
|
+
<view
|
|
20
|
+
class="jfb-base-card-disabled-entry__body-card"
|
|
21
|
+
v-if="disableList && disableList.length > 0"
|
|
22
|
+
>
|
|
23
|
+
<view
|
|
24
|
+
v-for="(item, index) in disableList"
|
|
25
|
+
:key="index"
|
|
26
|
+
class="jfb-base-card-disabled-entry__body-card-item"
|
|
27
|
+
>
|
|
28
|
+
<view class="jfb-base-card-disabled-entry__body-card-item-left">
|
|
29
|
+
<xd-font-icon
|
|
30
|
+
color="#B8B7BE"
|
|
31
|
+
size="100"
|
|
32
|
+
icon="iconyouhuiquan1-011"
|
|
33
|
+
></xd-font-icon>
|
|
34
|
+
<view style="color: #b8b7be">票券失效</view>
|
|
35
|
+
</view>
|
|
36
|
+
<view class="jfb-base-card-disabled-entry__body-card-item-right">
|
|
37
|
+
<view class="jfb-base-card-disabled-entry__body-card-item-right-top">
|
|
38
|
+
<view>
|
|
39
|
+
<xd-font-icon
|
|
40
|
+
icon="iconkaquan"
|
|
41
|
+
size="38"
|
|
42
|
+
:style="{marginRight: '18rpx'}"
|
|
43
|
+
color="#B8B7BE"
|
|
44
|
+
></xd-font-icon>
|
|
45
|
+
<view style="color: #b8b7be">{{ item.card_type_name }}</view>
|
|
46
|
+
</view>
|
|
47
|
+
<view>
|
|
48
|
+
<view>{{ item.card_number }}</view>
|
|
49
|
+
<view>有效期至:--</view>
|
|
50
|
+
</view>
|
|
51
|
+
</view>
|
|
52
|
+
<view class="jfb-base-card-disabled-entry__body-card-item-right-bottom">
|
|
53
|
+
<view class="jfb-base-card-disabled-entry__body-card-item-right-bottom-info">
|
|
54
|
+
<view
|
|
55
|
+
style="color: #b8b7be"
|
|
56
|
+
class="jfb-base-card-disabled-entry__body-card-item-right-bottom-info-residue"
|
|
57
|
+
>剩余{{ item.unit }}数:--{{ item.unit }}</view>
|
|
58
|
+
</view>
|
|
59
|
+
<view
|
|
60
|
+
@click.stop="handleUnBindCard(item)"
|
|
61
|
+
v-if="isShowUnbind"
|
|
62
|
+
:style="{ background: '#fff',color:'#999',border: '1px solid #999' }"
|
|
63
|
+
>解绑</view>
|
|
64
|
+
</view>
|
|
65
|
+
</view>
|
|
66
|
+
</view>
|
|
67
|
+
</view>
|
|
68
|
+
<xd-no-data height="80vh" v-else></xd-no-data>
|
|
69
|
+
</view>
|
|
70
|
+
</view>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script>
|
|
74
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
75
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
76
|
+
import JfbBaseCardDisabledEntryMixin from "./JfbBaseCardDisabledEntryMixin";
|
|
77
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
78
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
79
|
+
import XdNoData from '@/components/XdNoData/XdNoData'
|
|
80
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
81
|
+
export default {
|
|
82
|
+
name: "JfbBaseCardDisabledEntry",
|
|
83
|
+
components: {
|
|
84
|
+
XdFontIcon,
|
|
85
|
+
XdNoData
|
|
86
|
+
},
|
|
87
|
+
mixins: [componentsMixins, extsMixins, JfbBaseCardDisabledEntryMixin],
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
disableList: [],
|
|
91
|
+
isShowUnbind: false
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
watch: {
|
|
95
|
+
container(value) {
|
|
96
|
+
this.init(value);
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
created() {
|
|
100
|
+
this.init(this.container);
|
|
101
|
+
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
onJfbLoad(options) {
|
|
105
|
+
this.getCardList();
|
|
106
|
+
},
|
|
107
|
+
getCardList() {
|
|
108
|
+
this.$xdShowLoading({});
|
|
109
|
+
jfbRootExec("getDisableCardListEntry", {
|
|
110
|
+
vm: this,
|
|
111
|
+
data: {
|
|
112
|
+
is_all: "Y",
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
.then((res) => {
|
|
116
|
+
this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
|
|
117
|
+
res.list = res.list.map((item) => {
|
|
118
|
+
return {
|
|
119
|
+
...item,
|
|
120
|
+
card_point: this.$xdUniHelper.divisionFloatNumber(
|
|
121
|
+
item.card_point,
|
|
122
|
+
100
|
|
123
|
+
),
|
|
124
|
+
other_card_point: this.$xdUniHelper.divisionFloatNumber(
|
|
125
|
+
item.other_card_point,
|
|
126
|
+
100
|
|
127
|
+
),
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
this.disableList = res.list.filter((item) => {
|
|
131
|
+
return item["is_valid"] === "N";
|
|
132
|
+
});
|
|
133
|
+
this.$xdHideLoading();
|
|
134
|
+
})
|
|
135
|
+
.catch(() => this.$xdHideLoading());
|
|
136
|
+
},
|
|
137
|
+
handleUnBindCard(item) {
|
|
138
|
+
this.$xdConfirm({
|
|
139
|
+
$vm: this,
|
|
140
|
+
content: "您确定要解除绑定票券吗",
|
|
141
|
+
title: "系统提示",
|
|
142
|
+
width: "80%",
|
|
143
|
+
isTitle: true,
|
|
144
|
+
zIndex: 2000,
|
|
145
|
+
vm: this,
|
|
146
|
+
success: (res) => {
|
|
147
|
+
if (res.confirm) {
|
|
148
|
+
jfbRootExec("disabledCardUnbindEntry", {
|
|
149
|
+
vm: this,
|
|
150
|
+
data: {
|
|
151
|
+
card_number: item.card_number + "",
|
|
152
|
+
},
|
|
153
|
+
})
|
|
154
|
+
.then((res) => {
|
|
155
|
+
this.$xdAlert({
|
|
156
|
+
content: "解绑成功",
|
|
157
|
+
close: () => {
|
|
158
|
+
this.getCardList();
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
})
|
|
162
|
+
.catch((err) => {
|
|
163
|
+
console.log(err, "err");
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* @description 监听事件变化
|
|
171
|
+
* @param container {object} 业务组件对象自己
|
|
172
|
+
*/
|
|
173
|
+
init(container) {},
|
|
174
|
+
|
|
175
|
+
onJfbBack(options) {
|
|
176
|
+
console.log("event.onJfbBack", options);
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<style scoped lang="less">
|
|
183
|
+
@import "./JfbBaseCardDisabledEntryLess.less";
|
|
184
|
+
|
|
185
|
+
.jfb-base-card-disabled-entry {
|
|
186
|
+
&__body {
|
|
187
|
+
padding: unit(55, rpx) unit(35, rpx);
|
|
188
|
+
color: #333;
|
|
189
|
+
|
|
190
|
+
&-card {
|
|
191
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
192
|
+
box-sizing: border-box;
|
|
193
|
+
&-item {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: flex-start;
|
|
197
|
+
border: unit(2, rpx) solid #eeeeee;
|
|
198
|
+
border-radius: unit(20, rpx);
|
|
199
|
+
margin-bottom: unit(30, rpx);
|
|
200
|
+
background: #fff;
|
|
201
|
+
|
|
202
|
+
&-left {
|
|
203
|
+
width: unit(200, rpx);
|
|
204
|
+
display: flex;
|
|
205
|
+
flex-direction: column;
|
|
206
|
+
align-items: center;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
font-size: unit(24, rpx);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&-right {
|
|
212
|
+
flex: 1;
|
|
213
|
+
border-left: unit(2, rpx) solid #eeeeeeff;
|
|
214
|
+
|
|
215
|
+
&-top {
|
|
216
|
+
border-bottom: unit(2, rpx) solid #eeeeeeff;
|
|
217
|
+
padding: unit(30, rpx) unit(40, rpx);
|
|
218
|
+
|
|
219
|
+
& > view:nth-child(1) {
|
|
220
|
+
display: flex;
|
|
221
|
+
font-size: unit(28, rpx);
|
|
222
|
+
margin-bottom: unit(18, rpx);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
& > view:nth-child(2) {
|
|
226
|
+
font-size: unit(24, rpx);
|
|
227
|
+
color: #bbb;
|
|
228
|
+
|
|
229
|
+
& > view:nth-child(1) {
|
|
230
|
+
margin-right: unit(30, rpx);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&-bottom {
|
|
236
|
+
display: flex;
|
|
237
|
+
justify-content: space-between;
|
|
238
|
+
align-items: center;
|
|
239
|
+
padding: unit(30, rpx) unit(40, rpx);
|
|
240
|
+
|
|
241
|
+
&-info {
|
|
242
|
+
&-residue {
|
|
243
|
+
font-size: unit(24, rpx);
|
|
244
|
+
margin-bottom: unit(8, rpx);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&-deduction {
|
|
248
|
+
font-size: unit(24, rpx);
|
|
249
|
+
color: #bbb;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
& > view:nth-child(2) {
|
|
254
|
+
width: unit(80, rpx);
|
|
255
|
+
height: unit(40, rpx);
|
|
256
|
+
border-radius: unit(40, rpx);
|
|
257
|
+
font-size: unit(22, rpx);
|
|
258
|
+
color: #fff;
|
|
259
|
+
text-align: center;
|
|
260
|
+
line-height: unit(40, rpx);
|
|
261
|
+
padding: unit(5, rpx) unit(9, rpx);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&-disabled {
|
|
269
|
+
font-size: unit(28, rpx);
|
|
270
|
+
color: #b8b7be;
|
|
271
|
+
margin-bottom: unit(30, rpx);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
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-disabled-entry {
|
|
16
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
min-height: unit(100, rpx);
|
|
19
|
+
|
|
20
|
+
&__body{
|
|
21
|
+
position: relative;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
z-index: 2
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.editx {
|
|
27
|
+
position: relative;
|
|
28
|
+
border: 1px dashed blue;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
z-index: 3
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
border: 1px dashed blue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.noBorder {
|
|
39
|
+
border-color: rgba(0,0,0,0);
|
|
40
|
+
border-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
&__edit {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: unit(0, rpx);
|
|
48
|
+
top: unit(-52, rpx);
|
|
49
|
+
height: unit(50, rpx);
|
|
50
|
+
line-height: unit(50, rpx);
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background: rgba(0, 0, 0, .6);
|
|
55
|
+
border-radius: unit(10, rpx);
|
|
56
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
57
|
+
color: #fff;
|
|
58
|
+
font-size: unit(22, rpx);
|
|
59
|
+
|
|
60
|
+
&-icon{
|
|
61
|
+
padding: 0 unit(20, rpx);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.editx {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**notPreview**/
|
|
74
|
+
.jfb-base-card-disabled-entry {
|
|
75
|
+
&:before {
|
|
76
|
+
content: " ";
|
|
77
|
+
display: table;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**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-disabled-entry'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
getDisableCardListEntry: {
|
|
5
|
+
"list": [{
|
|
6
|
+
"card_number": "261001000002642",
|
|
7
|
+
"card_point": 10000,
|
|
8
|
+
"card_type_name": "大礼包测试",
|
|
9
|
+
"unit": "",
|
|
10
|
+
"end_time": "2025-04-31",
|
|
11
|
+
"is_valid": "Y",
|
|
12
|
+
"main_business_code_name": "",
|
|
13
|
+
"other_card_point": 0,
|
|
14
|
+
"is_exchange": "N",
|
|
15
|
+
"card_point_type": 1
|
|
16
|
+
}, {
|
|
17
|
+
"card_number": "261001000002792",
|
|
18
|
+
"card_point": 10000,
|
|
19
|
+
"card_type_name": "A加盟商大礼包",
|
|
20
|
+
"unit": "次",
|
|
21
|
+
"end_time": "2024-05-31",
|
|
22
|
+
"is_valid": "Y",
|
|
23
|
+
"main_business_code_name": "",
|
|
24
|
+
"other_card_point": 0,
|
|
25
|
+
"is_exchange": "N",
|
|
26
|
+
"card_point_type": 1
|
|
27
|
+
}, {
|
|
28
|
+
"card_number": "261001000002644",
|
|
29
|
+
"card_point": 10000,
|
|
30
|
+
"card_type_name": "大礼包测试",
|
|
31
|
+
"unit": "点",
|
|
32
|
+
"end_time": "2025-03-31",
|
|
33
|
+
"is_valid": "Y",
|
|
34
|
+
"main_business_code_name": "",
|
|
35
|
+
"other_card_point": 0,
|
|
36
|
+
"is_exchange": "N",
|
|
37
|
+
"card_point_type": 1
|
|
38
|
+
}, {
|
|
39
|
+
"card_number": "261001000002637",
|
|
40
|
+
"card_point": 10000,
|
|
41
|
+
"card_type_name": "大礼包测试",
|
|
42
|
+
"unit": "点",
|
|
43
|
+
"end_time": "2025-03-31",
|
|
44
|
+
"is_valid": "Y",
|
|
45
|
+
"main_business_code_name": "",
|
|
46
|
+
"other_card_point": 0,
|
|
47
|
+
"is_exchange": "N",
|
|
48
|
+
"card_point_type": 1
|
|
49
|
+
}, {
|
|
50
|
+
"card_number": "261001000002511",
|
|
51
|
+
"card_point": 500928,
|
|
52
|
+
"card_type_name": "加盟商福卡",
|
|
53
|
+
"unit": "点",
|
|
54
|
+
"end_time": "2024-07-31",
|
|
55
|
+
"is_valid": "Y",
|
|
56
|
+
"main_business_code_name": "",
|
|
57
|
+
"other_card_point": 0,
|
|
58
|
+
"is_exchange": "N",
|
|
59
|
+
"card_point_type": 1
|
|
60
|
+
}, {
|
|
61
|
+
"card_number": "261001000002611",
|
|
62
|
+
"card_point": 100,
|
|
63
|
+
"card_type_name": "大礼包测试",
|
|
64
|
+
"unit": "点",
|
|
65
|
+
"end_time": "2023-07-31",
|
|
66
|
+
"is_valid": "Y",
|
|
67
|
+
"main_business_code_name": "",
|
|
68
|
+
"other_card_point": 0,
|
|
69
|
+
"is_exchange": "N",
|
|
70
|
+
"card_point_type": 1
|
|
71
|
+
}, {
|
|
72
|
+
"card_number": "261001000002600",
|
|
73
|
+
"card_point": 10000,
|
|
74
|
+
"card_type_name": "大礼包测试",
|
|
75
|
+
"unit": "点",
|
|
76
|
+
"end_time": "2023-09-23",
|
|
77
|
+
"is_valid": "Y",
|
|
78
|
+
"main_business_code_name": "",
|
|
79
|
+
"other_card_point": 0,
|
|
80
|
+
"is_exchange": "N",
|
|
81
|
+
"card_point_type": 1
|
|
82
|
+
}, {
|
|
83
|
+
"card_number": "261001000002598",
|
|
84
|
+
"card_point": 10000,
|
|
85
|
+
"card_type_name": "大礼包测试",
|
|
86
|
+
"unit": "点",
|
|
87
|
+
"end_time": "2023-12-31",
|
|
88
|
+
"is_valid": "Y",
|
|
89
|
+
"main_business_code_name": "",
|
|
90
|
+
"other_card_point": 0,
|
|
91
|
+
"is_exchange": "N",
|
|
92
|
+
"card_point_type": 1
|
|
93
|
+
}, {
|
|
94
|
+
"card_number": "261001000002646",
|
|
95
|
+
"card_point": 0,
|
|
96
|
+
"card_type_name": "大礼包测试",
|
|
97
|
+
"unit": "次",
|
|
98
|
+
"end_time": "2025-03-31",
|
|
99
|
+
"is_valid": "N",
|
|
100
|
+
"main_business_code_name": "",
|
|
101
|
+
"other_card_point": 0,
|
|
102
|
+
"is_exchange": "N",
|
|
103
|
+
"card_point_type": 1
|
|
104
|
+
}, {
|
|
105
|
+
"card_number": "261001000002643",
|
|
106
|
+
"card_point": 0,
|
|
107
|
+
"card_type_name": "大礼包测试",
|
|
108
|
+
"unit": "点",
|
|
109
|
+
"end_time": "2025-03-31",
|
|
110
|
+
"is_valid": "N",
|
|
111
|
+
"main_business_code_name": "",
|
|
112
|
+
"other_card_point": 0,
|
|
113
|
+
"is_exchange": "N",
|
|
114
|
+
"card_point_type": 1
|
|
115
|
+
}, {
|
|
116
|
+
"card_number": "261001000002641",
|
|
117
|
+
"card_point": 0,
|
|
118
|
+
"card_type_name": "大礼包测试",
|
|
119
|
+
"unit": "",
|
|
120
|
+
"end_time": "2025-03-31",
|
|
121
|
+
"is_valid": "N",
|
|
122
|
+
"main_business_code_name": "",
|
|
123
|
+
"other_card_point": 0,
|
|
124
|
+
"is_exchange": "N",
|
|
125
|
+
"card_point_type": 1
|
|
126
|
+
}, {
|
|
127
|
+
"card_number": "261001000002640",
|
|
128
|
+
"card_point": 0,
|
|
129
|
+
"card_type_name": "大礼包测试",
|
|
130
|
+
"unit": "点",
|
|
131
|
+
"end_time": "2025-03-31",
|
|
132
|
+
"is_valid": "N",
|
|
133
|
+
"main_business_code_name": "",
|
|
134
|
+
"other_card_point": 0,
|
|
135
|
+
"is_exchange": "N",
|
|
136
|
+
"card_point_type": 1
|
|
137
|
+
}, {
|
|
138
|
+
"card_number": "261001000002639",
|
|
139
|
+
"card_point": 0,
|
|
140
|
+
"card_type_name": "大礼包测试",
|
|
141
|
+
"unit": "点",
|
|
142
|
+
"end_time": "2025-03-31",
|
|
143
|
+
"is_valid": "N",
|
|
144
|
+
"main_business_code_name": "",
|
|
145
|
+
"other_card_point": 0,
|
|
146
|
+
"is_exchange": "N",
|
|
147
|
+
"card_point_type": 1
|
|
148
|
+
}, {
|
|
149
|
+
"card_number": "261001000002636",
|
|
150
|
+
"card_point": 0,
|
|
151
|
+
"card_type_name": "大礼包测试",
|
|
152
|
+
"unit": "点",
|
|
153
|
+
"end_time": "2025-03-31",
|
|
154
|
+
"is_valid": "N",
|
|
155
|
+
"main_business_code_name": "",
|
|
156
|
+
"other_card_point": 0,
|
|
157
|
+
"is_exchange": "N",
|
|
158
|
+
"card_point_type": 1
|
|
159
|
+
}, {
|
|
160
|
+
"card_number": "261001000002634",
|
|
161
|
+
"card_point": 0,
|
|
162
|
+
"card_type_name": "大礼包测试",
|
|
163
|
+
"unit": "点",
|
|
164
|
+
"end_time": "2025-03-31",
|
|
165
|
+
"is_valid": "N",
|
|
166
|
+
"main_business_code_name": "",
|
|
167
|
+
"other_card_point": 0,
|
|
168
|
+
"is_exchange": "N",
|
|
169
|
+
"card_point_type": 1
|
|
170
|
+
}, {
|
|
171
|
+
"card_number": "261001000002632",
|
|
172
|
+
"card_point": 0,
|
|
173
|
+
"card_type_name": "大礼包测试",
|
|
174
|
+
"unit": "点",
|
|
175
|
+
"end_time": "2024-10-31",
|
|
176
|
+
"is_valid": "N",
|
|
177
|
+
"main_business_code_name": "",
|
|
178
|
+
"other_card_point": 0,
|
|
179
|
+
"is_exchange": "N",
|
|
180
|
+
"card_point_type": 1
|
|
181
|
+
}, {
|
|
182
|
+
"card_number": "261001000002631",
|
|
183
|
+
"card_point": 0,
|
|
184
|
+
"card_type_name": "大礼包测试",
|
|
185
|
+
"unit": "点",
|
|
186
|
+
"end_time": "2024-10-31",
|
|
187
|
+
"is_valid": "N",
|
|
188
|
+
"main_business_code_name": "",
|
|
189
|
+
"other_card_point": 0,
|
|
190
|
+
"is_exchange": "N",
|
|
191
|
+
"card_point_type": 1
|
|
192
|
+
}, {
|
|
193
|
+
"card_number": "261001000002630",
|
|
194
|
+
"card_point": 0,
|
|
195
|
+
"card_type_name": "大礼包测试",
|
|
196
|
+
"unit": "点",
|
|
197
|
+
"end_time": "2024-10-31",
|
|
198
|
+
"is_valid": "N",
|
|
199
|
+
"main_business_code_name": "",
|
|
200
|
+
"other_card_point": 0,
|
|
201
|
+
"is_exchange": "N",
|
|
202
|
+
"card_point_type": 1
|
|
203
|
+
}, {
|
|
204
|
+
"card_number": "261001000002629",
|
|
205
|
+
"card_point": 0,
|
|
206
|
+
"card_type_name": "大礼包测试",
|
|
207
|
+
"unit": "点",
|
|
208
|
+
"end_time": "2024-10-31",
|
|
209
|
+
"is_valid": "N",
|
|
210
|
+
"main_business_code_name": "",
|
|
211
|
+
"other_card_point": 0,
|
|
212
|
+
"is_exchange": "N",
|
|
213
|
+
"card_point_type": 1
|
|
214
|
+
}, {
|
|
215
|
+
"card_number": "261001000002628",
|
|
216
|
+
"card_point": 0,
|
|
217
|
+
"card_type_name": "大礼包测试",
|
|
218
|
+
"unit": "点",
|
|
219
|
+
"end_time": "2024-10-31",
|
|
220
|
+
"is_valid": "N",
|
|
221
|
+
"main_business_code_name": "",
|
|
222
|
+
"other_card_point": 0,
|
|
223
|
+
"is_exchange": "N",
|
|
224
|
+
"card_point_type": 1
|
|
225
|
+
}, {
|
|
226
|
+
"card_number": "261001000002627",
|
|
227
|
+
"card_point": 0,
|
|
228
|
+
"card_type_name": "大礼包测试",
|
|
229
|
+
"unit": "点",
|
|
230
|
+
"end_time": "2024-10-31",
|
|
231
|
+
"is_valid": "N",
|
|
232
|
+
"main_business_code_name": "",
|
|
233
|
+
"other_card_point": 0,
|
|
234
|
+
"is_exchange": "N",
|
|
235
|
+
"card_point_type": 1
|
|
236
|
+
}, {
|
|
237
|
+
"card_number": "261001000002626",
|
|
238
|
+
"card_point": 0,
|
|
239
|
+
"card_type_name": "大礼包测试",
|
|
240
|
+
"unit": "点",
|
|
241
|
+
"end_time": "2024-10-31",
|
|
242
|
+
"is_valid": "N",
|
|
243
|
+
"main_business_code_name": "",
|
|
244
|
+
"other_card_point": 0,
|
|
245
|
+
"is_exchange": "N",
|
|
246
|
+
"card_point_type": 1
|
|
247
|
+
}, {
|
|
248
|
+
"card_number": "261001000002613",
|
|
249
|
+
"card_point": 0,
|
|
250
|
+
"card_type_name": "大礼包测试",
|
|
251
|
+
"unit": "点",
|
|
252
|
+
"end_time": "2023-07-29",
|
|
253
|
+
"is_valid": "N",
|
|
254
|
+
"main_business_code_name": "",
|
|
255
|
+
"other_card_point": 0,
|
|
256
|
+
"is_exchange": "N",
|
|
257
|
+
"card_point_type": 1
|
|
258
|
+
}, {
|
|
259
|
+
"card_number": "261001000002612",
|
|
260
|
+
"card_point": 0,
|
|
261
|
+
"card_type_name": "大礼包测试",
|
|
262
|
+
"unit": "点",
|
|
263
|
+
"end_time": "2023-07-31",
|
|
264
|
+
"is_valid": "N",
|
|
265
|
+
"main_business_code_name": "",
|
|
266
|
+
"other_card_point": 0,
|
|
267
|
+
"is_exchange": "N",
|
|
268
|
+
"card_point_type": 1
|
|
269
|
+
}, {
|
|
270
|
+
"card_number": "261001000002610",
|
|
271
|
+
"card_point": 0,
|
|
272
|
+
"card_type_name": "大礼包测试",
|
|
273
|
+
"unit": "点",
|
|
274
|
+
"end_time": "2023-06-30",
|
|
275
|
+
"is_valid": "N",
|
|
276
|
+
"main_business_code_name": "",
|
|
277
|
+
"other_card_point": 0,
|
|
278
|
+
"is_exchange": "N",
|
|
279
|
+
"card_point_type": 1
|
|
280
|
+
}, {
|
|
281
|
+
"card_number": "261001000002606",
|
|
282
|
+
"card_point": 0,
|
|
283
|
+
"card_type_name": "大礼包测试",
|
|
284
|
+
"unit": "点",
|
|
285
|
+
"end_time": "2023-06-30",
|
|
286
|
+
"is_valid": "N",
|
|
287
|
+
"main_business_code_name": "",
|
|
288
|
+
"other_card_point": 0,
|
|
289
|
+
"is_exchange": "N",
|
|
290
|
+
"card_point_type": 1
|
|
291
|
+
}, {
|
|
292
|
+
"card_number": "261001000002605",
|
|
293
|
+
"card_point": 0,
|
|
294
|
+
"card_type_name": "大礼包测试",
|
|
295
|
+
"unit": "点",
|
|
296
|
+
"end_time": "2023-06-30",
|
|
297
|
+
"is_valid": "N",
|
|
298
|
+
"main_business_code_name": "",
|
|
299
|
+
"other_card_point": 0,
|
|
300
|
+
"is_exchange": "N",
|
|
301
|
+
"card_point_type": 1
|
|
302
|
+
}, {
|
|
303
|
+
"card_number": "261001000002604",
|
|
304
|
+
"card_point": 10000,
|
|
305
|
+
"card_type_name": "大礼包测试",
|
|
306
|
+
"unit": "点",
|
|
307
|
+
"end_time": "2023-06-30",
|
|
308
|
+
"is_valid": "N",
|
|
309
|
+
"main_business_code_name": "",
|
|
310
|
+
"other_card_point": 0,
|
|
311
|
+
"is_exchange": "N",
|
|
312
|
+
"card_point_type": 1
|
|
313
|
+
}, {
|
|
314
|
+
"card_number": "261001000002603",
|
|
315
|
+
"card_point": 0,
|
|
316
|
+
"card_type_name": "大礼包测试",
|
|
317
|
+
"unit": "点",
|
|
318
|
+
"end_time": "2023-06-30",
|
|
319
|
+
"is_valid": "N",
|
|
320
|
+
"main_business_code_name": "",
|
|
321
|
+
"other_card_point": 0,
|
|
322
|
+
"is_exchange": "N",
|
|
323
|
+
"card_point_type": 1
|
|
324
|
+
}, {
|
|
325
|
+
"card_number": "261001000002779",
|
|
326
|
+
"card_point": 0,
|
|
327
|
+
"card_type_name": "A加盟商大礼包",
|
|
328
|
+
"unit": "点",
|
|
329
|
+
"end_time": "2023-06-30",
|
|
330
|
+
"is_valid": "N",
|
|
331
|
+
"main_business_code_name": "",
|
|
332
|
+
"other_card_point": 0,
|
|
333
|
+
"is_exchange": "N",
|
|
334
|
+
"card_point_type": 1
|
|
335
|
+
}, {
|
|
336
|
+
"card_number": "261001000002595",
|
|
337
|
+
"card_point": 0,
|
|
338
|
+
"card_type_name": "大礼包测试",
|
|
339
|
+
"unit": "点",
|
|
340
|
+
"end_time": "2024-04-30",
|
|
341
|
+
"is_valid": "N",
|
|
342
|
+
"main_business_code_name": "",
|
|
343
|
+
"other_card_point": 0,
|
|
344
|
+
"is_exchange": "N",
|
|
345
|
+
"card_point_type": 1
|
|
346
|
+
}, {
|
|
347
|
+
"card_number": "261001000002593",
|
|
348
|
+
"card_point": 0,
|
|
349
|
+
"card_type_name": "大礼包测试",
|
|
350
|
+
"unit": "",
|
|
351
|
+
"end_time": "2023-07-31",
|
|
352
|
+
"is_valid": "N",
|
|
353
|
+
"main_business_code_name": "",
|
|
354
|
+
"other_card_point": 0,
|
|
355
|
+
"is_exchange": "N",
|
|
356
|
+
"card_point_type": 1
|
|
357
|
+
}, {
|
|
358
|
+
"card_number": "261001000002495",
|
|
359
|
+
"card_point": 0,
|
|
360
|
+
"card_type_name": "加盟商福卡",
|
|
361
|
+
"unit": "点",
|
|
362
|
+
"end_time": "2025-02-28",
|
|
363
|
+
"is_valid": "N",
|
|
364
|
+
"main_business_code_name": "",
|
|
365
|
+
"other_card_point": 0,
|
|
366
|
+
"is_exchange": "N",
|
|
367
|
+
"card_point_type": 1
|
|
368
|
+
}], "request_id": "789d6f655c63f12f"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
@@ -239,10 +239,10 @@ import { jfbRootExec } from "@/utils/xd.event";
|
|
|
239
239
|
import JfbBaseCardEntryMixin from "./JfbBaseCardEntryMixin";
|
|
240
240
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
241
241
|
import extsMixins from "@/mixins/extsMixins";
|
|
242
|
+
import colorCardMixins from "@/mixins/colorCardMixins";
|
|
242
243
|
import { mapState, mapActions } from "vuex";
|
|
243
244
|
import { getContainerPropsValue, isWechat } from "@/utils/xd.base";
|
|
244
245
|
import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
|
|
245
|
-
import getServiceUrl from "@/common/getServiceUrl";
|
|
246
246
|
import { Base64 } from "js-base64";
|
|
247
247
|
const Color = require("color");
|
|
248
248
|
|
|
@@ -254,7 +254,7 @@ export default {
|
|
|
254
254
|
XdNoticeBar,
|
|
255
255
|
XdCardV2
|
|
256
256
|
},
|
|
257
|
-
mixins: [componentsMixins, extsMixins, JfbBaseCardEntryMixin],
|
|
257
|
+
mixins: [componentsMixins, extsMixins, JfbBaseCardEntryMixin, colorCardMixins],
|
|
258
258
|
computed: {
|
|
259
259
|
...mapState({
|
|
260
260
|
jwxSDK: (state) => state.jwxSDK,
|
|
@@ -263,7 +263,6 @@ export default {
|
|
|
263
263
|
showList(){
|
|
264
264
|
return this.tabIndex === 1 ? this.cardList: this.changeList
|
|
265
265
|
},
|
|
266
|
-
loginName:{}
|
|
267
266
|
},
|
|
268
267
|
filters:{
|
|
269
268
|
cutstr(val){
|
|
@@ -303,28 +302,6 @@ export default {
|
|
|
303
302
|
disabledUrl: "",
|
|
304
303
|
//cardLayout: "1", //票券布局
|
|
305
304
|
showDisabled: 'Y',
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
cardThemesColor: [
|
|
309
|
-
// 'radial-gradient(50% 50%, rgba(255, 151, 128, 1) 0%, rgba(255, 64, 61, 1) 100%)',
|
|
310
|
-
// 'radial-gradient(50% 50%, rgba(247, 198, 35, 1) 0%, rgba(255, 81, 0, 1) 99.91%)',
|
|
311
|
-
// 'radial-gradient(50% 50%, rgba(0, 207, 193, 1) 0%, rgba(0, 117, 108, 1) 99.91%)',
|
|
312
|
-
// 'radial-gradient(50% 50%, rgba(255, 148, 77, 1) 0%, rgba(240, 92, 0, 1) 100%)',
|
|
313
|
-
// 'radial-gradient(50% 50%, rgba(252, 126, 49, 1) 0%, rgba(255, 143, 67, 1) 100%)',
|
|
314
|
-
'#FF524D', '#FFAA00', '#00C2B8', '#33AAFF', '#FF8636', '#FF744A', '#38C4EB', '#AF5EE0', '#D98643', '#17C26F'
|
|
315
|
-
],
|
|
316
|
-
cardThemesImage: [
|
|
317
|
-
'//img.jufubao.cn/component/card/1.png',
|
|
318
|
-
'//img.jufubao.cn/component/card/2.png',
|
|
319
|
-
'//img.jufubao.cn/component/card/3.png',
|
|
320
|
-
'//img.jufubao.cn/component/card/4.png',
|
|
321
|
-
'//img.jufubao.cn/component/card/5.png',
|
|
322
|
-
'//img.jufubao.cn/component/card/6.png',
|
|
323
|
-
'//img.jufubao.cn/component/card/7.png',
|
|
324
|
-
'//img.jufubao.cn/component/card/8.png',
|
|
325
|
-
'//img.jufubao.cn/component/card/9.png',
|
|
326
|
-
'//img.jufubao.cn/component/card/10.png'
|
|
327
|
-
],
|
|
328
305
|
|
|
329
306
|
//活动
|
|
330
307
|
dialogEvent: false,
|
|
@@ -355,49 +332,6 @@ export default {
|
|
|
355
332
|
|
|
356
333
|
},
|
|
357
334
|
methods: {
|
|
358
|
-
stringToNumber(str) {
|
|
359
|
-
let result = 0;
|
|
360
|
-
let len = str.length;
|
|
361
|
-
for (let i = 0; i < len; i++) {
|
|
362
|
-
result = result + str.charCodeAt(i) + i;
|
|
363
|
-
}
|
|
364
|
-
return result;
|
|
365
|
-
},
|
|
366
|
-
getCardThemes(name){
|
|
367
|
-
let colorLen = this.cardThemesColor.length;
|
|
368
|
-
let imgLen = this.cardThemesImage.length;
|
|
369
|
-
let colorIndex = this.stringToNumber(name)% colorLen;
|
|
370
|
-
let imgIndex = this.stringToNumber(name) % imgLen;
|
|
371
|
-
return {
|
|
372
|
-
color: this.cardThemesColor[colorIndex],
|
|
373
|
-
image: this.cardThemesImage[imgIndex],
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
|
|
377
|
-
getEntry(codes=[] , allEntry=[]){
|
|
378
|
-
//无支持业务线或者未配置业务入口
|
|
379
|
-
if(codes.length ===0 || allEntry.length === 0) return [];
|
|
380
|
-
|
|
381
|
-
let support = [];
|
|
382
|
-
codes.map(bus=>{
|
|
383
|
-
allEntry.map(it=>{
|
|
384
|
-
it['image_url'] = getServiceUrl(it['image_url'])
|
|
385
|
-
if(bus === it['business_code']){
|
|
386
|
-
support.push(it);
|
|
387
|
-
}
|
|
388
|
-
})
|
|
389
|
-
});
|
|
390
|
-
return support
|
|
391
|
-
},
|
|
392
|
-
|
|
393
|
-
getCardGroupItem(list, allEntry){
|
|
394
|
-
list.map(item=>{
|
|
395
|
-
//设置卡片样式
|
|
396
|
-
item['theme'] = this.getCardThemes(item['card_type_name'] + item['card_type']);
|
|
397
|
-
item['entries'] = this.getEntry(item['business_codes'], allEntry)
|
|
398
|
-
});
|
|
399
|
-
return list
|
|
400
|
-
},
|
|
401
335
|
|
|
402
336
|
init(container){
|
|
403
337
|
//设置
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {mapActions, mapMutations} from 'vuex';
|
|
3
|
+
import storage from "@/common/storage";
|
|
4
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
data() {
|
|
8
|
+
return {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
created(){
|
|
14
|
+
debugger
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
methods: {
|
|
18
|
+
stringToNumber(str) {
|
|
19
|
+
let result = 0;
|
|
20
|
+
let len = str.length;
|
|
21
|
+
for (let i = 0; i < len; i++) {
|
|
22
|
+
result = result + str.charCodeAt(i) + i;
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
},
|
|
26
|
+
getCardThemes(name) {
|
|
27
|
+
let colorLen = this.cardThemesColor.length;
|
|
28
|
+
let imgLen = this.cardThemesImage.length;
|
|
29
|
+
let colorIndex = this.stringToNumber(name) % colorLen;
|
|
30
|
+
let imgIndex = this.stringToNumber(name) % imgLen;
|
|
31
|
+
return {
|
|
32
|
+
color: this.cardThemesColor[colorIndex],
|
|
33
|
+
image: this.cardThemesImage[imgIndex],
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
getEntry(codes = [], allEntry = []) {
|
|
37
|
+
//无支持业务线或者未配置业务入口
|
|
38
|
+
if (codes.length === 0 || allEntry.length === 0) return [];
|
|
39
|
+
|
|
40
|
+
let support = [];
|
|
41
|
+
codes.map(bus => {
|
|
42
|
+
allEntry.map(it => {
|
|
43
|
+
it['image_url'] = getServiceUrl(it['image_url'])
|
|
44
|
+
if (bus === it['business_code']) {
|
|
45
|
+
support.push(it);
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
return support
|
|
50
|
+
},
|
|
51
|
+
getCardGroupItem(list, allEntry) {
|
|
52
|
+
list.map(item => {
|
|
53
|
+
//设置卡片样式
|
|
54
|
+
item['theme'] = this.getCardThemes(item['card_type_name'] + item['card_type']);
|
|
55
|
+
item['entries'] = this.getEntry(item['business_codes'], allEntry)
|
|
56
|
+
});
|
|
57
|
+
return list
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
}
|