jufubao-base 1.0.169-beta4 → 1.0.169-beta6
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/JfbBaseMapSearch/MapSearchMp.vue +1 -1
- package/src/components/JfbBaseOrderDetail/Api.js +12 -7
- package/src/components/JfbBaseOrderDetail/Attr.js +28 -14
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +66 -18
- package/src/components/JfbBaseOrderDetail/Mock.js +3 -1
- package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
- package/src/components/JfbBaseTfkCardBind/Attr.js +25 -1
- package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +139 -7
- package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
- package/src/components/JfbBaseTfkCardDetail/Api.js +11 -0
- package/src/components/JfbBaseTfkCardDetail/Attr.js +74 -0
- package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +133 -8
- package/src/components/JfbBaseTfkCardLogin/Attr.js +160 -0
- package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +215 -27
- package/src/components/JfbBaseTfkCardLogin/Mock.js +1 -1
- package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +68 -16
- package/src/components/JfbBaseTfkSearch/Attr.js +24 -37
- package/src/components/JfbBaseTfkSearch/ContentCinema.vue +147 -0
- package/src/components/JfbBaseTfkSearch/ContentItem.vue +165 -0
- package/src/components/JfbBaseTfkSearch/CusAttr.js +201 -0
- package/src/components/JfbBaseTfkSearch/CustomList.vue +221 -0
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +46 -14
- package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +46 -0
- package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
- package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +166 -0
- package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
- package/src/components/JfbBaseTfkSearch/listMixins.js +76 -0
- package/src/components/JfbBaseTfkSearch/search.js +175 -0
package/package.json
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @description
|
|
5
|
-
* 建议:Ffff=>模块 Xxxx=>自定义名字
|
|
6
|
-
* 获取单记录(getByIdFfffXxxx)
|
|
7
|
-
* 获取列表记录(getByListFfffXxxx)
|
|
8
|
-
* 添加列表记录(addFfffXxxxx)
|
|
9
|
-
* 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
|
|
10
|
-
* 更新列表记录(updateFfffXxxxx)
|
|
4
|
+
* @description 订单详情模块
|
|
11
5
|
* @type {*[]}
|
|
12
6
|
*/
|
|
13
7
|
module.exports = [
|
|
@@ -45,4 +39,15 @@ module.exports = [
|
|
|
45
39
|
isConsole: true,
|
|
46
40
|
disabled: true,
|
|
47
41
|
},
|
|
42
|
+
{
|
|
43
|
+
mapFnName: 'deleteBaseOrder', //自定义方法名字(必选)
|
|
44
|
+
title: '删除订单',
|
|
45
|
+
path: '/order/v1/order/delete-main-order',
|
|
46
|
+
isRule: false,
|
|
47
|
+
data: {
|
|
48
|
+
main_order_id: ['id', 'Number', '必选'],
|
|
49
|
+
},
|
|
50
|
+
isConsole: true,
|
|
51
|
+
disabled: true,
|
|
52
|
+
},
|
|
48
53
|
];
|
|
@@ -22,20 +22,6 @@ export default {
|
|
|
22
22
|
inline: false,
|
|
23
23
|
notice: '前台页面展示会根据返回数据类型进行页面渲染'
|
|
24
24
|
},
|
|
25
|
-
{
|
|
26
|
-
label: '是否需要客服电话:',
|
|
27
|
-
ele: 'xd-radio',
|
|
28
|
-
valueKey: 'is_hot',
|
|
29
|
-
value: data['is_hot'] || 'N',
|
|
30
|
-
groupKey:'content',
|
|
31
|
-
placeholder: '请选择是否需要客服电话',
|
|
32
|
-
multiple: false,
|
|
33
|
-
className: 'input80',
|
|
34
|
-
list: [
|
|
35
|
-
{ label: '是', value: 'Y' },
|
|
36
|
-
{ label: '否', value: 'N' },
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
25
|
{
|
|
40
26
|
label: '自定义内容:',
|
|
41
27
|
ele: 'xd-site-news',
|
|
@@ -260,6 +246,20 @@ export default {
|
|
|
260
246
|
}
|
|
261
247
|
},
|
|
262
248
|
},
|
|
249
|
+
{
|
|
250
|
+
label: '是否需要客服电话:',
|
|
251
|
+
ele: 'xd-radio',
|
|
252
|
+
valueKey: 'is_hot',
|
|
253
|
+
value: data['is_hot'] || 'N',
|
|
254
|
+
groupKey:'content',
|
|
255
|
+
placeholder: '请选择是否需要客服电话',
|
|
256
|
+
multiple: false,
|
|
257
|
+
className: 'input80',
|
|
258
|
+
list: [
|
|
259
|
+
{ label: '是', value: 'Y' },
|
|
260
|
+
{ label: '否', value: 'N' },
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
263
|
{
|
|
264
264
|
label: "是否展示可用门店:",
|
|
265
265
|
ele: 'xd-radio',
|
|
@@ -274,6 +274,20 @@ export default {
|
|
|
274
274
|
{ label: '否', value: 'N' },
|
|
275
275
|
]
|
|
276
276
|
},
|
|
277
|
+
{
|
|
278
|
+
label: "是否允许删除订单:",
|
|
279
|
+
ele: 'xd-radio',
|
|
280
|
+
valueKey: "is_show_delete_order",
|
|
281
|
+
value: data['is_show_delete_order'] || 'N',
|
|
282
|
+
groupKey:'content',
|
|
283
|
+
placeholder: '请选择是否允许删除订单',
|
|
284
|
+
multiple: false,
|
|
285
|
+
className: 'input80',
|
|
286
|
+
list: [
|
|
287
|
+
{ label: '允许', value: 'Y' },
|
|
288
|
+
{ label: '不允许', value: 'N' },
|
|
289
|
+
]
|
|
290
|
+
},
|
|
277
291
|
{
|
|
278
292
|
label: '外填充:',
|
|
279
293
|
ele: 'xd-margin-padding',
|
|
@@ -683,9 +683,8 @@
|
|
|
683
683
|
<view v-else>
|
|
684
684
|
<xd-button
|
|
685
685
|
size="small"
|
|
686
|
-
type="primary"
|
|
686
|
+
:type="item.type !== undefined ? item.type: 'primary'"
|
|
687
687
|
radius="40rpx"
|
|
688
|
-
:bg-color="mainColor"
|
|
689
688
|
@click="handleAction(item)"
|
|
690
689
|
>{{ item.text }}</xd-button>
|
|
691
690
|
</view>
|
|
@@ -741,6 +740,7 @@ import { mapState } from "vuex";
|
|
|
741
740
|
import bizMock from "./bizMock";
|
|
742
741
|
import Color from "color";
|
|
743
742
|
|
|
743
|
+
|
|
744
744
|
export default {
|
|
745
745
|
name: "JfbBaseOrderDetail",
|
|
746
746
|
components: {
|
|
@@ -774,6 +774,7 @@ export default {
|
|
|
774
774
|
is_not_show_price: "",
|
|
775
775
|
brandTextColor:'',
|
|
776
776
|
is_show_support_shop: "",
|
|
777
|
+
is_show_delete_order:'N', //删除订单
|
|
777
778
|
|
|
778
779
|
showPassword: false,
|
|
779
780
|
dialogPassword: "",
|
|
@@ -822,6 +823,11 @@ export default {
|
|
|
822
823
|
this.getOrderDetail();
|
|
823
824
|
}
|
|
824
825
|
},
|
|
826
|
+
is_show_delete_order(){
|
|
827
|
+
if (this.isPreview) {
|
|
828
|
+
this.getOrderDetail();
|
|
829
|
+
}
|
|
830
|
+
},
|
|
825
831
|
},
|
|
826
832
|
computed: {
|
|
827
833
|
...mapState(['siteInfo']),
|
|
@@ -857,8 +863,7 @@ export default {
|
|
|
857
863
|
},
|
|
858
864
|
methods: {
|
|
859
865
|
onJfbLoad(options) {
|
|
860
|
-
this.main_order_id =
|
|
861
|
-
options.id || options.order_id || options.main_order_id;
|
|
866
|
+
this.main_order_id = options.id || options.order_id || options.main_order_id;
|
|
862
867
|
this.getOrderDetail();
|
|
863
868
|
},
|
|
864
869
|
|
|
@@ -993,6 +998,20 @@ export default {
|
|
|
993
998
|
).fullTime;
|
|
994
999
|
res.film_show.thumb = getServiceUrl(res.film_show.thumb);
|
|
995
1000
|
}
|
|
1001
|
+
|
|
1002
|
+
//增加删除订单按钮
|
|
1003
|
+
if(this.is_show_delete_order === 'Y') {
|
|
1004
|
+
let pay = (res.buttons||[]).filter(item => item.action === 'pay');
|
|
1005
|
+
let del = [{action:'delete', text:'删除订单', type: 'info'}];
|
|
1006
|
+
if(pay.length === 1) del = []
|
|
1007
|
+
res.buttons = del.concat(res.buttons || []).map(item=>{
|
|
1008
|
+
if(item.action === 'view_logistics' && !item.type) {
|
|
1009
|
+
item.type = 'default';
|
|
1010
|
+
}
|
|
1011
|
+
return item
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
|
|
996
1015
|
if (res.product) {
|
|
997
1016
|
jfbRootExec("getBaseProductDetail", {
|
|
998
1017
|
vm: this,
|
|
@@ -1011,7 +1030,8 @@ export default {
|
|
|
1011
1030
|
.catch((err) => {
|
|
1012
1031
|
console.log(err, "err");
|
|
1013
1032
|
});
|
|
1014
|
-
}
|
|
1033
|
+
}
|
|
1034
|
+
else {
|
|
1015
1035
|
this.info = res;
|
|
1016
1036
|
if (this.info.status.loading_timeout != "-1") {
|
|
1017
1037
|
this.timeDown();
|
|
@@ -1051,6 +1071,7 @@ export default {
|
|
|
1051
1071
|
this.is_border_w = getContainerPropsValue(container, "content.is_border_w", 2);
|
|
1052
1072
|
this.viewStatus = getContainerPropsValue(container, "content.viewStatus", "mall");
|
|
1053
1073
|
this.is_show_support_shop = getContainerPropsValue(container, "content.is_show_support_shop", "N");
|
|
1074
|
+
this.is_show_delete_order = 'Y'//getContainerPropsValue(container, "content.is_show_delete_order", "N");
|
|
1054
1075
|
},
|
|
1055
1076
|
getCountDown() {
|
|
1056
1077
|
this.timer = setInterval(() => {
|
|
@@ -1135,25 +1156,15 @@ export default {
|
|
|
1135
1156
|
},
|
|
1136
1157
|
handleAction(item) {
|
|
1137
1158
|
if (item.action === "view_logistics") {
|
|
1138
|
-
// if (
|
|
1139
|
-
// this.info.extras.first_logistics_package_id &&
|
|
1140
|
-
// this.info.extras.logistics_count === 1
|
|
1141
|
-
// ) {
|
|
1142
|
-
// this.$xdUniHelper.navigateTo({
|
|
1143
|
-
// url: `${this.logisticsPath}?package_id=${this.info.extras.first_logistics_package_id}`,
|
|
1144
|
-
// });
|
|
1145
|
-
// } else {
|
|
1146
|
-
// this.$xdUniHelper.navigateTo({
|
|
1147
|
-
// url: `${this.packageListPath}?order_id=${this.main_order_id}`,
|
|
1148
|
-
// });
|
|
1149
|
-
// }
|
|
1150
1159
|
this.$xdUniHelper.navigateTo({
|
|
1151
1160
|
url: `${this.packageListPath}?order_id=${this.main_order_id}`,
|
|
1152
1161
|
});
|
|
1153
|
-
}
|
|
1162
|
+
}
|
|
1163
|
+
else if(item.action === 'cancel_unpaid') {
|
|
1154
1164
|
this.$xdConfirm({
|
|
1155
1165
|
styles: this.styles,
|
|
1156
1166
|
content: "是否取消订单",
|
|
1167
|
+
zIndex: 3000,
|
|
1157
1168
|
success: (action) => {
|
|
1158
1169
|
if (action.confirm) {
|
|
1159
1170
|
jfbRootExec("cancelBaseOrder", {
|
|
@@ -1175,6 +1186,43 @@ export default {
|
|
|
1175
1186
|
},
|
|
1176
1187
|
});
|
|
1177
1188
|
}
|
|
1189
|
+
else if(item.action === 'delete'){
|
|
1190
|
+
this.$xdConfirm({
|
|
1191
|
+
styles: this.styles,
|
|
1192
|
+
content: "是否要删除当前订单吗?",
|
|
1193
|
+
zIndex: 3000,
|
|
1194
|
+
success: (action) => {
|
|
1195
|
+
if (action.confirm) {
|
|
1196
|
+
this.handleDeleteOrder();
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
else {
|
|
1202
|
+
console.error(`item.action=${item.action}, 此action不可用`)
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
1205
|
+
|
|
1206
|
+
handleDeleteOrder(){
|
|
1207
|
+
jfbRootExec("deleteBaseOrder", {
|
|
1208
|
+
vm: this,
|
|
1209
|
+
data: {
|
|
1210
|
+
main_order_id: this.main_order_id,
|
|
1211
|
+
},
|
|
1212
|
+
})
|
|
1213
|
+
.then((res) => {
|
|
1214
|
+
this.$xdAlert({
|
|
1215
|
+
content: "删除成功",
|
|
1216
|
+
time: 2000,
|
|
1217
|
+
zIndex: 3000,
|
|
1218
|
+
});
|
|
1219
|
+
setTimeout(()=>{
|
|
1220
|
+
this.$xdUniHelper.navigateBack()
|
|
1221
|
+
},3000)
|
|
1222
|
+
})
|
|
1223
|
+
.catch((err) => {
|
|
1224
|
+
console.log(err, "err");
|
|
1225
|
+
});
|
|
1178
1226
|
},
|
|
1179
1227
|
|
|
1180
1228
|
onJfbShow(options) {
|
|
@@ -95,5 +95,7 @@ module.exports = {
|
|
|
95
95
|
"shop_address": "北京3北京西夏区城区河北省廊坊市三河市燕郊开发区燕高路西侧实验小学南侧 "
|
|
96
96
|
},
|
|
97
97
|
"request_id": "6178d3499b91f274"
|
|
98
|
-
}
|
|
98
|
+
},
|
|
99
|
+
cancelBaseOrder:{"pay_order_id": "488003809474256896","request_id": "6178d3499b91f274"},
|
|
100
|
+
deleteBaseOrder:{"pay_order_id": "488003809474256896","request_id": "6178d3499b91f274"},
|
|
99
101
|
}
|
|
@@ -6,53 +6,72 @@
|
|
|
6
6
|
*/
|
|
7
7
|
module.exports = [
|
|
8
8
|
{
|
|
9
|
-
|
|
10
|
-
mapFnName: 'getTfkByIdFilmSquate',
|
|
11
|
-
title: '获取电影广场列表',
|
|
12
|
-
path: '/api/account/film/list-film-square',
|
|
9
|
+
mapFnName: 'qrcodeCardBind',
|
|
13
10
|
isRule: false,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
title: '根据二维码绑定卡',
|
|
12
|
+
prefix: 'qrcode',
|
|
13
|
+
path: '/card/v1/card-bind/bind-card-by-qrcode',
|
|
14
|
+
data: {
|
|
15
|
+
card_qrcode: ['二维码内容', 'String', '必选'],
|
|
17
16
|
},
|
|
18
|
-
isConsole: true,
|
|
19
17
|
disabled: true,
|
|
20
18
|
},
|
|
21
19
|
{
|
|
22
|
-
|
|
23
|
-
mapFnName: 'updateTfkFilmPaiqiDate',
|
|
24
|
-
title: '更新排期',
|
|
25
|
-
path: '/api/account/film/paiqi-date',
|
|
20
|
+
mapFnName: 'getByPwdCardDetail',
|
|
26
21
|
isRule: false,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
title: '根据卡号密码获得卡信息',
|
|
23
|
+
prefix: 'detal',
|
|
24
|
+
path: '/card/v1/card-bind/get-card-by-password',
|
|
25
|
+
data: {
|
|
26
|
+
card_number: ['卡号', 'String', '必选'],
|
|
27
|
+
card_password: ['卡号密码', 'String', '必选']
|
|
30
28
|
},
|
|
31
|
-
isConsole: true,
|
|
32
29
|
disabled: true,
|
|
33
30
|
},
|
|
34
31
|
{
|
|
35
|
-
|
|
36
|
-
mapFnName: 'removeTfkFilmAddress',
|
|
37
|
-
title: '删除我的配送地址',
|
|
38
|
-
path: '/api/account/film/paiqi-date',
|
|
32
|
+
mapFnName: 'getByQrCardDetail',
|
|
39
33
|
isRule: false,
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
title: '根据二维码获得卡信息',
|
|
35
|
+
prefix: 'detal',
|
|
36
|
+
path: '/card/v1/card-bind/get-card-by-qrcode',
|
|
37
|
+
data: {
|
|
38
|
+
card_qrcode: ['二维码', 'String', '必选'],
|
|
42
39
|
},
|
|
43
|
-
isConsole: true,
|
|
44
40
|
disabled: true,
|
|
45
41
|
},
|
|
46
42
|
{
|
|
47
|
-
|
|
48
|
-
mapFnName: 'addTfkFilmcart',
|
|
49
|
-
title: '添加购物车',
|
|
50
|
-
path: '/api/account/film/paiqi-date',
|
|
43
|
+
mapFnName: 'pwdCardBind',
|
|
51
44
|
isRule: false,
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
title: '根据卡号密码绑定卡',
|
|
46
|
+
prefix: 'pwd',
|
|
47
|
+
path: '/card/v1/card-bind/bind-card-by-password',
|
|
48
|
+
data: {
|
|
49
|
+
card_number: ['卡号', 'String', '必选'],
|
|
50
|
+
card_password: ['密码', 'String', '可选'],
|
|
51
|
+
},
|
|
52
|
+
disabled: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
mapFnName: 'qrCardBind',
|
|
56
|
+
isRule: false,
|
|
57
|
+
title: '根据二维码绑定卡',
|
|
58
|
+
prefix: 'qrcode',
|
|
59
|
+
path: '/card/v1/card-bind/bind-card-by-qrcode',
|
|
60
|
+
data: {
|
|
61
|
+
card_qrcode: ['二维码', 'String', '必选'],
|
|
54
62
|
},
|
|
55
|
-
isConsole: true,
|
|
56
63
|
disabled: true,
|
|
57
64
|
},
|
|
65
|
+
{
|
|
66
|
+
mapFnName: "checkValidCode",
|
|
67
|
+
title: "图片验证码 - 校验",
|
|
68
|
+
path: "/common/v1/valid_code/image/check",
|
|
69
|
+
isRule: false,
|
|
70
|
+
data: {
|
|
71
|
+
token: ['随机请求码,前端生成', 'String', '必选'],
|
|
72
|
+
valid_code: ['验证码', 'String', '必选'],
|
|
73
|
+
},
|
|
74
|
+
isConsole: true,
|
|
75
|
+
disabled: true,
|
|
76
|
+
}
|
|
58
77
|
];
|
|
@@ -624,7 +624,31 @@ export default {
|
|
|
624
624
|
placeholder: '请设置边距',
|
|
625
625
|
inline: false,
|
|
626
626
|
notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
627
|
-
}
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
label: '我的票券跳转地址:',
|
|
630
|
+
ele: 'xd-select-pages-path',
|
|
631
|
+
valueKey: 'my_card_url',
|
|
632
|
+
groupKey: 'advanced',
|
|
633
|
+
placeholder: '请选择我的票券跳转地址',
|
|
634
|
+
value: null,
|
|
635
|
+
setting: {
|
|
636
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
637
|
+
},
|
|
638
|
+
inline: false,
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
label: '卡绑定成功回跳地址:',
|
|
642
|
+
ele: 'xd-select-pages-path',
|
|
643
|
+
valueKey: 'back_url',
|
|
644
|
+
groupKey: 'advanced',
|
|
645
|
+
placeholder: '请选择卡绑定成功回跳地址',
|
|
646
|
+
value: null,
|
|
647
|
+
setting: {
|
|
648
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
649
|
+
},
|
|
650
|
+
inline: false,
|
|
651
|
+
},
|
|
628
652
|
].filter(i=>i)
|
|
629
653
|
},
|
|
630
654
|
advanced: [],
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
}">
|
|
36
36
|
<view class="menu_wrap" :style="menuBoxStyle">
|
|
37
37
|
<view class="menu_list">
|
|
38
|
-
<view class="menu_item">
|
|
38
|
+
<view class="menu_item" @click="switchShowType('ticket')">
|
|
39
39
|
<view class="menu_inner" :class="menuShowType"
|
|
40
40
|
:style="[menuType == 'ticket' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">实体券</view>
|
|
41
41
|
</view>
|
|
42
|
-
<view class="menu_item">
|
|
42
|
+
<view class="menu_item" @click="switchShowType('code')">
|
|
43
43
|
<view class="menu_inner" :class="menuShowType"
|
|
44
44
|
:style="[menuType == 'code' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">电子码</view>
|
|
45
45
|
</view>
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
<view :style="btnWrapStyle">
|
|
115
115
|
<xd-button type="primary"
|
|
116
116
|
:radius="btnRadius + 'rpx'"
|
|
117
|
+
@click="toBindCardTicket"
|
|
117
118
|
>
|
|
118
119
|
<xd-font-icon :icon="btnIcon.icon"
|
|
119
120
|
style="display: inline-flex;margin-right: 12rpx;"
|
|
@@ -145,6 +146,7 @@
|
|
|
145
146
|
<view :style="digitalBtnWrapStyle">
|
|
146
147
|
<xd-button type="primary"
|
|
147
148
|
:radius="btnRadius + 'rpx'"
|
|
149
|
+
@click="toBindCardDigital"
|
|
148
150
|
>
|
|
149
151
|
<xd-font-icon :icon="btnIcon.icon"
|
|
150
152
|
style="display: inline-flex;margin-right: 12rpx;"
|
|
@@ -193,6 +195,7 @@
|
|
|
193
195
|
validImageAPIUrl: "",
|
|
194
196
|
valid_token: "",
|
|
195
197
|
formRenderKey: "formRenderKey",
|
|
198
|
+
hasCon: "", //是否有优惠券
|
|
196
199
|
|
|
197
200
|
//todo
|
|
198
201
|
tips: "",
|
|
@@ -252,6 +255,8 @@
|
|
|
252
255
|
digitalCodeLabelWidth: "",
|
|
253
256
|
digitalCodeRadius: 0,
|
|
254
257
|
digitalCodeColor: "",
|
|
258
|
+
my_card_url: "",
|
|
259
|
+
backUrl: "",
|
|
255
260
|
}
|
|
256
261
|
},
|
|
257
262
|
computed: {
|
|
@@ -316,6 +321,7 @@
|
|
|
316
321
|
return this.styleObjectToString({
|
|
317
322
|
background: this.tipBgColor,
|
|
318
323
|
padding: padding,
|
|
324
|
+
fontSize: '24rpx',
|
|
319
325
|
})
|
|
320
326
|
},
|
|
321
327
|
menuItemBoxStyle(){
|
|
@@ -407,6 +413,8 @@
|
|
|
407
413
|
this.digitalCodeLabelWidth = getContainerPropsValue(value, "content.digitalCodeLabelWidth", '100');
|
|
408
414
|
this.digitalCodeRadius = getContainerPropsValue(value, "content.digitalCodeRadius", '0');
|
|
409
415
|
this.digitalCodeColor = getContainerPropsValue(value, "content.digitalCodeColor", '#dddddd');
|
|
416
|
+
this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
|
|
417
|
+
this.backUrl = getContainerPropsValue(this.container, 'content.back_url', { value: "" }).value;
|
|
410
418
|
|
|
411
419
|
console.log(this.digitalCodeRadius, "digitalCodeRadius");
|
|
412
420
|
|
|
@@ -419,9 +427,130 @@
|
|
|
419
427
|
this.formRenderKey = Date.now();
|
|
420
428
|
}
|
|
421
429
|
},
|
|
422
|
-
|
|
430
|
+
toShowCouponDialog(){
|
|
431
|
+
if(this.info){
|
|
432
|
+
jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.form.card_number})
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
switchShowType(type){
|
|
436
|
+
this.menuType = type;
|
|
437
|
+
},
|
|
438
|
+
handlerAfterBindCard(res){
|
|
439
|
+
//已绑定卡券处理
|
|
440
|
+
if(res.pop_info && res.pop_info.pop_code === '1001'){
|
|
441
|
+
this.handleBindConfirm();
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
let path = this.getUrlCallback(this.my_card_url || this.backUrl);
|
|
445
|
+
//有优惠券处理
|
|
446
|
+
if(this.hasCon){
|
|
447
|
+
this.toShowCouponDialog();
|
|
448
|
+
this.$bus.$on("onCloseConDialog",(container_id) => {
|
|
449
|
+
if(container_id === this.hasCon){
|
|
450
|
+
this.$xdUniHelper.redirectTo({
|
|
451
|
+
url: path,
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
})
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
//票券绑定成功
|
|
458
|
+
else{
|
|
459
|
+
this.$xdAlert({
|
|
460
|
+
content: "票券绑定成功",
|
|
461
|
+
close: () => {
|
|
462
|
+
this.$xdUniHelper.redirectTo({
|
|
463
|
+
url: path,
|
|
464
|
+
});
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
//卡券已被自己绑定时的弹框
|
|
470
|
+
handleBindConfirm(){
|
|
471
|
+
this.$xdConfirm({
|
|
472
|
+
styles: this.styles,
|
|
473
|
+
width: '90%',
|
|
474
|
+
content: '您已绑定该票券,无需再次绑定',
|
|
475
|
+
confirmText: '我的票券',
|
|
476
|
+
cancelText: '返回',
|
|
477
|
+
showClose: false,
|
|
478
|
+
success: (res) => {
|
|
479
|
+
if (res.confirm) {
|
|
480
|
+
let path = this.getUrlCallback(this.my_card_url || this.backUrl);
|
|
481
|
+
this.$xdUniHelper.redirectTo({ url: path});
|
|
482
|
+
}else{
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
})
|
|
486
|
+
},
|
|
487
|
+
//绑定实体券
|
|
488
|
+
async toBindCardTicket(){
|
|
489
|
+
console.log(this.form, 'this.form')
|
|
490
|
+
const { card_password, card_number, valid_code } = this.form;
|
|
491
|
+
if(!valid_code) return uni.showToast({
|
|
492
|
+
title: '请输入验证码',
|
|
493
|
+
icon: "none"
|
|
494
|
+
})
|
|
495
|
+
await this.checkValidToken();
|
|
496
|
+
|
|
497
|
+
jfbRootExec("pwdCardBind", {
|
|
498
|
+
vm: this,
|
|
499
|
+
data: {
|
|
500
|
+
card_password: card_password,
|
|
501
|
+
card_number: card_number + "",
|
|
502
|
+
is_show_pop: "Y"
|
|
503
|
+
}
|
|
504
|
+
}).then(res => {
|
|
505
|
+
this.handlerAfterBindCard(res);
|
|
506
|
+
})
|
|
507
|
+
},
|
|
508
|
+
//绑定电子码票券
|
|
509
|
+
toBindCardDigital(){
|
|
510
|
+
const { code } = this.form;
|
|
511
|
+
|
|
512
|
+
if(!code) return "";
|
|
513
|
+
jfbRootExec("pwdCardBind", {
|
|
514
|
+
vm: this,
|
|
515
|
+
data: {
|
|
516
|
+
card_password: code,
|
|
517
|
+
is_show_pop: "Y"
|
|
518
|
+
}
|
|
519
|
+
}).then(res => {
|
|
520
|
+
this.handlerAfterBindCard(res);
|
|
521
|
+
})
|
|
522
|
+
},
|
|
523
|
+
checkValidToken(){
|
|
524
|
+
const { valid_code } = this.form;
|
|
525
|
+
let token = this.valid_token;
|
|
526
|
+
return new Promise((r,j) => {
|
|
527
|
+
jfbRootExec("checkValidCode", {
|
|
528
|
+
vm: this,
|
|
529
|
+
data: {
|
|
530
|
+
token,
|
|
531
|
+
valid_code
|
|
532
|
+
}
|
|
533
|
+
}).then(res => {
|
|
534
|
+
if(res.is_valid){
|
|
535
|
+
r();
|
|
536
|
+
}else{
|
|
537
|
+
uni.showToast({
|
|
538
|
+
title: '验证码错误',
|
|
539
|
+
duration: 2000,
|
|
540
|
+
icon: "none"
|
|
541
|
+
});
|
|
542
|
+
this.switchValidToken();
|
|
543
|
+
j();
|
|
544
|
+
}
|
|
545
|
+
})
|
|
546
|
+
})
|
|
547
|
+
},
|
|
548
|
+
switchValidToken(){
|
|
549
|
+
let valid_token = this.$xdUniHelper.randomChar(20);
|
|
550
|
+
this.valid_token = valid_token;
|
|
551
|
+
},
|
|
423
552
|
onJfbScroll(options) {
|
|
424
|
-
console.log('event.onJfbScroll', options)
|
|
553
|
+
// console.log('event.onJfbScroll', options)
|
|
425
554
|
},
|
|
426
555
|
onJfbReachBottom(options) {
|
|
427
556
|
console.log('event.onJfbReachBottom', options)
|
|
@@ -438,9 +567,12 @@
|
|
|
438
567
|
onJfbUpdate(...data) {
|
|
439
568
|
console.log('event.onJfbUpdate', data)
|
|
440
569
|
},
|
|
441
|
-
onJfbCustomEvent(
|
|
442
|
-
|
|
443
|
-
|
|
570
|
+
onJfbCustomEvent({action, data}){
|
|
571
|
+
if(action === 'baseConDialog@hasCon'){
|
|
572
|
+
this.hasCon = data;
|
|
573
|
+
}
|
|
574
|
+
console.log('onJfbCustomEvent',action, data);
|
|
575
|
+
}
|
|
444
576
|
}
|
|
445
577
|
}
|
|
446
578
|
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
getByPwdCardDetail: {
|
|
5
|
+
"card_number": "101001000005195",
|
|
6
|
+
"card_point": 0,
|
|
7
|
+
"card_type_name": "聚福宝",
|
|
8
|
+
"end_time": "2024-10-31 23:59:59",
|
|
9
|
+
"card_status": "Y",
|
|
10
|
+
"card_status_name": "开启",
|
|
11
|
+
"unit": "点",
|
|
12
|
+
"main_product_name": "",
|
|
13
|
+
"is_exchange": "N",
|
|
14
|
+
"is_expired":'Y',
|
|
15
|
+
"request_id": "741c41d86c5ae0cf",
|
|
16
|
+
"main_business_code_name": "蛋糕(勿改)",
|
|
17
|
+
"other_card_point": 4073,
|
|
18
|
+
},
|
|
19
|
+
pwdCardBind: { "id": 20, "request_id": "91f76bd11d5889be" },
|
|
20
|
+
qrcodeCardBind: {},
|
|
21
|
+
getByQrCardDetail: {},
|
|
22
|
+
qrCardBind: {},
|
|
13
23
|
}
|
|
@@ -16,6 +16,17 @@ module.exports = [
|
|
|
16
16
|
},
|
|
17
17
|
disabled: true,
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
mapFnName: 'loginTfkCardBind',
|
|
21
|
+
isRule: false,
|
|
22
|
+
title: '登录卡',
|
|
23
|
+
prefix: 'login',
|
|
24
|
+
path: '/card/v1/card-bind/login-card',
|
|
25
|
+
data: {
|
|
26
|
+
card_number: ['卡号', 'String', '必选'],
|
|
27
|
+
},
|
|
28
|
+
disabled: true,
|
|
29
|
+
},
|
|
19
30
|
{
|
|
20
31
|
mapFnName: 'getListBaseNewsContent', //自定义方法名字(必选)
|
|
21
32
|
title: '获取内容',
|