jufubao-base 1.0.106-beta1 → 1.0.106-beta4

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.106-beta1",
3
+ "version": "1.0.106-beta4",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -105,7 +105,7 @@ export default {
105
105
  activity_id: "",
106
106
  backgroundColor: "",
107
107
  distribution_method: "homed", //触发事件
108
- dispatchData: "", //触发事件参数
108
+ dispatchData: {}, //触发事件参数
109
109
 
110
110
  couponList: [],
111
111
  couponOther: {},
@@ -177,6 +177,7 @@ export default {
177
177
  vm: this,
178
178
  data: {
179
179
  tmp_order_number: this.order_num,
180
+ ...this.dispatchData
180
181
  },
181
182
  })
182
183
  .then((res) => {
@@ -314,8 +315,9 @@ export default {
314
315
  this.onJfbLoad(options);
315
316
  },
316
317
  handleToList() {
318
+ let otherParams = this.$xdUniHelper.jsonToParams(this.dispatchData);
317
319
  this.$xdUniHelper.navigateTo({
318
- url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method=${this.distribution_method}`,
320
+ url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method=${this.distribution_method}&${otherParams}`,
319
321
  });
320
322
  },
321
323
  handleClose() {
@@ -193,6 +193,7 @@ export default {
193
193
  order_num: null,
194
194
  done: false,
195
195
  message: "",
196
+ options: {},
196
197
 
197
198
  collectedPath: "",
198
199
  };
@@ -226,6 +227,7 @@ export default {
226
227
  jfbRootExec("getCouponList", {
227
228
  vm: this,
228
229
  data: {
230
+ ...this.options,
229
231
  distribution_method: this.method,
230
232
  namespace: this.pageBusinessCode,
231
233
  activity_id: this.activity_id,
@@ -316,6 +318,7 @@ export default {
316
318
  jfbRootExec("getAllCoupon", {
317
319
  vm: this,
318
320
  data: {
321
+ ...this.options,
319
322
  distribution_method: this.method,
320
323
  namespace: this.pageBusinessCode,
321
324
  activity_id: this.activity_id,
@@ -347,6 +350,7 @@ export default {
347
350
  jfbRootExec("getCouponResult", {
348
351
  vm: this,
349
352
  data: {
353
+ ...this.options,
350
354
  tmp_order_number: this.order_num,
351
355
  },
352
356
  })
@@ -422,6 +426,7 @@ export default {
422
426
  // },
423
427
  onJfbLoad(options) {
424
428
  console.log(this.pageBusinessCode, "pageNamespace");
429
+ this.options = options;
425
430
  this.activity_id = options.activity_id;
426
431
  this.method = options.distribution_method
427
432
  ? options.distribution_method
@@ -23,9 +23,10 @@ module.exports = [
23
23
  disabled: true,
24
24
  },
25
25
  {
26
- mapFnName: 'getBaseOrderDetail', //自定义方法名字(必选)
26
+ mapFnName: 'getBaseOrderStatus', //自定义方法名字(必选)
27
27
  title: '获取订单详情',
28
- path: '/order/v1/order/detail',
28
+ // path: '/order/v1/order/detail',
29
+ path: "/order/v1/order/pay-status",
29
30
  isRule: false,
30
31
  params: {
31
32
  main_order_id: ['id', 'Number', '必选'],
@@ -297,23 +297,29 @@ export default {
297
297
  return time;
298
298
  },
299
299
  p_getBaseOrderDetail(){
300
- jfbRootExec("getBaseOrderDetail", {
301
- vm: this,
302
- data: {
303
- main_order_id: this.main_order_id,
304
- }
305
- }).then(res => {
306
- let { is_can_pay, can_pay_message } = res.can_pay_info
307
- this.is_can_pay = is_can_pay;
308
- this.can_pay_message = can_pay_message;
309
- if(is_can_pay !== "Y"){
310
- uni.showToast({
311
- title: can_pay_message,
312
- icon: 'none',
313
- duration: 3000
314
- });
315
- // this.$xdNavigateBack()
316
- }
300
+ return new Promise((resolve, reject) => {
301
+ jfbRootExec("getBaseOrderStatus", {
302
+ vm: this,
303
+ data: {
304
+ main_order_id: this.main_order_id,
305
+ }
306
+ }).then(res => {
307
+ let { is_can_pay, can_pay_message } = res.can_pay_info
308
+ this.is_can_pay = is_can_pay;
309
+ this.can_pay_message = can_pay_message;
310
+ if(is_can_pay !== "Y"){
311
+ uni.showToast({
312
+ title: can_pay_message,
313
+ icon: 'none',
314
+ duration: 3000
315
+ });
316
+ reject();
317
+ // this.$xdNavigateBack()
318
+ }
319
+ resolve();
320
+ }).catch(err => {
321
+ reject();
322
+ })
317
323
  })
318
324
  },
319
325
  p_getPayOrderDetail() {
@@ -358,8 +364,12 @@ export default {
358
364
  });
359
365
  },
360
366
  //第三方支付
361
- doThirdPay() {
367
+ async doThirdPay() {
362
368
  if (this.$configProject.isPreview) return;
369
+
370
+ if(this.type !== 'recharge') {
371
+ await this.p_getBaseOrderDetail();
372
+ }
363
373
  const {channel_provider_id, order_id, payInfo} = this;
364
374
  let {login_providers = []} = this.projectAttr;
365
375
  console.log(this.projectAttr)
@@ -380,6 +380,7 @@ export default {
380
380
  list: [
381
381
  {"label": "一行", "value": 1},
382
382
  {"label": "两行", "value": 2},
383
+ {"label": "三行", "value": 3},
383
384
  ]
384
385
  },
385
386
  params['isCarousel']===2 && params['rows'] === 1 && {
@@ -112,7 +112,7 @@
112
112
  getHeight() {
113
113
  let height = this.height * this.config.rows;
114
114
  let padding = 0;
115
- if (this.config.rows === 2) padding = Number(this.config.padding) * this.$rpxNum;
115
+ if (this.config.rows >= 2) padding = Number(this.config.padding) * this.$rpxNum * (this.config.rows -1);
116
116
  return height + padding;
117
117
  },
118
118
  },