jufubao-base 1.0.157 → 1.0.158-beta1
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/JfbBaseConDialog.vue +25 -3
- package/src/components/JfbBaseConDialog/XdCouCardBind.vue +30 -2
- package/src/components/JfbBaseConList/Api.js +12 -0
- package/src/components/JfbBaseConList/JfbBaseConList.vue +271 -111
- package/src/components/JfbBaseConList/Mock.js +1 -1
package/package.json
CHANGED
|
@@ -53,10 +53,14 @@
|
|
|
53
53
|
</view>
|
|
54
54
|
<view v-else class="jfb-base-con-dialog__body-dialog-content">
|
|
55
55
|
<xd-cou-card-bind
|
|
56
|
+
:isAll="isAll"
|
|
57
|
+
:isRandom="isRandom"
|
|
56
58
|
:list="couponList"
|
|
57
59
|
:setting="couponOther"
|
|
60
|
+
:btnImage="btnImage"
|
|
58
61
|
@closeDialog="handleCardBindClose"
|
|
59
62
|
@getCoupont="handleGetCoupon"
|
|
63
|
+
@getAllCoupont="getAllCoupont"
|
|
60
64
|
></xd-cou-card-bind>
|
|
61
65
|
</view>
|
|
62
66
|
</view>
|
|
@@ -114,6 +118,10 @@ export default {
|
|
|
114
118
|
//预览是否显示弹窗
|
|
115
119
|
is_preview_hide_dailog: false,
|
|
116
120
|
|
|
121
|
+
isAll: true,
|
|
122
|
+
isRandom: true,
|
|
123
|
+
btnImage: ''
|
|
124
|
+
|
|
117
125
|
};
|
|
118
126
|
},
|
|
119
127
|
computed: {
|
|
@@ -182,7 +190,6 @@ export default {
|
|
|
182
190
|
},
|
|
183
191
|
|
|
184
192
|
getResult() {
|
|
185
|
-
debugger
|
|
186
193
|
jfbRootExec("getCouponResult", {
|
|
187
194
|
vm: this,
|
|
188
195
|
data: {
|
|
@@ -246,7 +253,7 @@ export default {
|
|
|
246
253
|
jfbRootExec("getCouponDialogList", {
|
|
247
254
|
vm: this,
|
|
248
255
|
data: {
|
|
249
|
-
namespace: this.pageBusinessCode,
|
|
256
|
+
namespace: 'mall'||this.pageBusinessCode,
|
|
250
257
|
distribution_method: this.distribution_method,
|
|
251
258
|
...this.dispatchData
|
|
252
259
|
},
|
|
@@ -281,7 +288,6 @@ export default {
|
|
|
281
288
|
this.couponOther = other;
|
|
282
289
|
if(res.can_take === "Y" && res.has_times === "Y" && list.length > 0){
|
|
283
290
|
if (this.isPreview) {
|
|
284
|
-
debugger
|
|
285
291
|
console.log(getContainerPropsValue(value, "content.is_show_dailog", 'Y'))
|
|
286
292
|
this.isShow = getContainerPropsValue(value, "content.is_show_dailog", 'Y') === 'N';
|
|
287
293
|
}else this.isShow = true;
|
|
@@ -299,6 +305,22 @@ export default {
|
|
|
299
305
|
}
|
|
300
306
|
},
|
|
301
307
|
|
|
308
|
+
getAllCoupont() {
|
|
309
|
+
if(this.isRandom){
|
|
310
|
+
this.p_getRandomCouponList();
|
|
311
|
+
}else{
|
|
312
|
+
this.p_getAllDialogList();
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
p_getRandomCouponList() {
|
|
317
|
+
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
p_getAllDialogList() {
|
|
321
|
+
|
|
322
|
+
},
|
|
323
|
+
|
|
302
324
|
handlePop() {
|
|
303
325
|
console.warn(`this.time${this.time * 60 + "分钟"}`);
|
|
304
326
|
storage.set(this.containerId, 1, this.time);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
backgroundImage: dialogBackground
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
|
-
<view class="ticket_list">
|
|
9
|
+
<view v-if="!isRandom" class="ticket_list">
|
|
10
10
|
<view
|
|
11
11
|
class="ticket_item"
|
|
12
12
|
:class="item.can_take_num"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<view class="item_sub">{{ item.prize_name }}</view>
|
|
21
21
|
|
|
22
22
|
<xd-font-icon class="ticket_icon" :color="item.iconColor" :icon="item.icon"></xd-font-icon>
|
|
23
|
-
<view class="btn">
|
|
23
|
+
<view v-if="!isAll" class="btn">
|
|
24
24
|
<xd-button
|
|
25
25
|
size="small"
|
|
26
26
|
type="primary"
|
|
@@ -34,6 +34,19 @@
|
|
|
34
34
|
</view>
|
|
35
35
|
</view>
|
|
36
36
|
</view>
|
|
37
|
+
<view v-else>
|
|
38
|
+
随机领取图片
|
|
39
|
+
</view>
|
|
40
|
+
<xd-button
|
|
41
|
+
v-if="isAll"
|
|
42
|
+
size="small"
|
|
43
|
+
type="primary"
|
|
44
|
+
:style="{
|
|
45
|
+
backgroundImage: btnImage,
|
|
46
|
+
backgroundSize: '100% 100%',
|
|
47
|
+
}"
|
|
48
|
+
@click="getAllCoupont"
|
|
49
|
+
>{{isRandom?'开心获取':'一键领取'}}</xd-button>
|
|
37
50
|
</view>
|
|
38
51
|
|
|
39
52
|
<xd-font-icon
|
|
@@ -62,6 +75,18 @@ export default{
|
|
|
62
75
|
return []
|
|
63
76
|
}
|
|
64
77
|
},
|
|
78
|
+
isAll: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false
|
|
81
|
+
},
|
|
82
|
+
isRandom: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
btnImage: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: ""
|
|
89
|
+
},
|
|
65
90
|
setting: {}
|
|
66
91
|
},
|
|
67
92
|
computed: {
|
|
@@ -99,6 +124,9 @@ export default{
|
|
|
99
124
|
this.$emit("getCoupont", item);
|
|
100
125
|
}
|
|
101
126
|
},
|
|
127
|
+
getAllCoupont() {
|
|
128
|
+
this.$emit("getAllCoupont", item);
|
|
129
|
+
},
|
|
102
130
|
handleClose(){
|
|
103
131
|
this.$emit("closeDialog");
|
|
104
132
|
}
|
|
@@ -32,6 +32,18 @@ module.exports = [
|
|
|
32
32
|
isConsole: true,
|
|
33
33
|
disabled: true,
|
|
34
34
|
},
|
|
35
|
+
{
|
|
36
|
+
mapFnName: 'getOnceCoupon', //自定义方法名字(必选)
|
|
37
|
+
title: '领取优惠券',
|
|
38
|
+
path: '/sms-coupon/v1/activity-prizes-user/set',
|
|
39
|
+
isRule: false,
|
|
40
|
+
params: {
|
|
41
|
+
distribution_method: ['发放方式 entry=主动发放, homed=首页发放,paid=消费后发放,card_binded=绑定卡后发放', 'String', '选填'],
|
|
42
|
+
namespace: ['业务线', 'String', '必填'],
|
|
43
|
+
},
|
|
44
|
+
isConsole: true,
|
|
45
|
+
disabled: true,
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
mapFnName: 'getAllCoupon', //自定义方法名字(必选)
|
|
37
49
|
title: '领取优惠券',
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
backgroundSize: '100%',
|
|
25
25
|
backgroundRepeat: 'no-repeat',
|
|
26
26
|
minHeight: `${layoutInfo.bodyMinHeightRpx}rpx`,
|
|
27
|
-
|
|
27
|
+
}"
|
|
28
28
|
>
|
|
29
|
-
<view v-if="
|
|
29
|
+
<view v-if="!message && can_take !== 'N'">
|
|
30
30
|
<view class="jfb-base-con-list__body-content">
|
|
31
31
|
<view class="jfb-base-con-list__body-content-header">
|
|
32
32
|
<view class="jfb-base-con-list__body-content-header-left">
|
|
@@ -34,7 +34,10 @@
|
|
|
34
34
|
<view>赠送优惠券</view>
|
|
35
35
|
</view>
|
|
36
36
|
<view
|
|
37
|
-
:style="{
|
|
37
|
+
:style="{
|
|
38
|
+
color: '#FA2125',
|
|
39
|
+
backgroundColor: contentBackground,
|
|
40
|
+
}"
|
|
38
41
|
class="jfb-base-con-list__body-content-header-right"
|
|
39
42
|
@click="showRule = true"
|
|
40
43
|
>
|
|
@@ -42,64 +45,99 @@
|
|
|
42
45
|
<xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon>
|
|
43
46
|
</view>
|
|
44
47
|
</view>
|
|
45
|
-
<view
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<view class="item_head">
|
|
55
|
-
<image class="t_icon" mode="widthFix" :src="item.headIcon" ></image>
|
|
56
|
-
<view>{{ item.prize_type }}</view>
|
|
57
|
-
</view>
|
|
58
|
-
<view class="item_sub">{{ item.prize_name }}</view>
|
|
59
|
-
<xd-font-icon
|
|
60
|
-
size="100"
|
|
48
|
+
<view
|
|
49
|
+
v-if="can_take === 'Y' && has_times === 'Y'"
|
|
50
|
+
class="jfb-base-con-list__body-content-list"
|
|
51
|
+
>
|
|
52
|
+
<view v-if="!isRandom">
|
|
53
|
+
<view v-for="(item, index) in couponList" :key="index">
|
|
54
|
+
<view
|
|
55
|
+
class="jfb-base-con-list__body-content-list-item"
|
|
56
|
+
:class="'status_' + item.can_take_num"
|
|
61
57
|
:style="{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
backgroundColor:
|
|
59
|
+
item.can_take_num === 'Y' || item.can_take_num === 'P'
|
|
60
|
+
? contentBackground
|
|
61
|
+
: '#F3F3F3',
|
|
66
62
|
}"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
>
|
|
64
|
+
<view class="item_head">
|
|
65
|
+
<image
|
|
66
|
+
class="t_icon"
|
|
67
|
+
mode="widthFix"
|
|
68
|
+
:src="item.headIcon"
|
|
69
|
+
></image>
|
|
70
|
+
<view>{{ item.prize_type }}</view>
|
|
71
|
+
</view>
|
|
72
|
+
<view class="item_sub">{{ item.prize_name }}</view>
|
|
73
|
+
<xd-font-icon
|
|
74
|
+
size="100"
|
|
75
|
+
:style="{
|
|
76
|
+
color: item.iconColor,
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
right: '0rpx',
|
|
79
|
+
top: '0rpx',
|
|
80
|
+
}"
|
|
81
|
+
:icon="item.icon"
|
|
82
|
+
></xd-font-icon>
|
|
83
|
+
<view v-if="!isAll" class="btn_wrap">
|
|
84
|
+
<xd-button
|
|
85
|
+
size="small"
|
|
86
|
+
:disabled="
|
|
87
|
+
item.can_take_num !== 'Y' &&
|
|
88
|
+
item.remain_card_count == 0
|
|
89
|
+
"
|
|
90
|
+
@click="getCoupont(item)"
|
|
91
|
+
type="primary"
|
|
92
|
+
style="width: 170rpx; height: 60rpx"
|
|
93
|
+
:style="item.btn"
|
|
94
|
+
:color="item.infoColor"
|
|
95
|
+
>{{ item.btn_txt }}</xd-button
|
|
96
|
+
>
|
|
97
|
+
</view>
|
|
79
98
|
</view>
|
|
80
99
|
</view>
|
|
81
100
|
</view>
|
|
101
|
+
<view v-else>
|
|
102
|
+
<img
|
|
103
|
+
style="width: 100%"
|
|
104
|
+
mode="widthFix"
|
|
105
|
+
:src="app_coupon_bottom_url"
|
|
106
|
+
alt=""
|
|
107
|
+
/>
|
|
108
|
+
</view>
|
|
109
|
+
<xd-button
|
|
110
|
+
v-if="isAll"
|
|
111
|
+
size="small"
|
|
112
|
+
type="primary"
|
|
113
|
+
:style="btn_style"
|
|
114
|
+
@click="getAllCoupont"
|
|
115
|
+
>{{ btn_txt }}</xd-button
|
|
116
|
+
>
|
|
82
117
|
</view>
|
|
83
|
-
<view
|
|
118
|
+
<view
|
|
119
|
+
v-else
|
|
120
|
+
class="jfb-base-con-list__body-content-list"
|
|
121
|
+
style="padding-bottom: 60rpx"
|
|
122
|
+
>
|
|
84
123
|
<image mode="widthFix" :src="used_up_url"></image>
|
|
85
124
|
</view>
|
|
86
125
|
</view>
|
|
87
|
-
<view class="jfb-base-con-list__body-content-foot" @click="toCoupon"
|
|
126
|
+
<view class="jfb-base-con-list__body-content-foot" @click="toCoupon">
|
|
88
127
|
<view
|
|
89
128
|
:style="{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
129
|
+
padding: outPadding,
|
|
130
|
+
border: border,
|
|
131
|
+
borderRadius: radius + 'rpx',
|
|
132
|
+
color: btnTextColor,
|
|
133
|
+
backgroundColor: btnBgColor,
|
|
134
|
+
boxShadow: shadow,
|
|
135
|
+
}"
|
|
136
|
+
>查看已领票券</view
|
|
137
|
+
>
|
|
97
138
|
</view>
|
|
98
139
|
</view>
|
|
99
|
-
<view
|
|
100
|
-
v-else
|
|
101
|
-
class="empty_data"
|
|
102
|
-
>
|
|
140
|
+
<view v-else class="empty_data">
|
|
103
141
|
<image :src="emptyBg"></image>
|
|
104
142
|
{{ message }}
|
|
105
143
|
</view>
|
|
@@ -109,7 +147,10 @@
|
|
|
109
147
|
title="活动规则说明"
|
|
110
148
|
:show.sync="showRule"
|
|
111
149
|
>
|
|
112
|
-
<xd-content-xss
|
|
150
|
+
<xd-content-xss
|
|
151
|
+
style="text-align: left"
|
|
152
|
+
:html="notice"
|
|
153
|
+
></xd-content-xss>
|
|
113
154
|
</xd-dailog>
|
|
114
155
|
</view>
|
|
115
156
|
</view>
|
|
@@ -167,18 +208,23 @@ export default {
|
|
|
167
208
|
collectedPath: "",
|
|
168
209
|
|
|
169
210
|
//按钮设置
|
|
170
|
-
btnBgColor:
|
|
171
|
-
btnTextColor:
|
|
172
|
-
padding:{},
|
|
211
|
+
btnBgColor: "",
|
|
212
|
+
btnTextColor: "",
|
|
213
|
+
padding: {},
|
|
173
214
|
radius: 0,
|
|
174
215
|
//边框
|
|
175
|
-
is_border:
|
|
176
|
-
is_border_c:
|
|
177
|
-
is_border_w:
|
|
216
|
+
is_border: "N",
|
|
217
|
+
is_border_c: "",
|
|
218
|
+
is_border_w: "",
|
|
178
219
|
//投影
|
|
179
|
-
is_shadow:
|
|
220
|
+
is_shadow: "Y",
|
|
180
221
|
is_shadow_bg: 0,
|
|
181
222
|
is_shadow_w: 0,
|
|
223
|
+
|
|
224
|
+
isAll: false,
|
|
225
|
+
isRandom: false,
|
|
226
|
+
btn_txt: "",
|
|
227
|
+
btn_style: {},
|
|
182
228
|
};
|
|
183
229
|
},
|
|
184
230
|
computed: {
|
|
@@ -191,15 +237,17 @@ export default {
|
|
|
191
237
|
str = `${str} ${this.checkValue(this.padding.right, 0)}rpx`;
|
|
192
238
|
str = `${str} ${this.checkValue(this.padding.bottom, 0)}rpx`;
|
|
193
239
|
str = `${str} ${this.checkValue(this.padding.left, 0)}rpx`;
|
|
194
|
-
return str
|
|
240
|
+
return str;
|
|
195
241
|
},
|
|
196
242
|
border() {
|
|
197
|
-
if (this.is_border ===
|
|
198
|
-
|
|
243
|
+
if (this.is_border === "Y")
|
|
244
|
+
return `${this.is_border_w}rpx solid ${this.is_border_c}`;
|
|
245
|
+
else return "0";
|
|
199
246
|
},
|
|
200
|
-
shadow(){
|
|
201
|
-
if(this.is_shadow ===
|
|
202
|
-
|
|
247
|
+
shadow() {
|
|
248
|
+
if (this.is_shadow === "Y")
|
|
249
|
+
return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
|
|
250
|
+
else return "0 0 0 rgba(0,0,0,0)";
|
|
203
251
|
},
|
|
204
252
|
},
|
|
205
253
|
watch: {
|
|
@@ -217,22 +265,50 @@ export default {
|
|
|
217
265
|
},
|
|
218
266
|
methods: {
|
|
219
267
|
init(value) {
|
|
220
|
-
this.contentBackground =
|
|
221
|
-
this.iconColor =
|
|
222
|
-
this.collectedPath = getContainerPropsValue(
|
|
268
|
+
this.contentBackground = "#FFF8F8";
|
|
269
|
+
this.iconColor = "#FF4D4A";
|
|
270
|
+
this.collectedPath = getContainerPropsValue(
|
|
271
|
+
value,
|
|
272
|
+
"content.collectedPath",
|
|
273
|
+
{ value: "" }
|
|
274
|
+
).value;
|
|
223
275
|
|
|
224
276
|
this.padding = getContainerPropsValue(value, "content.padding", {});
|
|
225
|
-
this.btnBgColor = getContainerPropsValue(
|
|
226
|
-
|
|
227
|
-
|
|
277
|
+
this.btnBgColor = getContainerPropsValue(
|
|
278
|
+
value,
|
|
279
|
+
"content.btnBgColor",
|
|
280
|
+
"rgba(0,0,0,0)"
|
|
281
|
+
);
|
|
282
|
+
this.btnTextColor = getContainerPropsValue(
|
|
283
|
+
value,
|
|
284
|
+
"content.btnTextColor",
|
|
285
|
+
"#666"
|
|
286
|
+
);
|
|
287
|
+
this.radius = getContainerPropsValue(value, "content.radius", "0");
|
|
228
288
|
|
|
229
|
-
this.is_border = getContainerPropsValue(value, "content.is_border",
|
|
230
|
-
this.is_border_c = getContainerPropsValue(
|
|
231
|
-
|
|
289
|
+
this.is_border = getContainerPropsValue(value, "content.is_border", "N");
|
|
290
|
+
this.is_border_c = getContainerPropsValue(
|
|
291
|
+
value,
|
|
292
|
+
"content.is_border_c",
|
|
293
|
+
"#e5e5e5"
|
|
294
|
+
);
|
|
295
|
+
this.is_border_w = getContainerPropsValue(
|
|
296
|
+
value,
|
|
297
|
+
"content.is_border_w",
|
|
298
|
+
1
|
|
299
|
+
);
|
|
232
300
|
|
|
233
|
-
this.is_shadow = getContainerPropsValue(value,
|
|
234
|
-
this.is_shadow_bg = getContainerPropsValue(
|
|
235
|
-
|
|
301
|
+
this.is_shadow = getContainerPropsValue(value, "content.is_shadow", "N");
|
|
302
|
+
this.is_shadow_bg = getContainerPropsValue(
|
|
303
|
+
value,
|
|
304
|
+
"content.is_shadow_bg",
|
|
305
|
+
"#fff"
|
|
306
|
+
);
|
|
307
|
+
this.is_shadow_w = getContainerPropsValue(
|
|
308
|
+
value,
|
|
309
|
+
"content.is_shadow_w",
|
|
310
|
+
"10"
|
|
311
|
+
);
|
|
236
312
|
},
|
|
237
313
|
|
|
238
314
|
getList() {
|
|
@@ -241,37 +317,84 @@ export default {
|
|
|
241
317
|
data: {
|
|
242
318
|
...this.options,
|
|
243
319
|
distribution_method: this.method,
|
|
244
|
-
namespace: this.pageBusinessCode,
|
|
320
|
+
namespace: "mall" || this.pageBusinessCode,
|
|
245
321
|
activity_id: this.activity_id,
|
|
246
322
|
},
|
|
247
323
|
})
|
|
248
324
|
.then((res) => {
|
|
249
325
|
this.background = getServiceUrl(res.background);
|
|
250
326
|
this.used_up_url = res.used_up_url && getServiceUrl(res.used_up_url);
|
|
327
|
+
this.app_activity_button =
|
|
328
|
+
res.app_activity_button && getServiceUrl(res.app_activity_button);
|
|
329
|
+
this.app_activity_url =
|
|
330
|
+
res.app_activity_url && getServiceUrl(res.app_activity_url);
|
|
331
|
+
this.app_coupon_bottom_url =
|
|
332
|
+
res.app_coupon_bottom_url &&
|
|
333
|
+
getServiceUrl(res.app_coupon_bottom_url);
|
|
251
334
|
this.can_take = res.can_take;
|
|
252
335
|
this.has_times = res.has_times;
|
|
253
336
|
this.next_url = res.next_url;
|
|
337
|
+
this.isAll = res.receive_method === "batch";
|
|
338
|
+
this.isRandom = res.distribution_type === "random";
|
|
339
|
+
// 判断是否是一键领取
|
|
340
|
+
if (this.isAll) {
|
|
341
|
+
// 定义按钮文字
|
|
342
|
+
let btn_txt = "";
|
|
343
|
+
// 设置按钮样式
|
|
344
|
+
this.btn_style = res.app_coupon_button_bg_url
|
|
345
|
+
? {
|
|
346
|
+
// 设置背景图片
|
|
347
|
+
backgroundImage: `url(${getServiceUrl(
|
|
348
|
+
res.can_take !== "Y"
|
|
349
|
+
? res.app_coupon_button_see_url
|
|
350
|
+
: res.app_coupon_button_bg_url
|
|
351
|
+
)})`,
|
|
352
|
+
// 设置背景大小
|
|
353
|
+
backgroundSize: "100% 100%",
|
|
354
|
+
// 设置背景重复
|
|
355
|
+
backgroundRepeat: "no-repeat",
|
|
356
|
+
// 设置背景颜色
|
|
357
|
+
backgroundColor: "",
|
|
358
|
+
// 设置外边距
|
|
359
|
+
margin: "0",
|
|
360
|
+
}
|
|
361
|
+
: {
|
|
362
|
+
// 设置背景颜色
|
|
363
|
+
backgroundColor: "#FB5B3F",
|
|
364
|
+
// 设置外边距
|
|
365
|
+
margin: "0",
|
|
366
|
+
};
|
|
367
|
+
// 设置按钮文字
|
|
368
|
+
btn_txt = res.can_take === "Y" ? "一键领取" : "去查看";
|
|
369
|
+
// 判断是否是随机领取
|
|
370
|
+
if (this.isRandom) {
|
|
371
|
+
// 设置按钮文字
|
|
372
|
+
btn_txt = res.can_take === "Y" ? "开心领取" : "去查看";
|
|
373
|
+
}
|
|
374
|
+
// 设置按钮文字
|
|
375
|
+
this.btn_txt = btn_txt;
|
|
376
|
+
}
|
|
254
377
|
|
|
255
|
-
|
|
256
|
-
res.list
|
|
257
|
-
|
|
258
|
-
res.list.map((item) => {
|
|
259
|
-
let mapArr = {"Y": "去查看", "P": "领取", "N": "已发完"}
|
|
378
|
+
if (res.list && res.list.length) {
|
|
379
|
+
this.couponList = res.list.map((item) => {
|
|
380
|
+
let mapArr = { Y: "去查看", P: "领取", N: "已发完" };
|
|
260
381
|
item.btn_txt = mapArr[item.can_take_num];
|
|
261
382
|
if (item.can_take_num === "Y" || item.can_take_num === "P") {
|
|
262
383
|
//按钮样式
|
|
263
384
|
item.btn = res.app_coupon_button_bg_url
|
|
264
385
|
? {
|
|
265
386
|
backgroundImage: `url(${getServiceUrl(
|
|
266
|
-
item.can_take_num === "Y"
|
|
387
|
+
item.can_take_num === "Y"
|
|
388
|
+
? res.app_coupon_button_see_url
|
|
389
|
+
: res.app_coupon_button_bg_url
|
|
267
390
|
)})`,
|
|
268
391
|
backgroundSize: "100% 100%",
|
|
269
392
|
backgroundRepeat: "no-repeat",
|
|
270
|
-
backgroundColor:
|
|
393
|
+
backgroundColor: "",
|
|
271
394
|
margin: "0",
|
|
272
395
|
}
|
|
273
396
|
: {
|
|
274
|
-
backgroundColor:
|
|
397
|
+
backgroundColor: "#FB5B3F",
|
|
275
398
|
margin: "0",
|
|
276
399
|
};
|
|
277
400
|
//整块背景
|
|
@@ -282,34 +405,39 @@ export default {
|
|
|
282
405
|
backgroundRepeat: "no-repeat",
|
|
283
406
|
};
|
|
284
407
|
//icon
|
|
285
|
-
item.icon=
|
|
408
|
+
item.icon =
|
|
409
|
+
item.can_take_num === "Y" ? "iconyilingqu" : "icondailingqu";
|
|
286
410
|
//icon颜色
|
|
287
|
-
item.iconColor =
|
|
411
|
+
item.iconColor =
|
|
412
|
+
item.can_take_num === "Y" ? "#D6D6D6" : this.iconColor;
|
|
288
413
|
//券名称颜色
|
|
289
|
-
item.nameColor =
|
|
414
|
+
item.nameColor = "#FB5B3F";
|
|
290
415
|
//其他文字颜色
|
|
291
|
-
item.infoColor =
|
|
416
|
+
item.infoColor = "#fff";
|
|
292
417
|
} else {
|
|
293
418
|
//按钮样式
|
|
294
419
|
item.btn = { background: "#D6D6D6", margin: "0" };
|
|
295
420
|
//整块背景
|
|
296
|
-
item.headIcon = getServiceUrl(res.app_coupon_invalid_url)
|
|
421
|
+
item.headIcon = getServiceUrl(res.app_coupon_invalid_url);
|
|
297
422
|
item.couponBackground = {
|
|
298
|
-
backgroundImage: `url(${getServiceUrl(
|
|
423
|
+
backgroundImage: `url(${getServiceUrl(
|
|
424
|
+
res.app_coupon_invalid_url
|
|
425
|
+
)})`,
|
|
299
426
|
backgroundSize: "100%",
|
|
300
427
|
backgroundRepeat: "no-repeat",
|
|
301
428
|
};
|
|
302
429
|
//icon
|
|
303
|
-
item.icon=
|
|
430
|
+
item.icon = "iconyifawan";
|
|
304
431
|
//icon颜色
|
|
305
|
-
item.iconColor =
|
|
432
|
+
item.iconColor = "#D6D6D6";
|
|
306
433
|
//券名称颜色
|
|
307
|
-
item.nameColor =
|
|
434
|
+
item.nameColor = "#BBBBBB";
|
|
308
435
|
//其他文字颜色
|
|
309
|
-
item.infoColor =
|
|
436
|
+
item.infoColor = "#BBBBBB";
|
|
310
437
|
}
|
|
311
438
|
return item;
|
|
312
439
|
});
|
|
440
|
+
}
|
|
313
441
|
console.log("couponList", this.couponList);
|
|
314
442
|
this.message = res.message;
|
|
315
443
|
this.notice = res.about;
|
|
@@ -320,24 +448,24 @@ export default {
|
|
|
320
448
|
});
|
|
321
449
|
},
|
|
322
450
|
|
|
323
|
-
toCoupon(){
|
|
451
|
+
toCoupon() {
|
|
324
452
|
this.$xdUniHelper.navigateTo({
|
|
325
453
|
url: this.next_url || this.collectedPath,
|
|
326
454
|
});
|
|
327
455
|
},
|
|
328
456
|
|
|
329
457
|
getCoupont(item) {
|
|
330
|
-
if(item.can_take_num === "Y") {
|
|
458
|
+
if (item.can_take_num === "Y") {
|
|
331
459
|
this.toCoupon();
|
|
332
460
|
return;
|
|
333
461
|
}
|
|
334
462
|
this.$xdShowLoading({});
|
|
335
|
-
jfbRootExec("
|
|
463
|
+
jfbRootExec("getOnceCoupon", {
|
|
336
464
|
vm: this,
|
|
337
465
|
data: {
|
|
338
466
|
...this.options,
|
|
339
467
|
distribution_method: this.method,
|
|
340
|
-
namespace: this.pageBusinessCode,
|
|
468
|
+
namespace: "mall" || this.pageBusinessCode,
|
|
341
469
|
activity_id: this.activity_id,
|
|
342
470
|
prize_id: item.prize_id,
|
|
343
471
|
},
|
|
@@ -355,9 +483,42 @@ export default {
|
|
|
355
483
|
return;
|
|
356
484
|
}
|
|
357
485
|
this.order_num = res.tmp_order_number;
|
|
358
|
-
setTimeout(()=>{
|
|
486
|
+
setTimeout(() => {
|
|
359
487
|
this.getResult();
|
|
360
|
-
},1000)
|
|
488
|
+
}, 1000);
|
|
489
|
+
})
|
|
490
|
+
.catch((err) => {
|
|
491
|
+
console.log(err, "err");
|
|
492
|
+
});
|
|
493
|
+
},
|
|
494
|
+
|
|
495
|
+
getAllCoupont() {
|
|
496
|
+
this.$xdShowLoading({});
|
|
497
|
+
jfbRootExec("getAllCoupon", {
|
|
498
|
+
vm: this,
|
|
499
|
+
data: {
|
|
500
|
+
...this.options,
|
|
501
|
+
distribution_method: this.method,
|
|
502
|
+
namespace: "mall" || this.pageBusinessCode,
|
|
503
|
+
activity_id: this.activity_id,
|
|
504
|
+
},
|
|
505
|
+
})
|
|
506
|
+
.then((res) => {
|
|
507
|
+
if (res.code == 400) {
|
|
508
|
+
this.$xdHideLoading();
|
|
509
|
+
this.$xdAlert({
|
|
510
|
+
content: res.message,
|
|
511
|
+
zIndex: 3200,
|
|
512
|
+
time: 2000,
|
|
513
|
+
isClose: false,
|
|
514
|
+
});
|
|
515
|
+
this.getList();
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
this.order_num = res.tmp_order_number;
|
|
519
|
+
setTimeout(() => {
|
|
520
|
+
this.getResult();
|
|
521
|
+
}, 1000);
|
|
361
522
|
})
|
|
362
523
|
.catch((err) => {
|
|
363
524
|
console.log(err, "err");
|
|
@@ -470,7 +631,7 @@ export default {
|
|
|
470
631
|
overflow-y: auto;
|
|
471
632
|
padding-top: 220rpx;
|
|
472
633
|
box-sizing: border-box;
|
|
473
|
-
background-color: #
|
|
634
|
+
background-color: #fafafa;
|
|
474
635
|
}
|
|
475
636
|
|
|
476
637
|
.empty_data {
|
|
@@ -531,40 +692,39 @@ export default {
|
|
|
531
692
|
margin: unit(20, rpx) auto 0 auto;
|
|
532
693
|
position: relative;
|
|
533
694
|
|
|
534
|
-
&.status_N{
|
|
535
|
-
.item_head{
|
|
536
|
-
color: #
|
|
695
|
+
&.status_N {
|
|
696
|
+
.item_head {
|
|
697
|
+
color: #bbbbbb;
|
|
537
698
|
}
|
|
538
|
-
.item_sub{
|
|
539
|
-
color: #
|
|
699
|
+
.item_sub {
|
|
700
|
+
color: #bbbbbb;
|
|
540
701
|
}
|
|
541
702
|
}
|
|
542
|
-
.btn_wrap{
|
|
703
|
+
.btn_wrap {
|
|
543
704
|
position: absolute;
|
|
544
705
|
right: 30rpx;
|
|
545
706
|
bottom: 40rpx;
|
|
546
707
|
}
|
|
547
708
|
|
|
548
|
-
.item_head{
|
|
709
|
+
.item_head {
|
|
549
710
|
display: flex;
|
|
550
711
|
align-items: center;
|
|
551
712
|
font-size: 40rpx;
|
|
552
713
|
color: #000000;
|
|
553
714
|
font-weight: 500;
|
|
554
715
|
|
|
555
|
-
.t_icon{
|
|
716
|
+
.t_icon {
|
|
556
717
|
width: 44rpx;
|
|
557
718
|
margin-right: 20rpx;
|
|
558
719
|
max-height: 80rpx;
|
|
559
720
|
}
|
|
560
721
|
}
|
|
561
|
-
.item_sub{
|
|
722
|
+
.item_sub {
|
|
562
723
|
margin-top: 26rpx;
|
|
563
|
-
color: #
|
|
724
|
+
color: #ff4d4a;
|
|
564
725
|
font-size: 36rpx;
|
|
565
726
|
font-weight: 400;
|
|
566
727
|
}
|
|
567
|
-
|
|
568
728
|
}
|
|
569
729
|
}
|
|
570
730
|
&-foot {
|