jufubao-base 1.0.197 → 1.0.198-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.197",
3
+ "version": "1.0.198-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -186,7 +186,7 @@ export default {
186
186
  });
187
187
  },
188
188
 
189
- getResult() {
189
+ getResult(is_auto='N') {
190
190
  jfbRootExec("getCouponResult", {
191
191
  vm: this,
192
192
  data: {
@@ -196,6 +196,16 @@ export default {
196
196
  })
197
197
  .then((res) => {
198
198
  if (res.status_type === "success") {
199
+ if(is_auto==='Y') {
200
+ this.order_num = null;
201
+ this.handleCardBindClose();
202
+ this.$xdHideLoading();
203
+ if (this.timer) {
204
+ this.timeNum = 0;
205
+ clearTimeout(this.timer);
206
+ }
207
+ return
208
+ }
199
209
  this.order_num = null;
200
210
  this.$xdHideLoading();
201
211
  this.$xdAlert({
@@ -214,6 +224,15 @@ export default {
214
224
  return;
215
225
  }
216
226
  if (res.status_type === "error") {
227
+ if(is_auto==='Y') {
228
+ this.handleCardBindClose();
229
+ this.$xdHideLoading();
230
+ if (this.timer) {
231
+ this.timeNum = 0;
232
+ clearTimeout(this.timer);
233
+ }
234
+ return
235
+ }
217
236
  this.$xdHideLoading();
218
237
  this.$xdAlert({
219
238
  content: res.message,
@@ -269,7 +288,6 @@ export default {
269
288
  this.list[this.currentIndex].app_activity_button
270
289
  );
271
290
  this.activity_id = this.list[this.currentIndex].activity_id;
272
- this.isAll =
273
291
  this.handlePop();
274
292
  })
275
293
  .catch((err) => {
@@ -301,13 +319,17 @@ export default {
301
319
  this.handleCardBindClose();
302
320
  }
303
321
  } else {
304
- if(res.can_take === "Y"){
305
- if (this.isPreview) {
306
- console.log(getContainerPropsValue(value, "content.is_show_dailog", 'Y'))
307
- this.isShow = getContainerPropsValue(value, "content.is_show_dailog", 'Y') === 'N';
308
- }else this.isShow = true;
309
- }else{
310
- this.handleCardBindClose();
322
+ if(res.receive_type==='auto') {
323
+ this.getAllCoupont('Y')
324
+ } else {
325
+ if(res.can_take === "Y"){
326
+ if (this.isPreview) {
327
+ console.log(getContainerPropsValue(value, "content.is_show_dailog", 'Y'))
328
+ this.isShow = getContainerPropsValue(value, "content.is_show_dailog", 'Y') === 'N';
329
+ }else this.isShow = true;
330
+ }else{
331
+ this.handleCardBindClose();
332
+ }
311
333
  }
312
334
  }
313
335
  })
@@ -321,11 +343,11 @@ export default {
321
343
  }
322
344
  },
323
345
 
324
- getAllCoupont(info) {
325
- this.p_getAllDialogList();
346
+ getAllCoupont(is_auto='N') {
347
+ this.p_getAllDialogList(is_auto);
326
348
  },
327
349
 
328
- p_getAllDialogList() {
350
+ p_getAllDialogList(is_auto='N') {
329
351
  //getAllCoupon
330
352
  this.$xdShowLoading({});
331
353
  jfbRootExec("getAllCoupon", {
@@ -333,10 +355,16 @@ export default {
333
355
  data: {
334
356
  distribution_method: this.distribution_method,
335
357
  activity_id: this.activity_id,
358
+ is_auto: is_auto,
336
359
  ...this.dispatchData
337
360
  }
338
361
  }).then(res => {
339
362
  if (res.code === 400) {
363
+ if(is_auto==='Y') {
364
+ this.$xdHideLoading();
365
+ this.handleCardBindClose()
366
+ return
367
+ }
340
368
  this.$xdHideLoading();
341
369
  this.$xdAlert({
342
370
  content: res.message,
@@ -351,7 +379,7 @@ export default {
351
379
  }
352
380
  this.order_num = res.tmp_order_number;
353
381
  setTimeout(()=>{
354
- this.getResult();
382
+ this.getResult(is_auto);
355
383
  },1000)
356
384
  }).catch((err) => {
357
385
  console.log(err, "err");