jufubao-third 1.0.10-beta6 → 1.0.10

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.10-beta6",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件第三方购物平台包",
6
6
  "main": "index.js",
@@ -149,16 +149,5 @@ module.exports = [
149
149
  },
150
150
  isConsole: true,
151
151
  disabled: true
152
- },
153
- {
154
- mapFnName: "getVipList",
155
- title: "会员中心 - 会员卡列表",
156
- path: "/member/v1/vip-card",
157
- isRule: false,
158
- params: {
159
- is_show_exchange_code: ['是否展示 兑换码 ', 'Y/N,默认N', false],
160
- },
161
- isConsole: true,
162
- disabled: true
163
152
  }
164
153
  ];
@@ -17,122 +17,82 @@
17
17
  <!-- #endif -->
18
18
  <view class="jfb-third-pay__body">
19
19
  <view class="column-group">
20
- <view class="pay_section">
21
- <view style="padding: 20rpx 0 0;">
22
- <view class="column-item noBorder">
23
- <view v-if="product_total_price" class="column_label text_gray">商品总额</view>
24
- <view class="column_value text-gray">
25
- <xd-unit
26
- :isShowIcon="isShowIcon"
27
- :colorNew="isShowIcon ? '': '#999'"
28
- :price="product_total_price"
29
- :isOld="false"
30
- :font-size="24"
31
- :icon-size="0.3"
32
- ></xd-unit>
33
- </view>
34
- </view>
35
- <view v-if="servicePrice" class="column-item noBorder">
36
- <view class="column_label text_gray">平台服务费总额</view>
37
- <view class="column_value text-gray">
38
- <xd-unit
39
- :isShowIcon="isShowIcon"
40
- :colorNew="isShowIcon ? '': '#999'"
41
- :price="servicePrice" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
42
- </view>
43
- </view>
44
- <view v-if="logisticsPrice" class="column-item noBorder">
45
- <view class="column_label text_gray">运费</view>
46
- <view class="column_value text-gray">
47
- <xd-unit
48
- :isShowIcon="isShowIcon"
49
- :colorNew="isShowIcon ? '': '#999'"
50
- :price="logisticsPrice" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
51
- </view>
20
+ <view style="padding: 20rpx 0 0;">
21
+ <view class="column-item noBorder">
22
+ <view v-if="product_total_price" class="column_label text_gray">商品总额</view>
23
+ <view class="column_value text-gray">
24
+ <xd-unit :price="product_total_price" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
52
25
  </view>
53
26
  </view>
54
- <view class="column-item">
55
- <view class="column_label text_gray">
56
- 订单总额
27
+ <view v-if="servicePrice" class="column-item noBorder">
28
+ <view class="column_label text_gray">平台服务费总额</view>
29
+ <view class="column_value text-gray">
30
+ <xd-unit :price="servicePrice" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
57
31
  </view>
32
+ </view>
33
+ <view v-if="logisticsPrice" class="column-item noBorder">
34
+ <view class="column_label text_gray">运费</view>
58
35
  <view class="column_value text-gray">
59
- <xd-unit
60
- :isShowIcon="isShowIcon"
61
- :colorNew="isShowIcon ? '': '#999'"
62
- :price="origin_total_price"
63
- :isOld="false"
64
- :font-size="24"
65
- :icon-size="0.3"
66
- ></xd-unit>
36
+ <xd-unit :price="logisticsPrice" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
67
37
  </view>
68
38
  </view>
69
39
  </view>
70
-
71
- <view v-if="show_vip_card==='Y'" class="pay_section">
72
- <cus-vip-list :list="vipCardList"
73
- :vip_card_id="vip_card_id"
74
- :plus_saving_money="plus_saving_money"
75
- @choseVipCard="handleChoseVipCard"></cus-vip-list>
40
+ <view class="column-item">
41
+ <view class="column_label">
42
+ 订单总额
43
+ </view>
44
+ <view class="column_value text-gray">
45
+ <xd-unit
46
+ :price="total_price"
47
+ :isOld="false"
48
+ :font-size="24"
49
+ :icon-size="0.3"
50
+ ></xd-unit>
51
+ </view>
76
52
  </view>
77
- <view v-if="isShowPlusSaveMoney" class="pay_section">
78
- <xd-list-item label="PLUS专项立减" size="small" paddingLR="40rpx" >
79
- <view slot="label" style="color: #86541E;">PLUS专享立减</view>
80
- <!-- <view style="color: #FF7070;">-5.00</view> -->
81
- <xd-unit :isShowIcon="isShowIcon" :price="plus_saving_money" :largeZero="false" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
82
- </xd-list-item>
53
+ <view class="column-item">
54
+ <view class="column_label">
55
+ 仍需支付
56
+ <view class="label_sub">(可使用多张票券支付)</view>
57
+ </view>
58
+ <view class="column_value text-primary">
59
+ <xd-unit
60
+ :price="showOldPay ? needPayPrice :orderNeedPayPrice"
61
+ :isOld="false"
62
+ :font-size="24"
63
+ :icon-size="0.3"
64
+ ></xd-unit>
65
+ </view>
83
66
  </view>
84
-
85
- <view class="pay_section">
86
- <view class="column-item">
87
- <view class="column_label">
88
- 仍需支付
89
- <view class="label_sub">(可使用多张票券支付)</view>
90
- </view>
91
- <view class="column_value text-primary">
92
- <xd-unit
93
- :isShowIcon="isShowIcon"
94
- :price="showOldPay ? needPayPrice :orderNeedPayPrice"
95
- :isOld="false"
96
- :font-size="24"
97
- :icon-size="0.3"
98
- ></xd-unit>
99
- </view>
67
+ <view v-if="showOldPay" class="column-item">
68
+ <view class="column_label">
69
+ 我的票券
70
+ <view class="label_sub">(已使用{{checkedCards.length}}张票券)</view>
100
71
  </view>
101
- <view v-if="showOldPay" class="column-item">
102
- <view class="column_label">
103
- 我的票券
104
- <view class="label_sub">(已使用{{checkedCards.length}}张票券)</view>
105
- </view>
106
- <view class="column_value">
107
- <xd-button
108
- width="220rpx"
109
- radius="60rpx"
110
- type="primary"
111
- size="small"
112
- @click="xdDownDrawer=true; switchValidToken()"
113
- >使用新票券</xd-button>
114
- </view>
72
+ <view class="column_value">
73
+ <xd-button
74
+ width="220rpx"
75
+ radius="60rpx"
76
+ type="primary"
77
+ size="small"
78
+ @click="xdDownDrawer=true; switchValidToken()"
79
+ >使用新票券</xd-button>
115
80
  </view>
116
81
  </view>
117
82
  </view>
118
- <!-- <view class="pay_section">
119
- <xd-list-item label="账户余额" size="small" paddingLR="40rpx" showRight>
120
- <view style="color: #999999;">30.00</view>
121
- </xd-list-item>
122
- </view> -->
123
- <view class="pay_section" v-if="!showOldPay">
83
+ <template v-if="!showOldPay">
124
84
  <template v-for="item in otherPayMethod">
125
- <xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="40rpx" size="small" showRight @click="toChoseCard">
85
+ <xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="60rpx" size="small" showRight @click="toChoseCard">
126
86
  <view v-if="choseCard && choseCard.cardPayPrice" slot="label">{{item.show_name}} <text style="color:red;margin-left: 4px;">(已选{{ choseCard.selectedCardList.length }}张)</text></view>
127
87
  <xd-unit v-if="choseCard && choseCard.cardPayPrice" :price="choseCard.cardPayPrice" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
128
88
  <view v-else>请选择</view>
129
89
  </xd-list-item>
130
- <xd-list-item v-if="item.method === 'wallet'" :key="item.method" :label="item.show_name" paddingLR="40rpx" size="small" showRight @click="toChoseWallet">
90
+ <xd-list-item v-if="item.method === 'wallet'" :key="item.method" :label="item.show_name" paddingLR="60rpx" size="small" showRight @click="toChoseWallet">
131
91
  <xd-unit v-if="choseWallet && choseWallet.walletPayPrice" :price='choseWallet.walletPayPrice' :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
132
92
  <view v-else>请选择</view>
133
93
  </xd-list-item>
134
94
  </template>
135
- </view>
95
+ </template>
136
96
 
137
97
  <view
138
98
  class="ticket_list"
@@ -323,7 +283,6 @@
323
283
  import XdListItem from "./XdListItem.vue"
324
284
  import XdCardPayChose from "@/components/XdCardPayChose/XdCardPayChose"
325
285
  import XdWalletChose from "@/components/XdWalletChose/XdWalletChose"
326
- import CusVipList from "@/components/CusVipList/CusVipList"
327
286
  import {mapState} from "vuex"
328
287
  import { getContainerPropsValue } from "@/utils/xd.base";
329
288
  export default {
@@ -340,15 +299,14 @@
340
299
  XdUnit,
341
300
  XdListItem,
342
301
  XdCardPayChose,
343
- XdWalletChose,
344
- CusVipList
302
+ XdWalletChose
345
303
  },
346
304
  mixins: [
347
305
  componentsMixins, extsMixins, JfbThirdPayMixin, WalletMixins
348
306
  ],
349
307
  data() {
350
308
  return {
351
- isVip: false,
309
+
352
310
  xdDownDrawer: false,
353
311
  payChannels: [],
354
312
  channel_provider_id: "",
@@ -364,7 +322,6 @@
364
322
 
365
323
  product_total_price: "",
366
324
  total_price: "",
367
- origin_total_price: "",
368
325
  servicePrice: "",
369
326
  logisticsPrice: "",
370
327
 
@@ -378,11 +335,6 @@
378
335
  selectedCardList: [], //卡绑定使用的
379
336
  options: {},
380
337
 
381
- show_vip_card: "",
382
- vipCardList: [],
383
- vip_card_id: 0,
384
- plus_saving_money: 0,
385
-
386
338
  //面板
387
339
  orderSuccessPath: "",
388
340
  thirdPayPath: "",
@@ -398,18 +350,8 @@
398
350
  },
399
351
  computed: {
400
352
  ...mapState({
401
- brandInfo: state => state.brandInfo,
402
- siteInfo: state => state.siteInfo,
353
+ brandInfo: state => state.brandInfo
403
354
  }),
404
- isShowIcon() {
405
- if(this.$configProject['isPreview']) return true;
406
- return this.siteInfo.mapping.is_show_coin_icon==='Y'
407
- },
408
- //是否展示vip减免
409
- isShowPlusSaveMoney(){
410
- if(this.show_vip_card === 'Y') return this.vip_card_id;
411
- else return this.isVip && this.plus_saving_money;
412
- },
413
355
  showCardList(){
414
356
  //筛选出不存在于cardList的数据
415
357
  let otherCardList = this.selectedCardList.filter(item =>{
@@ -439,7 +381,6 @@
439
381
  this.init(this.container);
440
382
  let valid_token = this.$xdUniHelper.randomChar(20);
441
383
  this.$set(this.cardForm, "valid_token", valid_token);
442
- this.isVip = this.getTokenForKey('user_level') === 'VIP';
443
384
 
444
385
  // #ifdef H5
445
386
  if (!this.$configProject.isPreview) {
@@ -458,7 +399,6 @@
458
399
  this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
459
400
 
460
401
  this.getOrderConfirm();
461
-
462
402
  },
463
403
  /**
464
404
  * @description 监听事件变化
@@ -479,27 +419,12 @@
479
419
  }
480
420
  return time;
481
421
  },
482
- handleChoseVipCard(vip_card_id){
483
- this.vip_card_id = vip_card_id;
484
- this.getOrderConfirm();
485
- },
486
- p_getVipList(xnamespace){
487
- jfbRootExec("getVipList", {
488
- vm: this,
489
- data: {
490
- namespace: xnamespace,
491
- }
492
- }).then(res => {
493
- this.vipCardList = res.list;
494
- })
495
- },
496
422
  getOrderConfirm(){
497
423
  jfbRootExec("getThirdOrderInfo", {
498
424
  vm: this,
499
425
  data: {
500
426
  main_order_id: this.main_order_id,
501
427
  namespace: this.xnamespace,
502
- vip_card_id: this.vip_card_id,
503
428
  ...this.options,
504
429
  }
505
430
  }).then(res => {
@@ -519,17 +444,12 @@
519
444
  return;
520
445
  }
521
446
  this.p_getPayMethod(res.pay_methods);
522
- this.origin_total_price = res.total_price;
523
- this.total_price = this.$xdUniHelper.multiplyFloatNumber(res.real_pay_price, 1);
447
+
448
+ this.total_price = this.$xdUniHelper.multiplyFloatNumber(res.total_price, 1);
524
449
  this.needPayPrice = this.total_price;
525
450
  this.servicePrice = this.$xdUniHelper.multiplyFloatNumber(res.service_fee, 1);
526
451
  this.logisticsPrice = this.$xdUniHelper.multiplyFloatNumber(res.logistics_amount, 1);
527
452
  this.product_total_price = this.$xdUniHelper.multiplyFloatNumber(res.product_total_price, 1);
528
- this.plus_saving_money = this.$xdUniHelper.multiplyFloatNumber(res.discount_price, 1);
529
- this.show_vip_card = res.show_vip_card;
530
- if(res.show_vip_card === 'Y' && !this.vipCardList.length){
531
- this.p_getVipList(res.business_code);
532
- }
533
453
  })
534
454
  },
535
455
  p_getH5WxAuthorize(){
@@ -594,7 +514,6 @@
594
514
  other_channel_pay_price: needPayPrice,
595
515
  need_pay_price: needPayPrice,
596
516
  namespace: this.xnamespace,
597
- vip_card_id: this.vip_card_id,
598
517
  ...this.options,
599
518
  }, res => {
600
519
  this.$xdLog.setARMSInfo({
@@ -890,31 +809,22 @@
890
809
  .jfb-third-pay {
891
810
  &__body{
892
811
  padding-bottom: 150rpx;
893
- // background: #FFFFFF;
812
+ background: #FFFFFF;
894
813
 
895
- .pay_section{
896
- margin: 24rpx;
897
- background-color: #FFFFFF;
898
- border-radius: 20rpx;
899
- overflow: hidden;
900
- }
901
814
  .text_gray{
902
815
  color: #666666 !important;
903
- }
904
- .vip_list_wrap{
905
-
906
816
  }
907
817
  .column-group{
908
818
  .column-item{
909
819
  display: flex;
910
820
  align-items: center;
911
821
  justify-content: space-between;
912
- // border-bottom: 1px solid rgba(238, 238, 238, 1);
913
- padding: 30rpx 40rpx;
822
+ border-bottom: 1px solid rgba(238, 238, 238, 1);
823
+ padding: 30rpx 50rpx;
914
824
 
915
825
  &.noBorder{
916
826
  border-bottom: none;
917
- padding: 12rpx 40rpx;
827
+ padding: 12rpx 50rpx;
918
828
  }
919
829
 
920
830
  .column_label{
@@ -1,66 +1,8 @@
1
- "use strict";
1
+ 'use strict';
2
2
 
3
3
  module.exports = {
4
- getThirdOrderInfo: {
5
- main_order_id: "b517729203734716416",
6
- address: "北京市东城区崇文门外大街18号1幢(F1-1)号商铺",
7
- phone: "13611111111",
8
- total_price: "1680",
9
- show_time: 1684396260,
10
- remark: "",
11
- count_down: 897,
12
- product_total_price: "1680",
13
- logistics_amount: "100",
14
- request_id: "d2002455fa902b94"
15
- },
16
- getThirdListCards: {
17
- list: [
18
- {
19
- card_number: "101001000005388",
20
- card_type_name: "聚福宝福",
21
- end_time: 1764345599,
22
- card_point: 8319,
23
- is_bind_card: true
24
- }
25
- ],
26
- request_id: "7a01f757e9c2b1ab"
27
- },
28
- getPayMethod: {
29
- list: [
30
- { method: "wallet", show_name: "使用我的元宝", icon: "icon_1" },
31
- { method: "third", show_name: "使用补差", icon: "icon_2" },
32
- { method: "score", show_name: "使用积分", icon: "icon_3" },
33
- { method: "card", show_name: "使用票券1", icon: "icon_4" }
34
- ],
35
- request_id: "6549409a86024ecf"
36
- },
37
- getUserWallet: {
38
- show_name: "我的元宝",
39
- icon: "icon_1",
40
- total_amount: 127134,
41
- list: [
42
- {
43
- wallet_type: "UC",
44
- wallet_name: "测试账户1",
45
- wallet_virtual_number: "1000000000000245",
46
- amount: 66955,
47
- business_codes: "cake,v-RcA8Mv-Gpd96_Y_mjIf,movie",
48
- business_codes_name: "蛋糕(勿改),商城,电影(勿改)",
49
- wallet_rule:
50
- '<p>UC使用规则说明</p>\n<p>123</p>\n<p>阿达我娃的啊我啊我啊我啊我</p>\n<p><span style="color: #ff0000;">阿我打我爱我的啊我啊我</span></p>'
51
- },
52
- {
53
- wallet_type: "UB",
54
- wallet_name: "测试账户3",
55
- wallet_virtual_number: "1000000000000244",
56
- amount: 60179,
57
- business_codes: "cake,movie,market,video,book",
58
- business_codes_name:
59
- "蛋糕(勿改),电影(勿改),商城(对应百货)(勿改),网络视听(勿改),图书(勿改)",
60
- wallet_rule: "<p>UB使用规则说明</p>\n<p>123456</p>"
61
- }
62
- ],
63
- request_id: "c9975f7b9bc426a5"
64
- },
65
- getVipList:{"total_size":3,"next_page_token":"","list":[{"vip_card_id":3,"product_id":60038520,"product_name":"体验卡","sale_price":10000000,"vip_card_icon":""},{"vip_card_id":2,"product_id":60038519,"product_name":"月卡","sale_price":10000000,"vip_card_icon":""},{"vip_card_id":1,"product_id":60038515,"product_name":"测1","sale_price":10000000,"vip_card_icon":""}],"request_id":"c5cf58415cffdc30"},
66
- };
4
+ getThirdOrderInfo: {"main_order_id":"b517729203734716416","address":"北京市东城区崇文门外大街18号1幢(F1-1)号商铺","phone":"13611111111","total_price":"1680","show_time":1684396260,"remark":"","count_down":897,"request_id":"d2002455fa902b94"},
5
+ getThirdListCards: {"list":[{"card_number":"101001000005388","card_type_name":"聚福宝福","end_time":1764345599,"card_point":8319,"is_bind_card":true}],"request_id":"7a01f757e9c2b1ab"},
6
+ getPayMethod: {"list":[{"method":"wallet","show_name":"使用我的元宝","icon":"icon_1"},{"method":"third","show_name":"使用补差","icon":"icon_2"},{"method":"score","show_name":"使用积分","icon":"icon_3"},{"method":"card","show_name":"使用票券1","icon":"icon_4"}],"request_id":"6549409a86024ecf"},
7
+ getUserWallet: {"show_name":"我的元宝","icon":"icon_1","total_amount":127134,"list":[{"wallet_type":"UC","wallet_name":"测试账户1","wallet_virtual_number":"1000000000000245","amount":66955,"business_codes":"cake,v-RcA8Mv-Gpd96_Y_mjIf,movie","business_codes_name":"蛋糕(勿改),商城,电影(勿改)","wallet_rule":"<p>UC使用规则说明<\/p>\n<p>123<\/p>\n<p>阿达我娃的啊我啊我啊我啊我<\/p>\n<p><span style=\"color: #ff0000;\">阿我打我爱我的啊我啊我<\/span><\/p>"},{"wallet_type":"UB","wallet_name":"测试账户3","wallet_virtual_number":"1000000000000244","amount":60179,"business_codes":"cake,movie,market,video,book","business_codes_name":"蛋糕(勿改),电影(勿改),商城(对应百货)(勿改),网络视听(勿改),图书(勿改)","wallet_rule":"<p>UB使用规则说明<\/p>\n<p>123456<\/p>"}],"request_id":"c9975f7b9bc426a5"},
8
+ }
@@ -1,7 +1,5 @@
1
1
  import { jfbRootExec } from "@/utils/xd.event";
2
- // #ifdef H5
3
- import cookie from "@/common/cookie";
4
- //#endif
2
+ import {mapState} from "vuex";
5
3
  import {Base64} from "js-base64";
6
4
 
7
5
  export default {
@@ -20,6 +18,7 @@ export default {
20
18
  }
21
19
  },
22
20
  computed: {
21
+ ...mapState(['jfbAuthorize','brandInfo']),
23
22
  payWallet(){
24
23
  return this.otherPayMethod.find(item => item.method === 'wallet')
25
24
  },
@@ -210,7 +209,6 @@ export default {
210
209
  selected_wallet_list_json: JSON.stringify(selected_wallet_list),
211
210
  need_pay_price: this.orderNeedPayPrice,
212
211
  namespace: this.xnamespace,
213
- vip_card_id: this.vip_card_id,
214
212
  ...this.options,
215
213
  }, (res) => {
216
214
  console.warn("创建订单成功");
@@ -231,7 +229,7 @@ export default {
231
229
  let payPath = '';
232
230
  let isMp = false;
233
231
  // #ifdef H5
234
- payPath = cookie.get(`jfb-pay-path-${this.brandInfo.site_id}`);
232
+ payPath = this.jfbAuthorize.getMpKey('paySetting');
235
233
  if(navigator.userAgent.match(/miniprogram/i)) isMp = true;
236
234
  //#endif
237
235
  if(payPath && isMp) {