jufubao-third 1.0.0-beta4 → 1.0.0-beta5

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-third",
3
- "version": "1.0.0-beta4",
3
+ "version": "1.0.0-beta5",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件第三方购物平台包",
6
6
  "main": "index.js",
@@ -4,6 +4,19 @@ export default {
4
4
  style: [],
5
5
  advanced: [],
6
6
  content: [
7
+ {
8
+ label: "选择业务线",
9
+ ele: "xd-choose-namespace",
10
+ valueKey: "xnamespace",
11
+ value: "",
12
+ handleCustom: (cb) => {
13
+ XdBus.getParentApi('getOptionsNamespaces')()
14
+ .then(res => {
15
+ cb(res.list)
16
+ })
17
+ .catch();
18
+ }
19
+ },
7
20
  {
8
21
  label: '支付成功路径:', //label
9
22
  ele: 'xd-select-pages-path', //package 名称
@@ -294,8 +294,6 @@
294
294
  valid_code: "", //验证码正文
295
295
  valid_token: "", //验证码token
296
296
  },
297
- orderSuccessPath: "",
298
- thirdPayPath: "",
299
297
  renderChecked: "renderChecked",
300
298
 
301
299
  total_price: "",
@@ -307,6 +305,11 @@
307
305
 
308
306
  cardList: [], //卡绑定列表
309
307
  selectedCardList: [], //卡绑定使用的
308
+
309
+ //面板
310
+ orderSuccessPath: "",
311
+ thirdPayPath: "",
312
+ xnamespace: "",
310
313
  }
311
314
  },
312
315
  watch: {
@@ -346,7 +349,6 @@
346
349
  },
347
350
  created() {
348
351
  this.init(this.container);
349
- this.xnamespace =this.projectAttr.business_code;
350
352
  let valid_token = this.$xdUniHelper.randomChar(20);
351
353
  this.$set(this.cardForm, "valid_token", valid_token);
352
354
 
@@ -358,6 +360,9 @@
358
360
  },
359
361
  methods: {
360
362
  onJfbLoad(options) {
363
+ //设置业务请求代码
364
+ this.setNameSpace(options);
365
+
361
366
  let { main_order_id} = options;
362
367
  this.main_order_id = main_order_id;
363
368
  this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
@@ -371,6 +376,7 @@
371
376
  init(container) {
372
377
  this.orderSuccessPath = getContainerPropsValue(container, 'content.orderSuccessPath', {value: ""}).value;
373
378
  this.thirdPayPath = getContainerPropsValue(container, 'content.thirdPayPath', {value: ""}).value;
379
+ this.xnamespace = getContainerPropsValue(container, 'content.xnamespace', this.projectAttr.business_code);
374
380
  },
375
381
  getTimeFormat(time){
376
382
  let date = null;
@@ -385,7 +391,8 @@
385
391
  jfbRootExec("getThirdOrderInfo", {
386
392
  vm: this,
387
393
  data: {
388
- main_order_id: this.main_order_id
394
+ main_order_id: this.main_order_id,
395
+ namespace: this.xnamespace,
389
396
  }
390
397
  }).then(res => {
391
398
 
@@ -427,7 +434,8 @@
427
434
  jfbRootExec("getListUserPayChannel", {
428
435
  vm: this,
429
436
  data: {
430
- providers: this.projectAttr.pay_channels
437
+ providers: this.projectAttr.pay_channels,
438
+ namespace: this.xnamespace,
431
439
  }
432
440
  }).then(res => {
433
441
  console.log("p_getListUserPayChannel", res);
@@ -461,7 +469,8 @@
461
469
  this.createSettleOrder({
462
470
  pay_card_list: submitCardList,
463
471
  other_channel_pay_price: needPayPrice,
464
- need_pay_price: needPayPrice
472
+ need_pay_price: needPayPrice,
473
+ namespace: this.xnamespace,
465
474
  }, res => {
466
475
  this.$xdLog.setARMSInfo({
467
476
  main_order_id,
@@ -546,6 +555,7 @@
546
555
  ...cardForm,
547
556
  selected_card_list: submitCardList,
548
557
  total_price,
558
+ namespace: this.xnamespace,
549
559
  ...options
550
560
  }
551
561
  })
@@ -655,6 +665,7 @@
655
665
  total_price,
656
666
  card_number: ticket.card_number,
657
667
  selected_card_list: submitCardList,
668
+ namespace: this.xnamespace,
658
669
  ...options
659
670
  }
660
671
  }).then(res => {
@@ -63,6 +63,7 @@ export default {
63
63
  jfbRootExec("getPayMethod", {
64
64
  vm: this,
65
65
  data: {
66
+ namespace: this.xnamespace,
66
67
  support_methods: JSON.stringify(support_methods)
67
68
  }
68
69
  }).then(res => {
@@ -80,6 +81,7 @@ export default {
80
81
  jfbRootExec("getThirdListCards", {
81
82
  vm: this,
82
83
  data: {
84
+ namespace: this.xnamespace,
83
85
  }
84
86
  }).then(res => {
85
87
  const {list} = res;
@@ -115,6 +117,7 @@ export default {
115
117
  jfbRootExec("setThirdSelectCard", {
116
118
  vm: this,
117
119
  data: {
120
+ namespace: this.xnamespace,
118
121
  ...options,
119
122
  }
120
123
  }).then(res => {
@@ -131,7 +134,7 @@ export default {
131
134
  vm: this,
132
135
  data: {
133
136
  support_method: "wallet",
134
- business_code: this.xnamespace
137
+ namespace: this.xnamespace
135
138
  }
136
139
  }).then(res => {
137
140
  cb(res);
@@ -180,7 +183,8 @@ export default {
180
183
  this.createSettleOrder({
181
184
  selected_card_list_json: JSON.stringify(selected_card_list),
182
185
  selected_wallet_list_json: JSON.stringify(selected_wallet_list),
183
- need_pay_price: this.orderNeedPayPrice
186
+ need_pay_price: this.orderNeedPayPrice,
187
+ namespace: this.xnamespace,
184
188
  }, (res) => {
185
189
  console.warn("创建订单成功");
186
190
  console.warn(res);
@@ -199,6 +203,7 @@ export default {
199
203
  ...options,
200
204
  main_order_id: this.main_order_id,
201
205
  notify_provider_id: this.projectAttr['notify_provider_id'],
206
+ namespace: this.xnamespace,
202
207
  };
203
208
  this.$xdShowLoading({});
204
209
  jfbRootExec("setThirdCreateOrder",{