jufubao-base 1.0.158-beta1 → 1.0.158-beta14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.158-beta1",
3
+ "version": "1.0.158-beta14",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -221,7 +221,6 @@ export default {
221
221
  }
222
222
 
223
223
  let path = this.getUrlCallback(this.my_card_url || this.backUrl);
224
-
225
224
  //有优惠券处理
226
225
  if(this.hasCon){
227
226
  this.toShowCouponDialog();
@@ -238,7 +238,6 @@ export default {
238
238
  }
239
239
  },
240
240
  handlerAfterBindCard(res){
241
-
242
241
  if(res.pop_info && res.pop_info.pop_code === '1001'){
243
242
  this.handleBindConfirm();
244
243
  return;
@@ -29,7 +29,7 @@ module.exports = [
29
29
  disabled: true,
30
30
  },
31
31
  {
32
- mapFnName: 'getAllCoupon', //自定义方法名字(必选)
32
+ mapFnName: 'getOnceCoupon', //自定义方法名字(必选)
33
33
  title: '领取优惠券',
34
34
  path: '/sms-coupon/v1/activity-prizes-user/set',
35
35
  isRule: false,
@@ -40,6 +40,18 @@ module.exports = [
40
40
  isConsole: true,
41
41
  disabled: true,
42
42
  },
43
+ {
44
+ mapFnName: 'getAllCoupon', //自定义方法名字(必选)
45
+ title: '领取优惠券',
46
+ path: '/sms-coupon/v1/activity-prizes-user/set-all',
47
+ isRule: false,
48
+ params: {
49
+ distribution_method: ['发放方式 entry=主动发放, homed=首页发放,paid=消费后发放,card_binded=绑定卡后发放', 'String', '选填'],
50
+ namespace: ['业务线', 'String', '必填'],
51
+ },
52
+ isConsole: true,
53
+ disabled: true,
54
+ },
43
55
  {
44
56
  mapFnName: 'getCouponResult', //自定义方法名字(必选)
45
57
  title: '轮询查询活动结果',
@@ -57,7 +57,6 @@
57
57
  :isRandom="isRandom"
58
58
  :list="couponList"
59
59
  :setting="couponOther"
60
- :btnImage="btnImage"
61
60
  @closeDialog="handleCardBindClose"
62
61
  @getCoupont="handleGetCoupon"
63
62
  @getAllCoupont="getAllCoupont"
@@ -118,10 +117,8 @@ export default {
118
117
  //预览是否显示弹窗
119
118
  is_preview_hide_dailog: false,
120
119
 
121
- isAll: true,
122
- isRandom: true,
123
- btnImage: ''
124
-
120
+ isAll: false,
121
+ isRandom: false
125
122
  };
126
123
  },
127
124
  computed: {
@@ -161,7 +158,7 @@ export default {
161
158
  //领取优惠券
162
159
  handleGetCoupon(item){
163
160
  this.$xdShowLoading({});
164
- jfbRootExec("getAllCoupon", {
161
+ jfbRootExec("getOnceCoupon", {
165
162
  vm: this,
166
163
  data: {
167
164
  prize_id: item.prize_id,
@@ -207,11 +204,13 @@ export default {
207
204
  time: 2000,
208
205
  isClose: false,
209
206
  });
210
- this.getDialogList();
211
- if (this.timer) {
212
- this.timeNum = 0;
213
- clearTimeout(this.timer);
214
- }
207
+ setTimeout(()=>{
208
+ this.getDialogList();
209
+ if (this.timer) {
210
+ this.timeNum = 0;
211
+ clearTimeout(this.timer);
212
+ }
213
+ },2000)
215
214
  return;
216
215
  }
217
216
  if (res.status_type === "error") {
@@ -222,13 +221,15 @@ export default {
222
221
  time: 2000,
223
222
  isClose: false,
224
223
  });
225
- if (res.code === 400) {
226
- this.getDialogList();
227
- }
228
- if (this.timer) {
229
- this.timeNum = 0;
230
- clearTimeout(this.timer);
231
- }
224
+ setTimeout(()=>{
225
+ if (res.code === 400) {
226
+ this.getDialogList();
227
+ }
228
+ if (this.timer) {
229
+ this.timeNum = 0;
230
+ clearTimeout(this.timer);
231
+ }
232
+ },2000)
232
233
  return;
233
234
  }
234
235
 
@@ -253,7 +254,7 @@ export default {
253
254
  jfbRootExec("getCouponDialogList", {
254
255
  vm: this,
255
256
  data: {
256
- namespace: 'mall'||this.pageBusinessCode,
257
+ namespace: this.pageBusinessCode,
257
258
  distribution_method: this.distribution_method,
258
259
  ...this.dispatchData
259
260
  },
@@ -268,6 +269,7 @@ export default {
268
269
  this.list[this.currentIndex].app_activity_button
269
270
  );
270
271
  this.activity_id = this.list[this.currentIndex].activity_id;
272
+ this.isAll =
271
273
  this.handlePop();
272
274
  })
273
275
  .catch((err) => {
@@ -286,13 +288,27 @@ export default {
286
288
  const { list, ...other } = res;
287
289
  this.couponList = list;
288
290
  this.couponOther = other;
289
- if(res.can_take === "Y" && res.has_times === "Y" && list.length > 0){
291
+ this.isAll = res.receive_method==="batch"
292
+ this.isRandom = res.distribution_type==="random"
293
+ this.activity_id = res.activity_id
294
+ if(res.receive_method !== "batch") {
295
+ if(res.can_take === "Y" && res.has_times === "Y" && list.length > 0){
296
+ if (this.isPreview) {
297
+ console.log(getContainerPropsValue(value, "content.is_show_dailog", 'Y'))
298
+ this.isShow = getContainerPropsValue(value, "content.is_show_dailog", 'Y') === 'N';
299
+ }else this.isShow = true;
300
+ }else{
301
+ this.handleCardBindClose();
302
+ }
303
+ } else {
304
+ if(res.can_take === "Y"){
290
305
  if (this.isPreview) {
291
306
  console.log(getContainerPropsValue(value, "content.is_show_dailog", 'Y'))
292
307
  this.isShow = getContainerPropsValue(value, "content.is_show_dailog", 'Y') === 'N';
293
- }else this.isShow = true;
294
- }else{
295
- this.handleCardBindClose();
308
+ }else this.isShow = true;
309
+ }else{
310
+ this.handleCardBindClose();
311
+ }
296
312
  }
297
313
  })
298
314
  },
@@ -305,20 +321,41 @@ export default {
305
321
  }
306
322
  },
307
323
 
308
- getAllCoupont() {
309
- if(this.isRandom){
310
- this.p_getRandomCouponList();
311
- }else{
312
- this.p_getAllDialogList();
313
- }
314
- },
315
-
316
- p_getRandomCouponList() {
317
-
324
+ getAllCoupont(info) {
325
+ this.p_getAllDialogList();
318
326
  },
319
327
 
320
328
  p_getAllDialogList() {
321
-
329
+ //getAllCoupon
330
+ this.$xdShowLoading({});
331
+ jfbRootExec("getAllCoupon", {
332
+ vm: this,
333
+ data: {
334
+ distribution_method: this.distribution_method,
335
+ activity_id: this.activity_id,
336
+ ...this.dispatchData
337
+ }
338
+ }).then(res => {
339
+ if (res.code === 400) {
340
+ this.$xdHideLoading();
341
+ this.$xdAlert({
342
+ content: res.message,
343
+ zIndex: 3200,
344
+ time: 2000,
345
+ isClose: false,
346
+ });
347
+ setTimeout(()=>{
348
+ this.getDialogList();
349
+ },2000)
350
+ return;
351
+ }
352
+ this.order_num = res.tmp_order_number;
353
+ setTimeout(()=>{
354
+ this.getResult();
355
+ },1000)
356
+ }).catch((err) => {
357
+ console.log(err, "err");
358
+ });
322
359
  },
323
360
 
324
361
  handlePop() {
@@ -342,7 +379,6 @@ export default {
342
379
  ){
343
380
  this.getDialogList();
344
381
  }
345
-
346
382
  //支付跟绑卡是主动触发
347
383
  if(this.distribution_method === 'card_binded'){
348
384
  jfbRootFnExec(this, 'onCustomEvent')("baseConDialog@hasCon", this.containerId);
@@ -3,50 +3,88 @@
3
3
  <view
4
4
  class="ticket_box"
5
5
  :style="{
6
- backgroundImage: dialogBackground
6
+ backgroundImage: dialogBackground,
7
7
  }"
8
8
  >
9
- <view v-if="!isRandom" class="ticket_list">
10
- <view
11
- class="ticket_item"
12
- :class="item.can_take_num"
13
- v-for="(item,i) in uiList"
14
- :key="i"
15
- >
16
- <view class="item_head">
17
- <image class="t_icon" mode="widthFix" :src="item.headIcon"></image>
18
- <view>{{ item.prize_type }}</view>
19
- </view>
20
- <view class="item_sub">{{ item.prize_name }}</view>
9
+ <view v-if="isAll">
10
+ <view v-if="!isRandom" class="ticket_list">
11
+ <view
12
+ class="ticket_item"
13
+ :class="item.can_take_num"
14
+ v-for="(item, i) in uiList"
15
+ :key="i"
16
+ >
17
+ <view class="item_head">
18
+ <image
19
+ class="t_icon"
20
+ mode="widthFix"
21
+ :src="item.headIcon"
22
+ ></image>
23
+ <view>{{ item.prize_type }}</view>
24
+ </view>
25
+ <view class="item_sub">{{ item.prize_name }}</view>
21
26
 
22
- <xd-font-icon class="ticket_icon" :color="item.iconColor" :icon="item.icon"></xd-font-icon>
23
- <view v-if="!isAll" class="btn">
24
- <xd-button
25
- size="small"
26
- type="primary"
27
- :disabled="item.remain_card_count == 0"
28
- :style="{
29
- backgroundImage: item.btnImage,
30
- backgroundSize: '100% 100%',
31
- }"
32
- @click="getCoupont(item)"
33
- >{{item.btn_txt}}</xd-button>
27
+ <xd-font-icon
28
+ class="ticket_icon"
29
+ :color="item.iconColor"
30
+ :icon="item.icon"
31
+ ></xd-font-icon>
34
32
  </view>
35
33
  </view>
34
+ <view style="text-align:center;padding-top:54rpx" v-else>
35
+ <img
36
+ style="width:360rpx;height:340rpx"
37
+ :src="bottomBackground"
38
+ alt=""
39
+ />
40
+ </view>
41
+ <xd-button
42
+ size="small"
43
+ type="primary"
44
+ :style="btnImage"
45
+ @click="getAllCoupont"
46
+ >{{ isRandom ? "开心获取" : "一键领取" }}</xd-button
47
+ >
36
48
  </view>
37
49
  <view v-else>
38
- 随机领取图片
50
+ <view class="ticket_list">
51
+ <view
52
+ class="ticket_item"
53
+ :class="item.can_take_num"
54
+ v-for="(item, i) in uiList"
55
+ :key="i"
56
+ >
57
+ <view class="item_head">
58
+ <image
59
+ class="t_icon"
60
+ mode="widthFix"
61
+ :src="item.headIcon"
62
+ ></image>
63
+ <view>{{ item.prize_type }}</view>
64
+ </view>
65
+ <view class="item_sub">{{ item.prize_name }}</view>
66
+
67
+ <xd-font-icon
68
+ class="ticket_icon"
69
+ :color="item.iconColor"
70
+ :icon="item.icon"
71
+ ></xd-font-icon>
72
+ <view class="btn">
73
+ <xd-button
74
+ size="small"
75
+ type="primary"
76
+ :disabled="item.remain_card_count == 0"
77
+ :style="{
78
+ backgroundImage: item.btnImage,
79
+ backgroundSize: '100% 100%',
80
+ }"
81
+ @click="getCoupont(item)"
82
+ >{{ item.btn_txt }}</xd-button
83
+ >
84
+ </view>
85
+ </view>
86
+ </view>
39
87
  </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>
50
88
  </view>
51
89
 
52
90
  <xd-font-icon
@@ -62,172 +100,197 @@
62
100
  import XdButton from "@/components/XdButton/XdButton";
63
101
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
64
102
  import getServiceUrl from "@/common/getServiceUrl";
65
- export default{
103
+ export default {
66
104
  name: "XdCouCardBind",
67
105
  components: {
68
106
  XdButton,
69
- XdFontIcon
107
+ XdFontIcon,
70
108
  },
71
109
  props: {
72
110
  list: {
73
111
  type: Array,
74
- default(){
75
- return []
76
- }
112
+ default() {
113
+ return [];
114
+ },
77
115
  },
78
116
  isAll: {
79
117
  type: Boolean,
80
- default: false
118
+ default: false,
81
119
  },
82
120
  isRandom: {
83
121
  type: Boolean,
84
- default: false
85
- },
86
- btnImage: {
87
- type: String,
88
- default: ""
122
+ default: false,
89
123
  },
90
- setting: {}
124
+ setting: {},
91
125
  },
92
126
  computed: {
93
- uiList(){
94
- return this.list.map(item => {
95
- let mapArr = {"Y": "去查看", "P": "领取", "N": "已发完"}
127
+ uiList() {
128
+ return this.list.map((item) => {
129
+ let mapArr = { Y: "去查看", P: "领取", N: "已发完" };
96
130
  item.btn_txt = mapArr[item.can_take_num];
97
- if(item.can_take_num === "Y" || item.can_take_num === "P"){
131
+ if (item.can_take_num === "Y" || item.can_take_num === "P") {
98
132
  item.headIcon = getServiceUrl(this.setting.app_coupon_url);
99
- item.btnImage = `url(${getServiceUrl(this.setting.app_coupon_button_bg_url)})`;
100
- item.icon = item.can_take_num === "Y" ? "iconyilingqu" : "icondailingqu";
101
- item.iconColor = item.can_take_num === "Y"?'#D6D6D6':"#FF4D4A"
102
- }else if(item.can_take_num === "N"){
133
+ item.btnImage = `url(${getServiceUrl(
134
+ this.setting.app_coupon_button_bg_url
135
+ )})`;
136
+ item.icon =
137
+ item.can_take_num === "Y" ? "iconyilingqu" : "icondailingqu";
138
+ item.iconColor = item.can_take_num === "Y" ? "#D6D6D6" : "#FF4D4A";
139
+ } else if (item.can_take_num === "N") {
103
140
  item.headIcon = getServiceUrl(this.setting.app_coupon_invalid_url);
104
141
  item.btnImage = "";
105
142
  item.icon = "iconyifawan";
106
- item.iconColor = '#D6D6D6'
143
+ item.iconColor = "#D6D6D6";
107
144
  }
108
145
  return item;
109
- })
146
+ });
110
147
  },
111
- dialogBackground(){
148
+ dialogBackground() {
112
149
  return `url(${getServiceUrl(this.setting.background)})`;
150
+ },
151
+ bottomBackground() {
152
+ return getServiceUrl(this.setting.app_coupon_bottom_url);
153
+ },
154
+ btnImage() {
155
+ let btn_style = this.setting.app_coupon_button_bg_url
156
+ ? {
157
+ // 设置背景图片
158
+ backgroundImage: `url(${getServiceUrl(
159
+ this.setting.can_take !== "Y"
160
+ ? this.setting.app_coupon_button_see_url
161
+ : this.setting.app_coupon_button_bg_url
162
+ )})`,
163
+ // 设置背景大小
164
+ backgroundSize: "100% 100%",
165
+ // 设置背景重复
166
+ backgroundRepeat: "no-repeat",
167
+ // 设置背景颜色
168
+ backgroundColor: "",
169
+ height: '70rpx',
170
+ width: '450rpx',
171
+ marginTop: '26rpx'
172
+ }
173
+ : {
174
+ // 设置背景颜色
175
+ backgroundColor: "#FB5B3F",
176
+ height: '70rpx',
177
+ width: '450rpx',
178
+ marginTop: '26rpx'
179
+ };
180
+ return btn_style
113
181
  }
114
182
  },
115
- data(){
116
- return {
117
-
118
- }
183
+ data() {
184
+ return {};
119
185
  },
120
186
  methods: {
121
187
  //领取优惠券
122
- getCoupont(item){
123
- if(item.can_take_num === "P"){
188
+ getCoupont(item) {
189
+ if (item.can_take_num === "P") {
124
190
  this.$emit("getCoupont", item);
125
191
  }
126
192
  },
127
193
  getAllCoupont() {
128
- this.$emit("getAllCoupont", item);
194
+ this.$emit("getAllCoupont");
129
195
  },
130
- handleClose(){
196
+ handleClose() {
131
197
  this.$emit("closeDialog");
132
- }
133
- }
134
- }
198
+ },
199
+ },
200
+ };
135
201
  </script>
136
202
 
137
203
  <style lang="less" scoped>
138
204
  @ticketHeight: 180rpx;
139
205
  @bgHeight: @ticketHeight - 40rpx;
140
- .xd-cou-card-bind{
141
- width: 600rpx;
142
- max-height: 900rpx;
143
- padding-bottom: 80rpx;
144
- .ticket_box{
145
- background-color: #fff;
146
- background-size: 100% auto;
147
- background-repeat: no-repeat;
148
- padding-top: 200rpx;
149
- border-radius: 20rpx;
150
- box-sizing: border-box;
151
- padding-bottom: 20rpx;
152
- }
153
-
154
- .ticket_item{
155
- display: flex;
156
- flex-direction: column;
157
- position: relative;
158
- width: 540rpx;
159
- height: @ticketHeight;
160
- margin: 20rpx auto;
161
- border-radius: 20rpx;
162
- padding: 30rpx;
163
- box-sizing: border-box;
164
- background: #FFF8F8;
165
-
166
- &.P,
167
- &.Y{
206
+ .xd-cou-card-bind {
207
+ width: 600rpx;
208
+ max-height: 900rpx;
209
+ padding-bottom: 80rpx;
210
+ .ticket_box {
211
+ background-color: #fff;
212
+ background-size: 100% auto;
213
+ background-repeat: no-repeat;
214
+ padding-top: 200rpx;
215
+ border-radius: 20rpx;
216
+ box-sizing: border-box;
217
+ padding-bottom: 60rpx;
218
+ }
168
219
 
169
- }
170
- &.N{
171
- background: #F3F3F3;
172
- .item_head{
173
- color: #BBBBBB;
174
- }
175
- .item_sub{
176
- color: #BBBBBB;
177
- }
178
- .ticket_icon{
179
- color: #D6D6D6;
220
+ .ticket_item {
221
+ display: flex;
222
+ flex-direction: column;
223
+ position: relative;
224
+ width: 540rpx;
225
+ height: @ticketHeight;
226
+ margin: 20rpx auto;
227
+ border-radius: 20rpx;
228
+ padding: 30rpx;
229
+ box-sizing: border-box;
230
+ background: #fff8f8;
180
231
 
181
- }
182
- .btn{
183
- .xd-button{
184
- background-color: #DDDDDD !important;
185
- color: #999999 !important;
186
- }
187
- }
188
- }
189
- .item_head{
190
- display: flex;
191
- align-items: center;
192
- font-size: 40rpx;
193
- color: #000000;
194
- font-weight: 500;
195
- .t_icon{
196
- width: 44rpx;
197
- margin-right: 20rpx;
198
- }
232
+ &.P,
233
+ &.Y {
234
+ }
235
+ &.N {
236
+ background: #f3f3f3;
237
+ .item_head {
238
+ color: #bbbbbb;
199
239
  }
200
- .item_sub{
201
- margin-top: 20rpx;
202
- color: #FF4D4A;
203
- font-size: 36rpx;
204
- font-weight: 400;
240
+ .item_sub {
241
+ color: #bbbbbb;
205
242
  }
206
- .ticket_icon{
207
- font-size: 80rpx !important;
208
- position: absolute;
209
- top: 0;
210
- right: 0;
243
+ .ticket_icon {
244
+ color: #d6d6d6;
211
245
  }
212
- .btn{
213
- position: absolute;
214
- right: 20rpx;
215
- bottom: 20rpx;
216
- .xd-button{
217
- height: 30rpx;
218
- width: 100rpx;
219
- font-size: 28rpx;
220
- background-size: cover !important;
221
- background-color: #fb5b3f;
246
+ .btn {
247
+ .xd-button {
248
+ background-color: #dddddd !important;
249
+ color: #999999 !important;
222
250
  }
223
251
  }
224
-
225
252
  }
226
- .dialog_close{
253
+ .item_head {
254
+ display: flex;
255
+ align-items: center;
256
+ font-size: 40rpx;
257
+ color: #000000;
258
+ font-weight: 500;
259
+ .t_icon {
260
+ width: 44rpx;
261
+ margin-right: 20rpx;
262
+ }
263
+ }
264
+ .item_sub {
265
+ margin-top: 20rpx;
266
+ color: #ff4d4a;
267
+ font-size: 36rpx;
268
+ font-weight: 400;
269
+ }
270
+ .ticket_icon {
271
+ font-size: 80rpx !important;
227
272
  position: absolute;
228
- bottom: 0rpx;
229
- left: 50%;
230
- transform: translateX(-50%);
273
+ top: 0;
274
+ right: 0;
275
+ }
276
+ .btn {
277
+ position: absolute;
278
+ right: 20rpx;
279
+ bottom: 20rpx;
280
+ .xd-button {
281
+ height: 30rpx;
282
+ width: 100rpx;
283
+ font-size: 28rpx;
284
+ background-size: cover !important;
285
+ background-color: #fb5b3f;
286
+ }
231
287
  }
232
288
  }
289
+ .dialog_close {
290
+ position: absolute;
291
+ bottom: 0rpx;
292
+ left: 50%;
293
+ transform: translateX(-50%);
294
+ }
295
+ }
233
296
  </style>
@@ -47,7 +47,7 @@ module.exports = [
47
47
  {
48
48
  mapFnName: 'getAllCoupon', //自定义方法名字(必选)
49
49
  title: '领取优惠券',
50
- path: '/sms-coupon/v1/activity-prizes-user/set',
50
+ path: '/sms-coupon/v1/activity-prizes-user/set-all',
51
51
  isRule: false,
52
52
  params: {
53
53
  distribution_method: ['发放方式 entry=主动发放, homed=首页发放,paid=消费后发放,card_binded=绑定卡后发放', 'String', '选填'],
@@ -56,6 +56,17 @@ export default {
56
56
  placeholder: '请选择按钮文字颜色',
57
57
  classNmae: 'input60',
58
58
  },
59
+ {
60
+ label: "按钮文字大小",
61
+ ele: "el-input",
62
+ type: "number",
63
+ valueKey: "btnTextSize",
64
+ groupKey: 'content',
65
+ value: data.btnTextSize || '',
66
+ placeholder: "请输入按钮文字大小",
67
+ className: "input80",
68
+ inline: false,
69
+ },
59
70
  {
60
71
  label: '按钮圆角设置:',
61
72
  ele: 'xd-site-select-list',
@@ -26,7 +26,7 @@
26
26
  minHeight: `${layoutInfo.bodyMinHeightRpx}rpx`,
27
27
  }"
28
28
  >
29
- <view v-if="!message && can_take !== 'N'">
29
+ <view v-if="is_blank_page==='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">
@@ -45,11 +45,80 @@
45
45
  <xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon>
46
46
  </view>
47
47
  </view>
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">
48
+
49
+ <view v-if="isAll">
50
+ <view v-if="isRandom">
51
+ <view class="jfb-base-con-list__body-content-list">
52
+ <view style="text-align:center;padding-top:140rpx;padding-bottom:54rpx">
53
+ <img
54
+ style="width:360rpx;height:340rpx"
55
+ :src="app_coupon_bottom_url"
56
+ alt=""
57
+ />
58
+ </view>
59
+ <xd-button
60
+ size="small"
61
+ type="primary"
62
+ :style="btn_style"
63
+ @click="can_take!=='Y'?toCoupon():getAllCoupont()"
64
+ >{{ btn_txt }}</xd-button
65
+ >
66
+ </view>
67
+ </view>
68
+ <view v-else>
69
+ <view
70
+ class="jfb-base-con-list__body-content-list"
71
+ >
72
+ <view>
73
+ <view v-for="(item, index) in couponList" :key="index">
74
+ <view
75
+ class="jfb-base-con-list__body-content-list-item"
76
+ :class="'status_' + item.can_take_num"
77
+ :style="{
78
+ backgroundColor:
79
+ item.can_take_num === 'Y' || item.can_take_num === 'P'
80
+ ? contentBackground
81
+ : '#F3F3F3',
82
+ }"
83
+ >
84
+ <view class="item_head">
85
+ <image
86
+ class="t_icon"
87
+ mode="widthFix"
88
+ :src="item.headIcon"
89
+ ></image>
90
+ <view>{{ item.prize_type }}</view>
91
+ </view>
92
+ <view class="item_sub">{{ item.prize_name }}</view>
93
+ <xd-font-icon
94
+ size="100"
95
+ :style="{
96
+ color: item.iconColor,
97
+ position: 'absolute',
98
+ right: '0rpx',
99
+ top: '0rpx',
100
+ }"
101
+ :icon="item.icon"
102
+ ></xd-font-icon>
103
+ </view>
104
+ </view>
105
+ </view>
106
+ <xd-button
107
+ size="small"
108
+ type="primary"
109
+ :style="btn_style"
110
+ @click="can_take!=='Y'?toCoupon():getAllCoupont()"
111
+ >{{ btn_txt }}</xd-button
112
+ >
113
+ </view>
114
+ </view>
115
+ </view>
116
+
117
+ <view v-else>
118
+ <view
119
+ v-if="can_take === 'Y' && has_times === 'Y'"
120
+ class="jfb-base-con-list__body-content-list"
121
+ >
53
122
  <view v-for="(item, index) in couponList" :key="index">
54
123
  <view
55
124
  class="jfb-base-con-list__body-content-list-item"
@@ -80,7 +149,7 @@
80
149
  }"
81
150
  :icon="item.icon"
82
151
  ></xd-font-icon>
83
- <view v-if="!isAll" class="btn_wrap">
152
+ <view class="btn_wrap">
84
153
  <xd-button
85
154
  size="small"
86
155
  :disabled="
@@ -98,29 +167,13 @@
98
167
  </view>
99
168
  </view>
100
169
  </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
170
+ <view
171
+ v-else
172
+ class="jfb-base-con-list__body-content-list"
173
+ style="padding-bottom: 60rpx"
116
174
  >
117
- </view>
118
- <view
119
- v-else
120
- class="jfb-base-con-list__body-content-list"
121
- style="padding-bottom: 60rpx"
122
- >
123
- <image mode="widthFix" :src="used_up_url"></image>
175
+ <image mode="widthFix" :src="used_up_url"></image>
176
+ </view>
124
177
  </view>
125
178
  </view>
126
179
  <view class="jfb-base-con-list__body-content-foot" @click="toCoupon">
@@ -132,11 +185,13 @@
132
185
  color: btnTextColor,
133
186
  backgroundColor: btnBgColor,
134
187
  boxShadow: shadow,
188
+ fontSize: btnTextSize+'rpx'
135
189
  }"
136
190
  >查看已领票券</view
137
191
  >
138
192
  </view>
139
193
  </view>
194
+
140
195
  <view v-else class="empty_data">
141
196
  <image :src="emptyBg"></image>
142
197
  {{ message }}
@@ -225,6 +280,8 @@ export default {
225
280
  isRandom: false,
226
281
  btn_txt: "",
227
282
  btn_style: {},
283
+ btnTextSize: '',
284
+ is_blank_page: 'Y'
228
285
  };
229
286
  },
230
287
  computed: {
@@ -284,6 +341,11 @@ export default {
284
341
  "content.btnTextColor",
285
342
  "#666"
286
343
  );
344
+ this.btnTextSize = getContainerPropsValue(
345
+ value,
346
+ "content.btnTextSize",
347
+ "28"
348
+ );
287
349
  this.radius = getContainerPropsValue(value, "content.radius", "0");
288
350
 
289
351
  this.is_border = getContainerPropsValue(value, "content.is_border", "N");
@@ -317,7 +379,7 @@ export default {
317
379
  data: {
318
380
  ...this.options,
319
381
  distribution_method: this.method,
320
- namespace: "mall" || this.pageBusinessCode,
382
+ namespace: this.pageBusinessCode,
321
383
  activity_id: this.activity_id,
322
384
  },
323
385
  })
@@ -355,14 +417,16 @@ export default {
355
417
  backgroundRepeat: "no-repeat",
356
418
  // 设置背景颜色
357
419
  backgroundColor: "",
358
- // 设置外边距
359
- margin: "0",
420
+ height: '70rpx',
421
+ width: '450rpx',
422
+ marginTop: '26rpx'
360
423
  }
361
424
  : {
362
425
  // 设置背景颜色
363
426
  backgroundColor: "#FB5B3F",
364
- // 设置外边距
365
- margin: "0",
427
+ height: '70rpx',
428
+ width: '450rpx',
429
+ marginTop: '26rpx'
366
430
  };
367
431
  // 设置按钮文字
368
432
  btn_txt = res.can_take === "Y" ? "一键领取" : "去查看";
@@ -442,6 +506,7 @@ export default {
442
506
  this.message = res.message;
443
507
  this.notice = res.about;
444
508
  this.done = true;
509
+ this.is_blank_page = res.is_blank_page;
445
510
  })
446
511
  .catch((err) => {
447
512
  console.log(err, "err");
@@ -465,7 +530,7 @@ export default {
465
530
  data: {
466
531
  ...this.options,
467
532
  distribution_method: this.method,
468
- namespace: "mall" || this.pageBusinessCode,
533
+ namespace: this.pageBusinessCode,
469
534
  activity_id: this.activity_id,
470
535
  prize_id: item.prize_id,
471
536
  },
@@ -499,7 +564,7 @@ export default {
499
564
  data: {
500
565
  ...this.options,
501
566
  distribution_method: this.method,
502
- namespace: "mall" || this.pageBusinessCode,
567
+ namespace: this.pageBusinessCode,
503
568
  activity_id: this.activity_id,
504
569
  },
505
570
  })
@@ -543,11 +608,14 @@ export default {
543
608
  time: 2000,
544
609
  isClose: false,
545
610
  });
546
- this.getList();
547
- if (this.timeer) {
548
- this.time = 0;
549
- clearTimeout(this.timeer);
550
- }
611
+ setTimeout(()=>{
612
+ this.getList();
613
+ this.btn_txt = "去查看";
614
+ if (this.timeer) {
615
+ this.time = 0;
616
+ clearTimeout(this.timeer);
617
+ }
618
+ },2000)
551
619
  return;
552
620
  }
553
621
  if (res.status_type === "error") {
@@ -558,13 +626,15 @@ export default {
558
626
  time: 2000,
559
627
  isClose: false,
560
628
  });
561
- if (res.code == 400) {
629
+ setTimeout(()=>{
630
+ if (res.code == 400) {
562
631
  this.getList();
563
- }
564
- if (this.timeer) {
565
- this.time = 0;
566
- clearTimeout(this.timeer);
567
- }
632
+ }
633
+ if (this.timeer) {
634
+ this.time = 0;
635
+ clearTimeout(this.timeer);
636
+ }
637
+ },2000)
568
638
  return;
569
639
  }
570
640
 
@@ -576,6 +646,7 @@ export default {
576
646
  `pay_${res.status_type}`
577
647
  );
578
648
  }
649
+ this.btn_txt = `领取中 ${res.success_num}/${res.total_num}`;
579
650
  this.time++;
580
651
  }, Math.pow(this.date, this.time > this.maxTime ? this.maxTime : this.time) * 1000);
581
652
  })