jufubao-base 1.0.105-beta1 → 1.0.105-beta2
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/JfbBaseConDialog/Attr.js +12 -0
- package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +14 -1
- package/src/components/JfbBaseConList/JfbBaseConList.vue +6 -1
- package/src/components/JfbBaseConList/Mock.js +18 -5
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +4 -1
package/package.json
CHANGED
|
@@ -31,6 +31,18 @@ export default {
|
|
|
31
31
|
{ label: '切换', value: 2 },
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
label: "触发事件:",
|
|
36
|
+
ele: "xd-select-list",
|
|
37
|
+
valueKey: "distribution_method",
|
|
38
|
+
value: data.distribution_method || "",
|
|
39
|
+
placeholder: "请选择触发事件",
|
|
40
|
+
list: [
|
|
41
|
+
// { label: "首页发放", value: "homed" },
|
|
42
|
+
{ label: "支付成功", value: "paid" },
|
|
43
|
+
{ label: "绑卡成功", value: "card_binded" },
|
|
44
|
+
]
|
|
45
|
+
},
|
|
34
46
|
{
|
|
35
47
|
label: '弹窗间隔:',
|
|
36
48
|
ele: 'el-input',
|
|
@@ -93,6 +93,9 @@ export default {
|
|
|
93
93
|
isPreview: false, //是否预览
|
|
94
94
|
activity_id: "",
|
|
95
95
|
backgroundColor: "",
|
|
96
|
+
distribution_method: "homed", //触发事件
|
|
97
|
+
dispatchData: "", //触发事件参数
|
|
98
|
+
|
|
96
99
|
};
|
|
97
100
|
},
|
|
98
101
|
computed: {
|
|
@@ -114,6 +117,7 @@ export default {
|
|
|
114
117
|
this.list_url = getContainerPropsValue(value, "content.list_url", {
|
|
115
118
|
value: "",
|
|
116
119
|
}).value;
|
|
120
|
+
this.distribution_method = getContainerPropsValue(value, "content.distribution_method", "");
|
|
117
121
|
this.type = getContainerPropsValue(value, "content.type", 1);
|
|
118
122
|
this.isHide = getContainerPropsValue(value, "content.isHide", false);
|
|
119
123
|
this.time = Number(getContainerPropsValue(value, "content.time", 3));
|
|
@@ -122,10 +126,12 @@ export default {
|
|
|
122
126
|
}
|
|
123
127
|
},
|
|
124
128
|
getDialogList() {
|
|
129
|
+
|
|
125
130
|
jfbRootExec("getCouponDialogList", {
|
|
126
131
|
vm: this,
|
|
127
132
|
data: {
|
|
128
133
|
namespace: this.pageBusinessCode,
|
|
134
|
+
distribution_method: this.distribution_method,
|
|
129
135
|
},
|
|
130
136
|
})
|
|
131
137
|
.then((res) => {
|
|
@@ -167,7 +173,7 @@ export default {
|
|
|
167
173
|
},
|
|
168
174
|
handleToList() {
|
|
169
175
|
this.$xdUniHelper.navigateTo({
|
|
170
|
-
url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method
|
|
176
|
+
url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method=${this.distribution_method}`,
|
|
171
177
|
});
|
|
172
178
|
},
|
|
173
179
|
handleClose() {
|
|
@@ -201,6 +207,13 @@ export default {
|
|
|
201
207
|
);
|
|
202
208
|
this.activity_id = this.list[this.currentIndex].activity_id;
|
|
203
209
|
},
|
|
210
|
+
onJfbCustomEvent({action, data}){
|
|
211
|
+
if(action === '@showBaseConDialog'){
|
|
212
|
+
this.dispatchData = data;
|
|
213
|
+
this.getDialogList();
|
|
214
|
+
}
|
|
215
|
+
console.log('onJfbCustomEvent',action, data);
|
|
216
|
+
}
|
|
204
217
|
},
|
|
205
218
|
};
|
|
206
219
|
</script>
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
|
|
107
107
|
<xd-button
|
|
108
108
|
size="small"
|
|
109
|
-
:disabled="item.remain_card_count == 0"
|
|
109
|
+
:disabled="item.can_take_num !=='Y' && item.remain_card_count == 0"
|
|
110
110
|
@click="getCoupont(item)"
|
|
111
111
|
type="primary"
|
|
112
112
|
style="width: 170rpx;height: 60rpx;"
|
|
@@ -308,6 +308,10 @@ export default {
|
|
|
308
308
|
});
|
|
309
309
|
},
|
|
310
310
|
getCoupont(item) {
|
|
311
|
+
if(item.can_take_num === "Y") {
|
|
312
|
+
this.toCoupon();
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
311
315
|
this.$xdShowLoading({});
|
|
312
316
|
jfbRootExec("getAllCoupon", {
|
|
313
317
|
vm: this,
|
|
@@ -348,6 +352,7 @@ export default {
|
|
|
348
352
|
})
|
|
349
353
|
.then((res) => {
|
|
350
354
|
if (res.status_type === "success") {
|
|
355
|
+
this.order_num = null;
|
|
351
356
|
this.$xdHideLoading();
|
|
352
357
|
this.$xdAlert({
|
|
353
358
|
content: "领取成功",
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
getCouponList: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
getCouponList: {
|
|
5
|
+
"list":[
|
|
6
|
+
{"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
|
|
7
|
+
{"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
|
|
8
|
+
{"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55}
|
|
9
|
+
],
|
|
10
|
+
"background":"//sandbox-img.jufubao.cn/uploads/20231204/96b801e0dc27422c183dc90d905dd2ed.jpg",
|
|
11
|
+
"has_times": "Y",
|
|
12
|
+
"can_take":"Y",
|
|
13
|
+
"message":"",
|
|
14
|
+
"app_coupon_url":"//sandbox-img.jufubao.cn/uploads/20231205/fee9b644b83495c9ba8a4db277600b54.jpg",
|
|
15
|
+
"app_activity_button":"//sandbox-img.jufubao.cn/uploads/20231207/35f3065b2b2bc3fc2dda73d7b5b9eae8.jpg",
|
|
16
|
+
"app_coupon_button_bg_url":"//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
|
|
17
|
+
"app_coupon_button_see_url": "//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
|
|
18
|
+
"app_coupon_invalid_url":"//sandbox-img.jufubao.cn/uploads/20231208/8b153ce4870686a37295c16fbc992235.jpg",
|
|
19
|
+
"rule":"<p>打发·</p>",
|
|
20
|
+
"request_id":"a2603f2a480485f4"
|
|
21
|
+
},
|
|
9
22
|
getAllCoupon: {
|
|
10
23
|
"request_id": "5987aa28c709d4ef"
|
|
11
24
|
}
|
|
@@ -321,7 +321,7 @@ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
|
321
321
|
import XdDailog from "@/components/XdDailog/XdDailog";
|
|
322
322
|
import XdButton from "@/components/XdButton/XdButton";
|
|
323
323
|
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
324
|
-
import { jfbRootExec } from "@/utils/xd.event";
|
|
324
|
+
import { jfbRootExec, jfbRootFnExec } from "@/utils/xd.event";
|
|
325
325
|
import JfbBaseSuccessMixin from "./JfbBaseSuccessMixin";
|
|
326
326
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
327
327
|
import extsMixins from "@/mixins/extsMixins";
|
|
@@ -495,6 +495,9 @@ export default {
|
|
|
495
495
|
},
|
|
496
496
|
})
|
|
497
497
|
.then((res) => {
|
|
498
|
+
if(res.status.status_type === 'success') {
|
|
499
|
+
jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {order_id: this.order_id});
|
|
500
|
+
}
|
|
498
501
|
this.handleOrderResolve(res);
|
|
499
502
|
})
|
|
500
503
|
.catch((err) => {
|