jufubao-mall 2.0.67-beta21 → 2.0.67-beta3

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-mall",
3
- "version": "2.0.67-beta21",
3
+ "version": "2.0.67-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -993,8 +993,16 @@
993
993
  this.choseCoupon = data;
994
994
  this.showCouponChose = false;
995
995
  //优惠券跟钱包同时使用,优惠券选完后,钱包默认选中第一张卡
996
- if(this.is_wallet_use_with_coupon === "Y" && this.defaultUseWallet && data.isAutoTrigger){
997
- if(this.$refs['xdWalletChose']) this.$refs['xdWalletChose'].handleChoseDefault();
996
+ if(this.is_wallet_use_with_coupon === "Y" && this.defaultUseWallet){
997
+ //自动选择卡券
998
+ if(data.isAutoTrigger){
999
+ if(this.$refs['xdWalletChose']) this.$refs['xdWalletChose'].handleChoseDefault();
1000
+ }
1001
+ //重新选择卡券,则需清空钱包,重新选第一个钱包
1002
+ if(data.reChoseCoupon){
1003
+ if(this.$refs['xdWalletChose']) this.$refs['xdWalletChose'].clearChecked();
1004
+ if(this.$refs['xdWalletChose']) this.$refs['xdWalletChose'].handleChoseDefault();
1005
+ }
998
1006
  }
999
1007
  },
1000
1008
  handleCouponInit(coupList){
@@ -1045,12 +1053,13 @@
1045
1053
  },
1046
1054
  useBindedWallet(options, successCb, errCb){
1047
1055
  console.log("this.choseCard", this.choseCard)
1048
- const { choseCard } = this;
1056
+ const { choseCard, choseCoupon } = this;
1049
1057
  let selected_card_list = choseCard ? choseCard.selectedCardList : [];
1050
1058
  //苏州交投:优惠券跟钱包可同时支持
1051
1059
  //问题:票券跟优惠券同时存在的话,暂时都放到selected_card_list中,后续再做区分处理
1052
1060
  if(this.choseCoupon){
1053
- selected_card_list = selected_card_list.concat(this.choseCoupon.selectedCardList);
1061
+ // selected_card_list = selected_card_list.concat(this.choseCoupon.selectedCardList);
1062
+ selected_card_list = choseCoupon ? choseCoupon.selectedCardList : [];
1054
1063
  }
1055
1064
  let otherOptions = {};
1056
1065
  let fnName = "useBindedWallet";
@@ -129,6 +129,24 @@ module.exports = {
129
129
  "eyJhcHBJZCI6Ind4YWQ3MGY2NTEyN2Y5NDcxYyIsInRpbWVTdGFtcCI6IjE2NzQ5ODg2ODkiLCJub25jZVN0ciI6Ijk0ZDExODZkY2M1OGQ4NTc4NGNjOGNmMjdjOGZmYjFiIiwicGFja2FnZSI6InByZXBheV9pZD13eDI5MTgzODA5ODI2MDY5Zjk0NTY4ZTE1ZTVmYjJjMDAwMDAiLCJwYXlTaWduIjoiM2NyRmdiOWFtM1hzS1RkeGVRMkxFdDFocGhDb2FqM1ZDN2lzeUNpN2YyZEJrXC8rNUdYV0dLNnJkZk1NTEdvSk9lTllpQ0ttdW50YnY2VHR1ZkVlNE1qZkM2RENFZTBIdWR4YzJ2Yk1Dbk1wWnNuYXRQZlhuSWN4ekpKRUdnelJsbFROMEhob3FabUl3WEdvcFM3SlNKMU1QQVUyTnJHZmlXa0JUMHljWWJuQjRWYlhJalE3Vm1qcVkzOUhaZ09wZ3RoUGMxU2RyQUk5MGhzcDhBd2xKajdib2dLNjVSRmVwV0lDa0UzOTNQOXBoMDg4YjRPQzd3S0RIOXY0N3diXC9NczJ3TGljSXBMcmlaNTVTUXMxaENTeEpnWEZNUk1aM3dLaUU5ampXRlBIZTZncnFwallqd0hsdG1cL0RBT05OM05JMm9oa2d2U2xRXC8yY2pEanZxaXY5Zz09Iiwic2lnblR5cGUiOiJSU0EiLCJwYXJ0bmVySWQiOiIxNjE0OTIxNjczIiwicHJlcGF5SWQiOiJ3eDI5MTgzODA5ODI2MDY5Zjk0NTY4ZTE1ZTVmYjJjMDAwMDAifQ==",
130
130
  request_id: "ac2bc4dca53674f2"
131
131
  },
132
+ selectCard: {
133
+ selected_card_list: [
134
+ {
135
+ card_number: "101001000006989",
136
+ card_use_point: 3600,
137
+ card_use_price: 3600,
138
+ card_cert: "AdOaERZDp34--SgdmRUlu",
139
+ is_bind_card: true
140
+ }
141
+ ],
142
+ need_pay_price: 6000,
143
+ is_need_pop: false,
144
+ pop_message: "",
145
+ pop_type: "",
146
+ cancel_text: "",
147
+ confirm_text: "",
148
+ request_id: "e9c56b87d4d8346e"
149
+ },
132
150
  createOrder: {
133
151
  order_id: "478270984734121984",
134
152
  pay_order_id: "478270986643316736",
@@ -11,12 +11,6 @@ export default {
11
11
  },
12
12
  computed:{
13
13
  ...mapState(['jfbAuthorize','brandInfo']),
14
-
15
- // #ifdef H5
16
- isMpInH5Comp(){
17
- return navigator.userAgent.match(/miniprogram/i)
18
- },
19
- //#endif
20
14
  },
21
15
 
22
16
  methods: {
@@ -220,15 +214,6 @@ export default {
220
214
  }
221
215
  }
222
216
 
223
-
224
- // #ifdef H5
225
- //(小程序套嵌模式下单时候需要设置支付成功页面地址)
226
- if(this.isMpInH5Comp) {
227
- const {host, deploy_dir} = this.brandInfo;
228
- otherOptions['success_url'] = `https://${host}/${deploy_dir}${this.paySuccessPath}?order_id=@order_id@`;
229
- }
230
- //#endif
231
-
232
217
  this.$xdShowLoading({})
233
218
  jfbRootExec(createOrderFn, {
234
219
  vm: this,
@@ -266,17 +251,16 @@ export default {
266
251
  this.$xdHideLoading();
267
252
  if(res['pay_url']){
268
253
  let url = res['pay_url'];
269
-
254
+ //let url = `/system/system/pay?${res['pay_url'].split('?')[1]}`;
270
255
  // #ifdef H5
271
256
  //判断是否为微信小程序宿主
272
- if(this.isMpInH5Comp && res['pay_jump_type'] === 'wx_mini'){
273
- //未设置success_url参数时候自己拼接
274
- if(res['pay_url'].indexOf('success_url') === -1) {
275
- const {host, deploy_dir} = this.brandInfo;
276
- const success_url = `https://${host}/${deploy_dir}${this.paySuccessPath}?order_id=${res['main_order_id']}`;
277
- if(res['pay_url'].indexOf('?') > -1) url += `&success_url=${Base64.encodeURI(success_url)}`;
278
- else url += `?success_url=${Base64.encodeURI(success_url)}`;
279
- }
257
+ if(navigator.userAgent.match(/miniprogram/i)
258
+ && res['pay_jump_type'] === 'wx_mini'
259
+ ){
260
+ const {host, deploy_dir} = this.brandInfo;
261
+ const success_url = `https://${host}/${deploy_dir}${this.paySuccessPath}?order_id=${res['main_order_id']}`;
262
+ if(res['pay_url'].indexOf('?') > -1) url += `&success_url=${Base64.encodeURI(success_url)}&callback_url=${encodeURIComponent(success_url)}`;
263
+ else url += `?success_url=${Base64.encodeURI(success_url)}&callback_url=${encodeURIComponent(success_url)}`;
280
264
  url = `/pages/jumptomp/jumptomp?callback=${Base64.encodeURI(url)}&isThird=1`;
281
265
  }
282
266
  //#endif
@@ -369,7 +353,7 @@ export default {
369
353
  let isMp = false;
370
354
  // #ifdef H5
371
355
  payPath = this.jfbAuthorize.getMpKey('paySetting');
372
- if(this.isMpInH5Comp) isMp = true;
356
+ if(navigator.userAgent.match(/miniprogram/i)) isMp = true;
373
357
  this.isMpEnv = document.cookie;
374
358
  this.mpPayPath = payPath;
375
359
  //#endif
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * @description 第三方库
5
- * @param threePackagePath {String} 第三方库所在项目路径存放路径路
6
- * @param packname {String} 包名字
7
- * @returns {string|*}
8
- */
9
- const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
10
- if(packname === 'gxd-commands-bussiness') {
11
- return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
12
- }
13
-
14
- if (packname === 'gxd-uni-library-editx') {
15
- return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
16
- }
17
-
18
- };
19
-
20
- module.exports = {
21
- getPackagePath
22
- }