jufubao-third 1.0.5 → 1.0.6-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-third",
3
- "version": "1.0.5",
3
+ "version": "1.0.6-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件第三方购物平台包",
6
6
  "main": "index.js",
@@ -467,7 +467,13 @@
467
467
  const { main_order_id, submitCardList, needPayPrice } = this;
468
468
 
469
469
  if(!submitCardList.length){
470
- await this.handleConfirmAllWxPay();
470
+ //支持补差, 提示是否使用补差
471
+ if(this.payThird){
472
+ await this.handleConfirmAllWxPay();
473
+ }else{
474
+ //不支持补差,仅提示
475
+ return this.$xdAlert({content: "请选择兑换方式"})
476
+ }
471
477
  }
472
478
 
473
479
  this.createSettleOrder({
@@ -21,6 +21,10 @@ export default {
21
21
  payCard(){
22
22
  return this.otherPayMethod.find(item => item.method === 'card')
23
23
  },
24
+ //是否支持三方支付、补差
25
+ payThird(){
26
+ return this.otherPayMethod.find(item => item.method === 'third')
27
+ },
24
28
  orderNeedPayPrice(){
25
29
  let choseCardPay = this.choseCard ? this.choseCard.cardPayPrice : 0;
26
30
  let choseWalletPay = this.choseWallet ? this.choseWallet.walletPayPrice : 0;
@@ -177,7 +181,13 @@ export default {
177
181
  this.showCardPayChose = true;
178
182
  return false;
179
183
  }else{
180
- await this.handleConfirmAllWxPay();
184
+ //支持补差, 提示是否使用补差
185
+ if(this.payThird){
186
+ await this.handleConfirmAllWxPay();
187
+ }else{
188
+ //不支持补差,仅提示
189
+ return this.$xdAlert({content: "请选择兑换方式"})
190
+ }
181
191
  }
182
192
  }
183
193
  this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
@@ -224,9 +234,19 @@ export default {
224
234
  url: this.orderSuccessPath + `?order_id=${res.order_id}`
225
235
  })
226
236
  }else{
227
- this.$xdUniHelper.redirectTo({
228
- url: this.thirdPayPath + `?order_id=${res.pay_order_id}&main_order_id=${res.order_id}`
229
- })
237
+ //支持补差, 跳转补差页
238
+ if(this.payThird){
239
+ this.$xdUniHelper.redirectTo({
240
+ url: this.thirdPayPath + `?order_id=${res.pay_order_id}&main_order_id=${res.order_id}`
241
+ })
242
+ }else{
243
+ this.$xdAlert({
244
+ content: '余额不足,请选择其他票券',
245
+ time: 1500,
246
+ isClose: false,
247
+ zIndex: 5000
248
+ });
249
+ }
230
250
  }
231
251
  })
232
252
  }