jufubao-base 1.0.106-beta2 → 1.0.106-beta6

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-beta2",
3
+ "version": "1.0.106-beta6",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -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,15 @@ export default {
314
315
  this.onJfbLoad(options);
315
316
  },
316
317
  handleToList() {
318
+ let otherParams = "";
319
+ try {
320
+ if(this.dispatchData && this.$xdUniHelper.checkVarType(this.dispatchData) === 'object') {
321
+ otherParams = this.$xdUniHelper.jsonToParams(this.dispatchData);
322
+ }
323
+ } catch (error) {}
324
+
317
325
  this.$xdUniHelper.navigateTo({
318
- url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method=${this.distribution_method}`,
326
+ url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method=${this.distribution_method}&${otherParams}`,
319
327
  });
320
328
  },
321
329
  handleClose() {
@@ -102,7 +102,7 @@ export default{
102
102
  @bgHeight: @ticketHeight - 40rpx;
103
103
  .xd-cou-card-bind{
104
104
  width: 600rpx;
105
- max-height: 800rpx;
105
+ max-height: 900rpx;
106
106
  padding-bottom: 80rpx;
107
107
  .ticket_box{
108
108
  background-color: #fff;
@@ -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)