jufubao-base 1.0.56-beta3 → 1.0.56-beta5
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/JfbBaseCardEntry/Api.js +43 -0
- package/src/components/JfbBaseCardEntry/Attr.js +297 -0
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +808 -0
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntryLess.less +80 -0
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntryMixin.js +30 -0
- package/src/components/JfbBaseCardEntry/Mock.js +113 -0
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 卡券登陆
|
|
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: 'loginEntryCardBind',
|
|
19
|
+
isRule: false,
|
|
20
|
+
title: '登录卡',
|
|
21
|
+
prefix: 'login',
|
|
22
|
+
path: '/card/v1/card-bind/login-card',
|
|
23
|
+
data: {
|
|
24
|
+
card_number: ['卡号', 'String', '必选'],
|
|
25
|
+
},
|
|
26
|
+
disabled: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
mapFnName: 'getListBaseNewsContent', //自定义方法名字(必选)
|
|
30
|
+
title: '获取内容',
|
|
31
|
+
path: '/cms/v1/news-content',
|
|
32
|
+
isRule: false,
|
|
33
|
+
params: {
|
|
34
|
+
scene: ['使用场景', 'String', '选填'],
|
|
35
|
+
container_id: ['插件ID', 'String', '必填'],
|
|
36
|
+
page_id: ['页面ID', 'String', '必填'],
|
|
37
|
+
page_size: ['记录条数', 'Number', '必填', 1],
|
|
38
|
+
code: ['业务线id', 'String', '选填'],
|
|
39
|
+
},
|
|
40
|
+
isConsole: true,
|
|
41
|
+
disabled: true,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
style: [],
|
|
5
|
+
advanced: [],
|
|
6
|
+
content: [
|
|
7
|
+
{
|
|
8
|
+
label: "票券布局",
|
|
9
|
+
ele: "xd-radio",
|
|
10
|
+
valueKey: "cardLayout",
|
|
11
|
+
value: "1",
|
|
12
|
+
list: [
|
|
13
|
+
{label: "布局1", value: "1"},
|
|
14
|
+
{label: "布局2", value: "2"},
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: '票券登陆文案:',
|
|
19
|
+
ele: 'el-input',
|
|
20
|
+
type: 'text',
|
|
21
|
+
valueKey: 'login_name',
|
|
22
|
+
value: '',
|
|
23
|
+
placeholder: '请输入票券登陆文案',
|
|
24
|
+
className: 'input80',
|
|
25
|
+
inline: false,
|
|
26
|
+
notice: '当未设置文案时候,前台页面显示为"<span style="color:red">登录</span>"'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: '失效卡列表地址:', //label
|
|
30
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
31
|
+
valueKey: 'disabled_url', //form[valueKey]
|
|
32
|
+
placeholder: '请选择失效卡列表地址',
|
|
33
|
+
value: null,
|
|
34
|
+
setting: {
|
|
35
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
36
|
+
},
|
|
37
|
+
inline: false,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: '卡券详情地址:', //label
|
|
41
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
42
|
+
valueKey: 'detail_url', //form[valueKey]
|
|
43
|
+
placeholder: '请选择卡券详情地址',
|
|
44
|
+
value: null,
|
|
45
|
+
setting: {
|
|
46
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
47
|
+
},
|
|
48
|
+
inline: false,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: '卡券转换地址:', //label
|
|
52
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
53
|
+
valueKey: 'change_url', //form[valueKey]
|
|
54
|
+
placeholder: '请选择卡券转换地址',
|
|
55
|
+
value: null,
|
|
56
|
+
setting: {
|
|
57
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
58
|
+
},
|
|
59
|
+
inline: false,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: '卡券绑定地址:', //label
|
|
63
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
64
|
+
valueKey: 'bind_url', //form[valueKey]
|
|
65
|
+
placeholder: '请选择卡券绑定地址',
|
|
66
|
+
value: null,
|
|
67
|
+
setting: {
|
|
68
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
69
|
+
},
|
|
70
|
+
inline: false,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: '卡券绑定确认地址:', //label
|
|
74
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
75
|
+
valueKey: 'confirm_url', //form[valueKey]
|
|
76
|
+
placeholder: '请选择卡券绑定确认地址',
|
|
77
|
+
value: null,
|
|
78
|
+
setting: {
|
|
79
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
80
|
+
},
|
|
81
|
+
inline: false,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: '提示内容:',
|
|
85
|
+
ele: 'xd-site-news',
|
|
86
|
+
valueKey: 'notice',
|
|
87
|
+
value: null,
|
|
88
|
+
className: 'input70',
|
|
89
|
+
setting: {
|
|
90
|
+
config: {
|
|
91
|
+
sort: true,
|
|
92
|
+
maxlen: 100,
|
|
93
|
+
action: 'aliyun',
|
|
94
|
+
size: 5,
|
|
95
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
|
|
96
|
+
uploadType: 'aliyun',
|
|
97
|
+
type: ['jpg', 'png', 'jpeg']
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
handleCustom({action, data}) {
|
|
101
|
+
if (data && data.params) {
|
|
102
|
+
//当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
|
|
103
|
+
//data.params = Object.assign({}, data.params, {code: 'g_test_id'});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//获取返回参数(场景类型名称为必填)
|
|
107
|
+
let loading = XdBus.getParentApi('loading')({});
|
|
108
|
+
|
|
109
|
+
//获取显示内容
|
|
110
|
+
if (action === 'screen') {
|
|
111
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
|
|
112
|
+
.then(res => {
|
|
113
|
+
loading.close();
|
|
114
|
+
data.cb(res['list'])
|
|
115
|
+
})
|
|
116
|
+
.catch(error => {
|
|
117
|
+
console.error(error);
|
|
118
|
+
loading.close();
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
//获取返回参数(广告位高度必选项)
|
|
124
|
+
if (action === 'getNewsInfo') {
|
|
125
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
126
|
+
.then(res => {
|
|
127
|
+
loading.close()
|
|
128
|
+
data.cb({list: res.list, selectId: res.selected})
|
|
129
|
+
})
|
|
130
|
+
.catch(error => {
|
|
131
|
+
loading.close()
|
|
132
|
+
console.error(error);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
//获取产品业务线列表
|
|
137
|
+
if (action === 'namespace') {
|
|
138
|
+
XdBus.getParentApi('getOptionsNamespaces')({})
|
|
139
|
+
.then(res => {
|
|
140
|
+
loading.close()
|
|
141
|
+
data.cb(res['list'])
|
|
142
|
+
})
|
|
143
|
+
.catch(error => {
|
|
144
|
+
loading.close()
|
|
145
|
+
console.error(error);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
//使用内容分类
|
|
150
|
+
if (action === 'cmsPublishEditxContent') {
|
|
151
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
152
|
+
.then(res => {
|
|
153
|
+
console.log('cmsPublishEditxContent', res)
|
|
154
|
+
loading.close();
|
|
155
|
+
data.cb(res)
|
|
156
|
+
})
|
|
157
|
+
.catch(error => {
|
|
158
|
+
loading.close();
|
|
159
|
+
console.error(error);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
//位置列表
|
|
164
|
+
if (action === 'getListPostion') {
|
|
165
|
+
XdBus.getParentApi('getListNewsPosition')(data.params)
|
|
166
|
+
.then(res => {
|
|
167
|
+
loading.close();
|
|
168
|
+
data.cb(res)
|
|
169
|
+
})
|
|
170
|
+
.catch(error => {
|
|
171
|
+
loading.close();
|
|
172
|
+
console.error(error);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
//位置创建
|
|
177
|
+
if (action === 'addPostion') {
|
|
178
|
+
XdBus.getParentApi('addNewsPosition')(data.params)
|
|
179
|
+
.then(res => {
|
|
180
|
+
loading.close();
|
|
181
|
+
data.cb(true)
|
|
182
|
+
})
|
|
183
|
+
.catch(error => {
|
|
184
|
+
console.error(error);
|
|
185
|
+
loading.close();
|
|
186
|
+
data.cb(false)
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
//位置编辑
|
|
191
|
+
if (action === 'editPostion') {
|
|
192
|
+
XdBus.getParentApi('updateNewsPosition')(data.params)
|
|
193
|
+
.then(res => {
|
|
194
|
+
loading.close();
|
|
195
|
+
data.cb(true)
|
|
196
|
+
})
|
|
197
|
+
.catch(error => {
|
|
198
|
+
console.error(error);
|
|
199
|
+
loading.close();
|
|
200
|
+
data.cb(false)
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
//位置删除
|
|
205
|
+
if (action === 'deleltePostion') {
|
|
206
|
+
XdBus.getParentApi('deleteNewsPosition')(data.params)
|
|
207
|
+
.then(res => {
|
|
208
|
+
loading.close();
|
|
209
|
+
data.cb(true)
|
|
210
|
+
})
|
|
211
|
+
.catch(error => {
|
|
212
|
+
console.error(error);
|
|
213
|
+
loading.close();
|
|
214
|
+
data.cb(false)
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
//获取广告位内容列表
|
|
219
|
+
if (action === 'getListContent') {
|
|
220
|
+
XdBus.getParentApi('getListNewsContent')(data.params)
|
|
221
|
+
.then(res => {
|
|
222
|
+
loading.close();
|
|
223
|
+
data.cb(res)
|
|
224
|
+
})
|
|
225
|
+
.catch(error => {
|
|
226
|
+
loading.close();
|
|
227
|
+
console.error(error);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
//广告内容创建
|
|
232
|
+
if (action === 'addContent') {
|
|
233
|
+
XdBus.getParentApi('addNewsContent')(data.params)
|
|
234
|
+
.then(res => {
|
|
235
|
+
loading.close();
|
|
236
|
+
data.cb(true)
|
|
237
|
+
})
|
|
238
|
+
.catch(error => {
|
|
239
|
+
console.error(error);
|
|
240
|
+
loading.close();
|
|
241
|
+
data.cb(false)
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
//广告内容编辑
|
|
246
|
+
if (action === 'editContent') {
|
|
247
|
+
XdBus.getParentApi('updateNewsContent')(data.params)
|
|
248
|
+
.then(res => {
|
|
249
|
+
loading.close();
|
|
250
|
+
data.cb(true)
|
|
251
|
+
})
|
|
252
|
+
.catch(error => {
|
|
253
|
+
console.error(error);
|
|
254
|
+
loading.close();
|
|
255
|
+
data.cb(false)
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
//广告内容删除
|
|
260
|
+
if (action === 'deleteContent') {
|
|
261
|
+
XdBus.getParentApi('deleteNewsContent')(data.params)
|
|
262
|
+
.then(res => {
|
|
263
|
+
loading.close();
|
|
264
|
+
data.cb(true)
|
|
265
|
+
})
|
|
266
|
+
.catch(error => {
|
|
267
|
+
console.error(error);
|
|
268
|
+
loading.close();
|
|
269
|
+
data.cb(false)
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
//内容发布
|
|
274
|
+
if (action === 'publish') {
|
|
275
|
+
console.log('publish', data.params)
|
|
276
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
277
|
+
.then(res => {
|
|
278
|
+
loading.close();
|
|
279
|
+
data.cb(res)
|
|
280
|
+
})
|
|
281
|
+
.catch(error => {
|
|
282
|
+
loading.close();
|
|
283
|
+
console.error(error);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
//通知页面进行刷新
|
|
288
|
+
if (action === 'update') {
|
|
289
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
290
|
+
loading.close()
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
inline: false,
|
|
294
|
+
notice: '请配置温馨提示内容,未配置的情况将不显示此模块',
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
};
|
|
@@ -0,0 +1,808 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-card-entry"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{
|
|
6
|
+
editx: isEditx && active,
|
|
7
|
+
noBorder: noBorder,
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
10
|
+
<!--#ifdef H5-->
|
|
11
|
+
<view
|
|
12
|
+
class="jfb-base-card-entry__edit"
|
|
13
|
+
:class="{ editx: isEditx && active }"
|
|
14
|
+
v-if="isEditx && active && !noBorder"
|
|
15
|
+
>
|
|
16
|
+
<view class="jfb-base-card-entry__edit-icon" @click="delEdit">删除</view>
|
|
17
|
+
</view>
|
|
18
|
+
<!-- #endif -->
|
|
19
|
+
<view class="jfb-base-card-entry__body">
|
|
20
|
+
<view class="jfb-base-card-entry__body-cut">
|
|
21
|
+
<template v-if="isWx">
|
|
22
|
+
<view
|
|
23
|
+
class="jfb-base-card-entry__body-cut-item"
|
|
24
|
+
@click="handleScan"
|
|
25
|
+
:style="{
|
|
26
|
+
background: cutIndex === 1 ? mainColor : '#fff',
|
|
27
|
+
borderColor: mainColor,
|
|
28
|
+
color: cutIndex === 1 ? '#fff' : mainColor,
|
|
29
|
+
}"
|
|
30
|
+
>
|
|
31
|
+
<view>使用扫码绑定</view>
|
|
32
|
+
<xd-font-icon
|
|
33
|
+
:style="{marginLeft: '15rpx'}"
|
|
34
|
+
size="50"
|
|
35
|
+
icon="iconsaoma"
|
|
36
|
+
></xd-font-icon>
|
|
37
|
+
|
|
38
|
+
</view>
|
|
39
|
+
<view
|
|
40
|
+
class="jfb-base-card-entry__body-cut-item"
|
|
41
|
+
@click="handleToLink(bindUrl)"
|
|
42
|
+
:style="{
|
|
43
|
+
background: cutIndex === 2 ? mainColor : '#fff',
|
|
44
|
+
borderColor: mainColor,
|
|
45
|
+
color: cutIndex === 2 ? '#fff' : mainColor,
|
|
46
|
+
}"
|
|
47
|
+
>
|
|
48
|
+
<view>券号密码绑定</view>
|
|
49
|
+
<xd-font-icon
|
|
50
|
+
:style="{marginLeft: '15rpx'}"
|
|
51
|
+
size="50"
|
|
52
|
+
icon="iconyuechi"
|
|
53
|
+
></xd-font-icon>
|
|
54
|
+
|
|
55
|
+
</view>
|
|
56
|
+
</template>
|
|
57
|
+
<template v-else>
|
|
58
|
+
<view
|
|
59
|
+
class="jfb-base-card-entry__body-cut-item one"
|
|
60
|
+
@click="handleToLink(bindUrl)"
|
|
61
|
+
:style="{
|
|
62
|
+
background: cutIndex === 2 ? mainColor : '#fff',
|
|
63
|
+
borderColor: mainColor,
|
|
64
|
+
color: cutIndex === 2 ? '#fff' : mainColor,
|
|
65
|
+
}"
|
|
66
|
+
>
|
|
67
|
+
<xd-font-icon size="40" icon="iconyuechi"></xd-font-icon>
|
|
68
|
+
<view>券号密码绑定</view>
|
|
69
|
+
</view>
|
|
70
|
+
</template>
|
|
71
|
+
</view>
|
|
72
|
+
<view
|
|
73
|
+
class="jfb-base-card-entry__body-notice"
|
|
74
|
+
:style="{ background: noticeBackgroundColor }"
|
|
75
|
+
v-if="notice"
|
|
76
|
+
>
|
|
77
|
+
<xd-notice-bar
|
|
78
|
+
:showIcon="true"
|
|
79
|
+
:scrollable="true"
|
|
80
|
+
:speed="20"
|
|
81
|
+
:fontSize="24"
|
|
82
|
+
:height="70"
|
|
83
|
+
:is-no-bgc="false"
|
|
84
|
+
>
|
|
85
|
+
<template>
|
|
86
|
+
<view v-html="notice"></view>
|
|
87
|
+
</template>
|
|
88
|
+
</xd-notice-bar>
|
|
89
|
+
</view>
|
|
90
|
+
<view
|
|
91
|
+
v-if="noticeStatus && isPreview && notice === ''"
|
|
92
|
+
class="jfb-base-card-entry__body-notice"
|
|
93
|
+
:style="{
|
|
94
|
+
background: noticeBackgroundColor,
|
|
95
|
+
textAlign: 'center',
|
|
96
|
+
color: dangerColor,
|
|
97
|
+
fontSize: 26 + 'rpx',
|
|
98
|
+
}"
|
|
99
|
+
>
|
|
100
|
+
该组件未配置数据,因此改模块在正式环境将不显示</view
|
|
101
|
+
>
|
|
102
|
+
<view class="jfb-base-card-entry__body-tab">
|
|
103
|
+
<view
|
|
104
|
+
@click="tabIndex = 1"
|
|
105
|
+
:style="{
|
|
106
|
+
color: tabIndex === 1 ? '#fff' : '#B8B7BE',
|
|
107
|
+
background: tabIndex === 1 ? mainColor : '#fff',
|
|
108
|
+
}"
|
|
109
|
+
>已绑定票券</view>
|
|
110
|
+
<view
|
|
111
|
+
v-if="changeList.length > 0"
|
|
112
|
+
@click="tabIndex = 2"
|
|
113
|
+
:style="{
|
|
114
|
+
color: tabIndex === 2 ? '#fff' : '#B8B7BE',
|
|
115
|
+
background: tabIndex === 2 ? mainColor : '#fff',
|
|
116
|
+
}"
|
|
117
|
+
>
|
|
118
|
+
可转换票券
|
|
119
|
+
</view>
|
|
120
|
+
</view>
|
|
121
|
+
<view
|
|
122
|
+
class="jfb-base-card-entry__body-tips"
|
|
123
|
+
:style="{ color: mainColor }"
|
|
124
|
+
v-if="tabIndex === 2"
|
|
125
|
+
>*目前仅支持电影票兑换券进行转换</view
|
|
126
|
+
>
|
|
127
|
+
<view
|
|
128
|
+
v-if="tabIndex === 2 || tabIndex === 1"
|
|
129
|
+
class="jfb-base-card-entry__body-card"
|
|
130
|
+
>
|
|
131
|
+
<view
|
|
132
|
+
v-for="(item,index) in cardList"
|
|
133
|
+
class="card-list"
|
|
134
|
+
:key="item.card_number"
|
|
135
|
+
:style="{
|
|
136
|
+
backgroundImage: item['theme']['color'],
|
|
137
|
+
}"
|
|
138
|
+
>
|
|
139
|
+
<view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
|
|
140
|
+
<view class="card-list__title"><view>{{item['card_type_name']}}</view></view>
|
|
141
|
+
<div class="card-list__content">
|
|
142
|
+
<view>
|
|
143
|
+
<text>券号:</text>
|
|
144
|
+
<text>{{item.card_number}}</text>
|
|
145
|
+
</view>
|
|
146
|
+
<view @click.stop="toDetail(item)">
|
|
147
|
+
<view>
|
|
148
|
+
<xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
|
|
149
|
+
</view>
|
|
150
|
+
<view>点击查看</view>
|
|
151
|
+
</view>
|
|
152
|
+
</div>
|
|
153
|
+
<view class="card-list__date">
|
|
154
|
+
<text>有效期:</text>
|
|
155
|
+
<text>{{item.end_time}}</text>
|
|
156
|
+
</view>
|
|
157
|
+
<view class="card-list__yue">
|
|
158
|
+
<text>余额:</text>
|
|
159
|
+
<text>{{item.card_point}}</text>
|
|
160
|
+
</view>
|
|
161
|
+
<view class="card-list__other" v-if="item.other_card_point && item.card_point_type !== 1">
|
|
162
|
+
<view><text>购买其他物品可抵:</text><text>{{item.other_card_point}}</text></view>
|
|
163
|
+
</view>
|
|
164
|
+
<view class="card-list__entry" v-if="item.entry.length === 1">
|
|
165
|
+
<view :style="{color: mainColor}">{{login_name}}</view>
|
|
166
|
+
</view>
|
|
167
|
+
<view class="card-list__nodata" v-if="item.entry.length === 0">暂无支持服务列表</view>
|
|
168
|
+
<view class="card-list__entrys" v-if="item.entry.length > 1">
|
|
169
|
+
<view>
|
|
170
|
+
<view></view>
|
|
171
|
+
<view></view>
|
|
172
|
+
</view>
|
|
173
|
+
<div></div>
|
|
174
|
+
</view>
|
|
175
|
+
</view>
|
|
176
|
+
|
|
177
|
+
</view>
|
|
178
|
+
</view>
|
|
179
|
+
<view v-if="showDisabled==='Y'" @click="handleToDisabled" class="jfb-base-card-entry__body-disabled">
|
|
180
|
+
已失效票券>>>
|
|
181
|
+
</view>
|
|
182
|
+
</view>
|
|
183
|
+
<view class="jfb-base-card-entry__body-dialog" v-if="dialogEvent">
|
|
184
|
+
<view class="jfb-base-card-entry__body-dialog-content">
|
|
185
|
+
<image
|
|
186
|
+
class="jfb-base-card-entry__body-dialog-content-img"
|
|
187
|
+
alt=""
|
|
188
|
+
:src="popup"
|
|
189
|
+
></image>
|
|
190
|
+
<xd-font-icon
|
|
191
|
+
icon="icondanchuangguanbi_xian"
|
|
192
|
+
width="52"
|
|
193
|
+
height="52"
|
|
194
|
+
size="26"
|
|
195
|
+
color="#fff"
|
|
196
|
+
class="jfb-base-card-entry-entry__body-dialog-content-close"
|
|
197
|
+
@click="dialogEvent = false"
|
|
198
|
+
></xd-font-icon>
|
|
199
|
+
</view>
|
|
200
|
+
</view>
|
|
201
|
+
</view>
|
|
202
|
+
</template>
|
|
203
|
+
|
|
204
|
+
<script>
|
|
205
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
206
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
207
|
+
import XdCardV2 from "@/components/XdCardV2/XdCardV2";
|
|
208
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
209
|
+
import JfbBaseCardEntryMixin from "./JfbBaseCardEntryMixin";
|
|
210
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
211
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
212
|
+
import { mapState, mapActions } from "vuex";
|
|
213
|
+
import { getContainerPropsValue, isWechat } from "@/utils/xd.base";
|
|
214
|
+
import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
|
|
215
|
+
import { Base64 } from "js-base64";
|
|
216
|
+
const Color = require("color");
|
|
217
|
+
|
|
218
|
+
export default {
|
|
219
|
+
name: "JfbBaseCardEntry",
|
|
220
|
+
components: {
|
|
221
|
+
XdFontIcon,
|
|
222
|
+
XdButton,
|
|
223
|
+
XdNoticeBar,
|
|
224
|
+
XdCardV2
|
|
225
|
+
},
|
|
226
|
+
mixins: [componentsMixins, extsMixins, JfbBaseCardEntryMixin],
|
|
227
|
+
computed: {
|
|
228
|
+
...mapState({
|
|
229
|
+
jwxSDK: (state) => state.jwxSDK,
|
|
230
|
+
jfbAuthorize: (state) => state.jfbAuthorize,
|
|
231
|
+
}),
|
|
232
|
+
},
|
|
233
|
+
watch: {
|
|
234
|
+
tabIndex(newVal, oldVal) {
|
|
235
|
+
if (newVal === 1) {
|
|
236
|
+
this.showList = this.cardList;
|
|
237
|
+
} else {
|
|
238
|
+
this.showList = this.changeList;
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
container(value) {
|
|
242
|
+
this.init(value)
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
data() {
|
|
246
|
+
return {
|
|
247
|
+
//提示文案
|
|
248
|
+
noticeBackgroundColor: "",
|
|
249
|
+
notice: "",
|
|
250
|
+
isPreview: false,
|
|
251
|
+
noticeStatus: false,
|
|
252
|
+
|
|
253
|
+
isWx: true,
|
|
254
|
+
cutIndex: 1,
|
|
255
|
+
tabIndex: 1,
|
|
256
|
+
isBack: null, //是否使用返回键
|
|
257
|
+
cardList: [],
|
|
258
|
+
showList: [],
|
|
259
|
+
changeList: [],
|
|
260
|
+
disableList: [],
|
|
261
|
+
inCallback: null, //内部跳转地址
|
|
262
|
+
|
|
263
|
+
//页面跳转地址
|
|
264
|
+
login_name:'',//登陆文案
|
|
265
|
+
changeUrl: "",
|
|
266
|
+
bindUrl: "",
|
|
267
|
+
detailUrl: "",
|
|
268
|
+
confirmUrl: "",
|
|
269
|
+
//allEntryPath: "", //综合福利入口页
|
|
270
|
+
disabledUrl: "",
|
|
271
|
+
cardLayout: "1", //票券布局
|
|
272
|
+
showDisabled: 'Y',
|
|
273
|
+
|
|
274
|
+
cardThemesColor: [
|
|
275
|
+
'radial-gradient(50% 50%, rgba(255, 151, 128, 1) 0%, rgba(255, 64, 61, 1) 100%)',
|
|
276
|
+
'radial-gradient(50% 50%, rgba(247, 198, 35, 1) 0%, rgba(255, 81, 0, 1) 99.91%)',
|
|
277
|
+
'radial-gradient(50% 50%, rgba(0, 207, 193, 1) 0%, rgba(0, 117, 108, 1) 99.91%)',
|
|
278
|
+
'radial-gradient(50% 50%, rgba(255, 148, 77, 1) 0%, rgba(240, 92, 0, 1) 100%)',
|
|
279
|
+
'radial-gradient(50% 50%, rgba(252, 126, 49, 1) 0%, rgba(255, 143, 67, 1) 100%)'
|
|
280
|
+
],
|
|
281
|
+
cardThemesImage: [
|
|
282
|
+
'//img.jufubao.cn/component/card/vip.png',
|
|
283
|
+
//'//img.jufubao.cn/component/card/vip2.png'
|
|
284
|
+
],
|
|
285
|
+
|
|
286
|
+
//活动
|
|
287
|
+
dialogEvent: false,
|
|
288
|
+
popup: "https://img.zcool.cn/community/01784158abe781a801219c77e981ee.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100",
|
|
289
|
+
};
|
|
290
|
+
},
|
|
291
|
+
created() {
|
|
292
|
+
this.init(this.container);
|
|
293
|
+
this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
294
|
+
this.isPreview = this.$configProject.isPreview;
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
//#ifdef H5
|
|
298
|
+
this.isWx = isWechat();
|
|
299
|
+
if (!this.$configProject.isPreview) {
|
|
300
|
+
jfbRootExec("getH5WxAuthorize", {
|
|
301
|
+
vm: this,
|
|
302
|
+
data: {site_id: "wx_pub"},
|
|
303
|
+
})
|
|
304
|
+
.then()
|
|
305
|
+
.catch(error=>{
|
|
306
|
+
this.$xdAlert({
|
|
307
|
+
content: error,
|
|
308
|
+
});
|
|
309
|
+
})
|
|
310
|
+
}
|
|
311
|
+
// #endif
|
|
312
|
+
|
|
313
|
+
},
|
|
314
|
+
methods: {
|
|
315
|
+
stringToNumber(str) {
|
|
316
|
+
let result = 0;
|
|
317
|
+
let len = str.length;
|
|
318
|
+
for (let i = 0; i < len; i++) {
|
|
319
|
+
result = result + str.charCodeAt(i) + i;
|
|
320
|
+
}
|
|
321
|
+
return result;
|
|
322
|
+
},
|
|
323
|
+
getCardThemes(name){
|
|
324
|
+
let colorLen = this.cardThemesColor.length;
|
|
325
|
+
let imgLen = this.cardThemesImage.length;
|
|
326
|
+
let colorIndex = this.stringToNumber(name)% colorLen;
|
|
327
|
+
let imgIndex = this.stringToNumber(name) % imgLen;
|
|
328
|
+
return {
|
|
329
|
+
color: this.cardThemesColor[colorIndex],
|
|
330
|
+
image: this.cardThemesImage[imgIndex],
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
|
|
334
|
+
getEntry(codes=[] , allEntry=[]){
|
|
335
|
+
//无支持业务线或者未配置业务入口
|
|
336
|
+
if(codes.length ===0 || allEntry.length === 0) return [];
|
|
337
|
+
|
|
338
|
+
let support = [];
|
|
339
|
+
codes.map(bus=>{
|
|
340
|
+
allEntry.map(it=>{
|
|
341
|
+
if(bus === it['business_code']){
|
|
342
|
+
support.push(it);
|
|
343
|
+
}
|
|
344
|
+
})
|
|
345
|
+
});
|
|
346
|
+
return support
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
getCardGroupItem(list, allEntry){
|
|
350
|
+
list.map(item=>{
|
|
351
|
+
//设置卡片样式
|
|
352
|
+
item['theme'] = this.getCardThemes(item['card_type_name']);
|
|
353
|
+
item['entry'] = this.getEntry(item['business_codes'], allEntry)
|
|
354
|
+
});
|
|
355
|
+
return list
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
init(container){
|
|
359
|
+
//设置
|
|
360
|
+
this.cardLayout = getContainerPropsValue(container,"content.cardLayout","1");
|
|
361
|
+
this.changeUrl = getContainerPropsValue(container,"content.change_url",{value: ""}).value;
|
|
362
|
+
this.disabledUrl = getContainerPropsValue(container,"content.disabled_url",{value: ""}).value;
|
|
363
|
+
this.bindUrl = getContainerPropsValue(container,"content.bind_url",{value: ""}).value;
|
|
364
|
+
this.detailUrl = getContainerPropsValue(container,"content.detail_url",{value: ""}).value;
|
|
365
|
+
this.confirmUrl = getContainerPropsValue(container,"content.confirm_url",{value: ""}).value;
|
|
366
|
+
//this.allEntryPath = getContainerPropsValue(container,"content.allEntryPath",{value: ""}).value;
|
|
367
|
+
this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
|
|
368
|
+
},
|
|
369
|
+
handleToLink(path) {
|
|
370
|
+
this.$xdUniHelper.navigateTo({
|
|
371
|
+
url: path,
|
|
372
|
+
});
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
getContent() {
|
|
376
|
+
jfbRootExec("getListBaseNewsContent", {
|
|
377
|
+
vm: this,
|
|
378
|
+
data: {
|
|
379
|
+
page_id: this.pageAttr["page_id"], //页面ID
|
|
380
|
+
container_id: this.containerId, //组件ID
|
|
381
|
+
limit: 1,
|
|
382
|
+
},
|
|
383
|
+
})
|
|
384
|
+
.then((res) => {
|
|
385
|
+
if (res.list.length > 0) {
|
|
386
|
+
this.notice = res.list[0].content;
|
|
387
|
+
this.noticeStatus = true;
|
|
388
|
+
}
|
|
389
|
+
})
|
|
390
|
+
.catch((error) => {
|
|
391
|
+
console.error(error);
|
|
392
|
+
});
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @description 扫码绑定
|
|
397
|
+
*/
|
|
398
|
+
handleScan() {
|
|
399
|
+
try {
|
|
400
|
+
//#ifdef H5
|
|
401
|
+
if (this.jwxSDK !== null) {
|
|
402
|
+
this.jwxSDK.scanQRCode({
|
|
403
|
+
needResult: 1,
|
|
404
|
+
scanType: ["qrCode"],
|
|
405
|
+
success: (res) => {
|
|
406
|
+
this.$xdUniHelper.navigateTo({
|
|
407
|
+
url: `${this.confirmUrl}?qrcode=${encodeURIComponent(
|
|
408
|
+
res.resultStr
|
|
409
|
+
)}`,
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
fail: (error) => {
|
|
413
|
+
if (typeof error === 'string') error = {error: error}
|
|
414
|
+
if (window['jwxJfbSDKParams']) error = Object.assign(error, window['jwxJfbSDKParams'])
|
|
415
|
+
this.$xdLog.setARMSError(error)
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
//#endif
|
|
420
|
+
//#ifdef MP-WEIXIN
|
|
421
|
+
uni.scanCode({
|
|
422
|
+
scanType: ["qrCode"],
|
|
423
|
+
success: (res) => {
|
|
424
|
+
this.$xdUniHelper.navigateTo({
|
|
425
|
+
url: `${this.confirmUrl}?qrcode=${encodeURIComponent(res.result)}`,
|
|
426
|
+
});
|
|
427
|
+
},
|
|
428
|
+
fail: (error) => {
|
|
429
|
+
this.$xdLog.setARMSError(error)
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
//#endif
|
|
433
|
+
} catch (err) {
|
|
434
|
+
this.$xdLog.setARMSError(err)
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
handleToDisabled() {
|
|
439
|
+
this.$xdUniHelper.navigateTo({
|
|
440
|
+
url: `${this.disabledUrl}`,
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* @description 已绑定卡登录
|
|
446
|
+
* @param item
|
|
447
|
+
*/
|
|
448
|
+
handleBindLogin(item) {
|
|
449
|
+
if (this.tabIndex === 1) {
|
|
450
|
+
console.log("bindCardLogin", this.inCallback);
|
|
451
|
+
|
|
452
|
+
//无效卡
|
|
453
|
+
if (item["is_valid"] !== "Y") {
|
|
454
|
+
console.log(
|
|
455
|
+
item,
|
|
456
|
+
item["is_valid"],
|
|
457
|
+
item["is_valid"] !== "Y",
|
|
458
|
+
"itemitem"
|
|
459
|
+
);
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
this.$xdShowLoading({});
|
|
463
|
+
jfbRootExec("loginCardBind", {
|
|
464
|
+
vm: this,
|
|
465
|
+
data: { card_number: item["card_number"] },
|
|
466
|
+
})
|
|
467
|
+
.then((res) => {
|
|
468
|
+
console.log(res);
|
|
469
|
+
this.$xdHideLoading();
|
|
470
|
+
//#ifdef MP-WEIXIN
|
|
471
|
+
if (this.jfbAuthorize !== null) {
|
|
472
|
+
this.jfbAuthorize.setToken("card", res["card_token"], {
|
|
473
|
+
expires: res["card_expire_in"] / 60 / 60,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
//#endif
|
|
477
|
+
|
|
478
|
+
if (this.$configProject.isPreview) {
|
|
479
|
+
console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
|
|
480
|
+
} else {
|
|
481
|
+
this.$xdUniHelper.redirectTo({
|
|
482
|
+
url: this.inCallback,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
})
|
|
486
|
+
.catch((res) => {
|
|
487
|
+
this.$xdHideLoading();
|
|
488
|
+
});
|
|
489
|
+
} else {
|
|
490
|
+
this.$xdUniHelper.navigateTo(
|
|
491
|
+
{
|
|
492
|
+
url: `${this.changeUrl}?card_number=${item["card_number"]}`,
|
|
493
|
+
},
|
|
494
|
+
false
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
toDetail(item) {
|
|
499
|
+
this.$xdUniHelper.navigateTo(
|
|
500
|
+
{
|
|
501
|
+
url: `${this.detailUrl}?card_number=${item["card_number"]}`,
|
|
502
|
+
},
|
|
503
|
+
false
|
|
504
|
+
);
|
|
505
|
+
},
|
|
506
|
+
|
|
507
|
+
onJfbLoad(options) {
|
|
508
|
+
let { inCallback } = options;
|
|
509
|
+
if (inCallback) {
|
|
510
|
+
this.$storage.set("inCallback", inCallback, 0.05);
|
|
511
|
+
inCallback = Base64.decode(inCallback);
|
|
512
|
+
} else {
|
|
513
|
+
inCallback = this.$storage.get("inCallback");
|
|
514
|
+
if (inCallback) {
|
|
515
|
+
inCallback = Base64.decode(inCallback);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
//登陆成功调整地址优先级
|
|
520
|
+
this.inCallback = inCallback || this.allEntryPath || this.settings.index;
|
|
521
|
+
this.getContent();
|
|
522
|
+
|
|
523
|
+
this.getCardList(options);
|
|
524
|
+
},
|
|
525
|
+
|
|
526
|
+
getCardList(options) {
|
|
527
|
+
let params = {is_all: 'Y', is_show_entry_settings: 'Y'};
|
|
528
|
+
if(options['jfb_business_code']) {
|
|
529
|
+
params['card_business_code'] = options['jfb_business_code'];
|
|
530
|
+
}
|
|
531
|
+
this.$xdShowLoading({});
|
|
532
|
+
jfbRootExec("getListEntryCardBind", {
|
|
533
|
+
vm: this,
|
|
534
|
+
data: params
|
|
535
|
+
})
|
|
536
|
+
.then((res) => {
|
|
537
|
+
this.showDisabled = res.is_show_invalid_card_entrance;
|
|
538
|
+
res.list = res.list.map((item) => {
|
|
539
|
+
return {
|
|
540
|
+
...item,
|
|
541
|
+
card_point: this.$xdUniHelper.divisionFloatNumber(
|
|
542
|
+
item.card_point,
|
|
543
|
+
100
|
|
544
|
+
),
|
|
545
|
+
other_card_point: this.$xdUniHelper.divisionFloatNumber(
|
|
546
|
+
item.other_card_point,
|
|
547
|
+
100
|
|
548
|
+
),
|
|
549
|
+
};
|
|
550
|
+
});
|
|
551
|
+
this.cardList = this.getCardGroupItem(res.list.filter((item) => {
|
|
552
|
+
return item["is_valid"] === "Y";
|
|
553
|
+
}), res['site_entry_settings']);
|
|
554
|
+
this.disableList = res.list.filter((item) => {
|
|
555
|
+
return item["is_valid"] === "N";
|
|
556
|
+
});
|
|
557
|
+
this.changeList = this.cardList.filter((item) => {
|
|
558
|
+
return item["is_exchange"] === "Y";
|
|
559
|
+
});
|
|
560
|
+
this.showList = this.cardList;
|
|
561
|
+
this.$xdHideLoading();
|
|
562
|
+
})
|
|
563
|
+
.catch(() => this.$xdHideLoading());
|
|
564
|
+
},
|
|
565
|
+
|
|
566
|
+
onShow(options) {
|
|
567
|
+
this.onJfbLoad(options);
|
|
568
|
+
},
|
|
569
|
+
|
|
570
|
+
onJfbUpdate(data) {
|
|
571
|
+
this.getContent();
|
|
572
|
+
},
|
|
573
|
+
|
|
574
|
+
onJfbBack(options) {
|
|
575
|
+
this.$xdUniHelper.navigateBack();
|
|
576
|
+
},
|
|
577
|
+
},
|
|
578
|
+
};
|
|
579
|
+
</script>
|
|
580
|
+
|
|
581
|
+
<style scoped lang="less">
|
|
582
|
+
@import "./JfbBaseCardEntryLess.less";
|
|
583
|
+
|
|
584
|
+
.jfb-base-card-entry {
|
|
585
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
586
|
+
box-sizing: border-box;
|
|
587
|
+
|
|
588
|
+
&__body {
|
|
589
|
+
padding: unit(40, rpx) unit(26, rpx);
|
|
590
|
+
color: #333;
|
|
591
|
+
|
|
592
|
+
&-dialog {
|
|
593
|
+
position: fixed;
|
|
594
|
+
top: 0;
|
|
595
|
+
bottom: 0;
|
|
596
|
+
right: 0;
|
|
597
|
+
left: 0;
|
|
598
|
+
z-index: 9999;
|
|
599
|
+
background: rgba(0, 0, 0, 0.4);
|
|
600
|
+
|
|
601
|
+
&-content {
|
|
602
|
+
display: flex;
|
|
603
|
+
width: 100%;
|
|
604
|
+
height: 100%;
|
|
605
|
+
flex-direction: column;
|
|
606
|
+
justify-content: center;
|
|
607
|
+
align-items: center;
|
|
608
|
+
|
|
609
|
+
&-close {
|
|
610
|
+
margin-top: unit(20, rpx);
|
|
611
|
+
width: unit(52 / @scale, rpx);
|
|
612
|
+
height: unit(52 / @scale, rpx);
|
|
613
|
+
border: unit(5, rpx) solid #fff;
|
|
614
|
+
border-radius: 50%;
|
|
615
|
+
overflow: hidden;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
&-img {
|
|
619
|
+
width: unit(680, rpx);
|
|
620
|
+
height: 80%;
|
|
621
|
+
border-radius: unit(20, rpx);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
&-cut {
|
|
627
|
+
display: flex;
|
|
628
|
+
align-items: center;
|
|
629
|
+
justify-content: space-between;
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
&-item {
|
|
633
|
+
border: unit(6, rpx) solid;
|
|
634
|
+
font-size: unit(36, rpx);
|
|
635
|
+
color: #fe7a63ff;
|
|
636
|
+
border-radius: unit(16, rpx);
|
|
637
|
+
width: unit(320, rpx);
|
|
638
|
+
height: unit(94, rpx);
|
|
639
|
+
display: flex;
|
|
640
|
+
align-items: center;
|
|
641
|
+
justify-content: center;
|
|
642
|
+
box-sizing: border-box;
|
|
643
|
+
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
&-notice {
|
|
648
|
+
margin: unit(40, rpx) unit(-35, rpx) 0 unit(-35, rpx);
|
|
649
|
+
padding: unit(22, rpx) unit(35, rpx);
|
|
650
|
+
line-height: unit(70, rpx);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
&-tab {
|
|
654
|
+
display: flex;
|
|
655
|
+
align-items: center;
|
|
656
|
+
font-size: unit(28, rpx);
|
|
657
|
+
margin-bottom: unit(46, rpx);
|
|
658
|
+
margin-top: unit(46, rpx);
|
|
659
|
+
|
|
660
|
+
& > view {
|
|
661
|
+
// width: unit(214, rpx);
|
|
662
|
+
// height: unit(60, rpx);
|
|
663
|
+
padding: unit(5, rpx) unit(22, rpx);
|
|
664
|
+
text-align: center;
|
|
665
|
+
line-height: unit(60, rpx);
|
|
666
|
+
margin-right: unit(30, rpx);
|
|
667
|
+
border-radius: unit(60, rpx);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
&-tips {
|
|
672
|
+
font-size: unit(20, rpx);
|
|
673
|
+
margin-bottom: unit(46, rpx);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
&-disabled {
|
|
677
|
+
font-size: unit(28, rpx);
|
|
678
|
+
color: #b8b7be;
|
|
679
|
+
margin-bottom: unit(30, rpx);
|
|
680
|
+
padding-top: unit(30, rpx);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.card-list {
|
|
686
|
+
overflow: hidden;
|
|
687
|
+
border-radius: unit(16, rpx);
|
|
688
|
+
background-size: 100%;
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
&__title {
|
|
692
|
+
height: unit(46, rpx);
|
|
693
|
+
display: flex;
|
|
694
|
+
justify-content: flex-start;
|
|
695
|
+
align-items: center;
|
|
696
|
+
|
|
697
|
+
& > view {
|
|
698
|
+
padding: 0 unit(80, rpx);
|
|
699
|
+
font-size: unit(24, rpx);
|
|
700
|
+
line-height: unit(46, rpx);
|
|
701
|
+
background: rgba(102, 102, 102, 0.4);
|
|
702
|
+
color: #fff;
|
|
703
|
+
border-radius: 0 0 unit(16, rpx) 0;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
&__content {
|
|
709
|
+
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
710
|
+
height: unit(86, rpx);
|
|
711
|
+
display: flex;
|
|
712
|
+
justify-content: space-between;
|
|
713
|
+
align-items: center;
|
|
714
|
+
|
|
715
|
+
& > view:first-child {
|
|
716
|
+
font-size: unit(36, rpx);
|
|
717
|
+
line-height: unit(86, rpx);
|
|
718
|
+
color: #fff;
|
|
719
|
+
font-weight: 700;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
& > view:nth-child(2) {
|
|
723
|
+
font-size: unit(24, rpx);
|
|
724
|
+
display: flex;
|
|
725
|
+
justify-content: space-between;
|
|
726
|
+
align-items: center;
|
|
727
|
+
flex-flow: wrap;
|
|
728
|
+
flex-direction: column;
|
|
729
|
+
color: #fff;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
&__date {
|
|
734
|
+
padding: 0 unit(40, rpx);
|
|
735
|
+
font-size: unit(28, rpx);
|
|
736
|
+
line-height: unit(32, rpx);
|
|
737
|
+
color: #fff;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
&__yue {
|
|
741
|
+
padding: unit(10, rpx) unit(40, rpx) 0;
|
|
742
|
+
font-size: unit(28, rpx);
|
|
743
|
+
line-height: unit(32, rpx);
|
|
744
|
+
color: #fff;
|
|
745
|
+
|
|
746
|
+
& > text:nth-child(2) {
|
|
747
|
+
font-weight: 700;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
&__other {
|
|
752
|
+
display: flex;
|
|
753
|
+
justify-content: flex-start;
|
|
754
|
+
align-items: center;
|
|
755
|
+
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
756
|
+
margin-top: unit(0, rpx);
|
|
757
|
+
|
|
758
|
+
& > view {
|
|
759
|
+
border-radius:unit(8, rpx);
|
|
760
|
+
background: rgba(255, 255, 255, 0.2);
|
|
761
|
+
height: unit(48, rpx);
|
|
762
|
+
line-height: unit(48, rpx);
|
|
763
|
+
display: flex;
|
|
764
|
+
justify-content: flex-start;
|
|
765
|
+
align-items: center;
|
|
766
|
+
font-weight: 400;
|
|
767
|
+
font-size: unit(24, rpx);
|
|
768
|
+
padding: 0 unit(20, rpx);
|
|
769
|
+
color: #fff;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
&__nodata {
|
|
776
|
+
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
777
|
+
margin-top: unit(0, rpx);
|
|
778
|
+
color: #fff;
|
|
779
|
+
font-size: unit(28, rpx);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
&__entry {
|
|
783
|
+
position: absolute;
|
|
784
|
+
bottom: unit(28, rpx);
|
|
785
|
+
left: unit(40, rpx);
|
|
786
|
+
right: unit(40, rpx);
|
|
787
|
+
height: unit(64, rpx);
|
|
788
|
+
|
|
789
|
+
& > view {
|
|
790
|
+
line-height: unit(64, rpx);
|
|
791
|
+
text-align: center;
|
|
792
|
+
font-size: unit(26, rpx);
|
|
793
|
+
border-radius: unit(8, rpx);
|
|
794
|
+
background: rgba(255, 255, 255, 1);
|
|
795
|
+
box-shadow: 0 unit(4, rpx) unit(8, rpx) rgba(156, 62, 0, 0.11);
|
|
796
|
+
font-weight: 500;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
& > view {
|
|
801
|
+
width: unit(700, rpx);
|
|
802
|
+
min-height: unit(410, rpx);
|
|
803
|
+
position: relative;
|
|
804
|
+
border-radius: unit(16, rpx);
|
|
805
|
+
background-size: 100%;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
</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-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-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-entry'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
getListEntryCardBind: {
|
|
5
|
+
"is_show_invalid_card_entrance": "Y",
|
|
6
|
+
"list": [{
|
|
7
|
+
"card_number": "101001000005195",
|
|
8
|
+
"card_point": 100000000,
|
|
9
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
10
|
+
"unit": "点",
|
|
11
|
+
"end_time": "2024-10-31 23:59:59",
|
|
12
|
+
"is_valid": "Y",
|
|
13
|
+
"main_product_name": "",
|
|
14
|
+
"other_card_point": 0,
|
|
15
|
+
"is_exchange": "N"
|
|
16
|
+
}, {
|
|
17
|
+
"card_number": "101001000005193",
|
|
18
|
+
"card_point": 99963600,
|
|
19
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
20
|
+
"unit": "次",
|
|
21
|
+
"end_time": "2024-10-31 23:59:59",
|
|
22
|
+
"is_valid": "Y",
|
|
23
|
+
"main_product_name": "",
|
|
24
|
+
"other_card_point": 0,
|
|
25
|
+
"is_exchange": "N"
|
|
26
|
+
}, {
|
|
27
|
+
"card_number": "101001000005184",
|
|
28
|
+
"card_point": 100000000,
|
|
29
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
30
|
+
"unit": "",
|
|
31
|
+
"end_time": "2024-10-31 23:59:59",
|
|
32
|
+
"is_valid": "Y",
|
|
33
|
+
"main_product_name": "",
|
|
34
|
+
"other_card_point": 0,
|
|
35
|
+
"is_exchange": "N"
|
|
36
|
+
}, {
|
|
37
|
+
"card_number": "101001000005185",
|
|
38
|
+
"card_point": 99631000,
|
|
39
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
40
|
+
"unit": "点",
|
|
41
|
+
"end_time": "2024-10-31 23:59:59",
|
|
42
|
+
"is_valid": "Y",
|
|
43
|
+
"main_product_name": "",
|
|
44
|
+
"other_card_point": 0,
|
|
45
|
+
"is_exchange": "N"
|
|
46
|
+
}, {
|
|
47
|
+
"card_number": "101001000006990",
|
|
48
|
+
"card_point": 1400,
|
|
49
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
50
|
+
"unit": "",
|
|
51
|
+
"end_time": "2025-05-03 23:59:59",
|
|
52
|
+
"is_valid": "Y",
|
|
53
|
+
"main_product_name": "",
|
|
54
|
+
"other_card_point": 0,
|
|
55
|
+
"is_exchange": "N"
|
|
56
|
+
}, {
|
|
57
|
+
"card_number": "171004000000012",
|
|
58
|
+
"card_point": 0,
|
|
59
|
+
"card_type_name": "聚福宝测试C40",
|
|
60
|
+
"unit": "次",
|
|
61
|
+
"end_time": "2025-05-03 23:59:59",
|
|
62
|
+
"is_valid": "Y",
|
|
63
|
+
"main_product_name": "",
|
|
64
|
+
"other_card_point": 0,
|
|
65
|
+
"is_exchange": "Y"
|
|
66
|
+
}, {
|
|
67
|
+
"card_number": "101001000006989",
|
|
68
|
+
"card_point": 3600,
|
|
69
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
70
|
+
"unit": "",
|
|
71
|
+
"end_time": "2025-05-03 23:59:59",
|
|
72
|
+
"is_valid": "Y",
|
|
73
|
+
"main_product_name": "",
|
|
74
|
+
"other_card_point": 0,
|
|
75
|
+
"is_exchange": "N"
|
|
76
|
+
}, {
|
|
77
|
+
"card_number": "171004000000011",
|
|
78
|
+
"card_point": 0,
|
|
79
|
+
"card_type_name": "聚福宝测试C40",
|
|
80
|
+
"unit": "次",
|
|
81
|
+
"end_time": "2025-05-03 23:59:59",
|
|
82
|
+
"is_valid": "Y",
|
|
83
|
+
"main_product_name": "",
|
|
84
|
+
"other_card_point": 0,
|
|
85
|
+
"is_exchange": "Y"
|
|
86
|
+
}, {
|
|
87
|
+
"card_number": "101001000005479",
|
|
88
|
+
"card_point": 10000000,
|
|
89
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
90
|
+
"unit": "点",
|
|
91
|
+
"end_time": "2024-02-03 23:59:59",
|
|
92
|
+
"is_valid": "Y",
|
|
93
|
+
"main_product_name": "",
|
|
94
|
+
"other_card_point": 0,
|
|
95
|
+
"is_exchange": "N"
|
|
96
|
+
}, {
|
|
97
|
+
"card_number": "101001000005478",
|
|
98
|
+
"card_point": 1000000,
|
|
99
|
+
"card_type_name": "聚福宝福卡测试蛋糕",
|
|
100
|
+
"unit": "点",
|
|
101
|
+
"end_time": "2024-02-23 23:59:59",
|
|
102
|
+
"is_valid": "Y",
|
|
103
|
+
"main_product_name": "",
|
|
104
|
+
"other_card_point": 0,
|
|
105
|
+
"is_exchange": "N"
|
|
106
|
+
}], "request_id": "dd73b058e5de1e90"
|
|
107
|
+
},
|
|
108
|
+
loginEntryCardBind: {
|
|
109
|
+
"card_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhM2U4YjQ5OWEwNzUwN2EyIiwiaWF0IjoxNjc0OTYzODE3LjY2OTM1MywiZXhwIjoxNjc1MDIwNTc3LjY2OTM1MywiY2FyZF9udW1iZXIiOiIxMDEwMDEwMDAwMDUxOTUiLCJjYXJkX3R5cGVfbmFtZSI6IjZJR2E1NmFQNWE2ZDU2YVA1WTJoNXJXTDZLK1Y2SnVMNTdPViIsInByaWNlIjoxMDAsIm9ubGluZV9wcmljZSI6MTAwLCJ1c2Vfc2NlbmNlIjozLCJidXNpbmVzc19jb2RlcyI6IjAsMSwyLDMsNCJ9.LsoBJq4pC_gSc1jZRwDhD2rAfOf1DMCy29VHomGiqYE",
|
|
110
|
+
"card_expire_in": 56760,
|
|
111
|
+
"request_id": "8fde2506c426a55d"
|
|
112
|
+
},
|
|
113
|
+
}
|