jufubao-movie 1.0.56-beta4 → 1.0.56-beta7

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-movie",
3
- "version": "1.0.56-beta4",
3
+ "version": "1.0.56-beta7",
4
4
  "private": false,
5
5
  "description": "聚福宝在线选座业务组件插件包",
6
6
  "main": "index.js",
@@ -5,6 +5,17 @@ export default {
5
5
  advanced: [],
6
6
  content: (data)=>{
7
7
  return [
8
+ {
9
+ label: "无其他支付时直接跳到支付页面:",
10
+ ele: "xd-radio",
11
+ valueKey: "skipToPay",
12
+ value: data['skipToPay'] || 'N',
13
+ groupKey: "content",
14
+ list: [
15
+ {label: '是', value: 'Y'},
16
+ {label: '否', value: 'N'},
17
+ ]
18
+ },
8
19
  {
9
20
  label: '去支付路径:',
10
21
  ele: 'xd-select-pages-path',
@@ -132,7 +132,7 @@
132
132
  <xd-content-xss style="color: #999" :html="notice"></xd-content-xss>
133
133
  </view>
134
134
  </view>
135
-
135
+
136
136
  <view v-if="is_show_vip_card_list==='Y'" class="vip_list_wrap">
137
137
  <cus-vip-list :list="vipCardList"
138
138
  :vip_card_id="vip_card_id"
@@ -140,16 +140,16 @@
140
140
  @choseVipCard="handleChoseVipCard"></cus-vip-list>
141
141
  </view>
142
142
 
143
- <view v-if="is_show_vip_card_list==='Y'" class="vip_pay_info">
143
+ <view v-if="isShowPlusSavingMoneyPrice" class="vip_pay_info">
144
144
  <view class="good_vip_price">
145
145
  <xd-list-item label="商品价格" paddingLR="40rpx" size="small" showBottom>
146
146
  <!-- <view style="color: #999999;">145.00</view> -->
147
- <xd-unit :price="origin_total_price" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
147
+ <xd-unit :isShowIcon="isShowIcon" :price="origin_total_price" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
148
148
  </xd-list-item>
149
- <xd-list-item v-if="isShowPlusSavingMoney" label="PLUS专项立减" size="small" paddingLR="40rpx" >
150
- <view slot="label" style="color: #86541E;">PLUS专项立减</view>
149
+ <xd-list-item v-if="isShowPlusSavingMoney" label="PLUS专享立减" size="small" paddingLR="40rpx" >
150
+ <view slot="label" style="color: #86541E;">PLUS专享立减</view>
151
151
  <!-- <view style="color: #FF7070;">-5.00</view> -->
152
- <xd-unit :price="plus_saving_money" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
152
+ <xd-unit :isShowIcon="isShowIcon" :largeZero="false" :price="-plus_saving_money" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
153
153
  </xd-list-item>
154
154
  </view>
155
155
  <!-- <view class="vip_remain">
@@ -161,7 +161,7 @@
161
161
 
162
162
  <view v-if="otherPayMethod.length" class="jfb-movie-confirm__body-card">
163
163
  <template v-for="item in otherPayMethod">
164
- <xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="60rpx" size="small" :showRight="!(choseCoupon && choseCoupon.cardPayPrice)" @click="toChoseCard">
164
+ <xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="0" size="small" :showRight="!(choseCoupon && choseCoupon.cardPayPrice)" @click="toChoseCard">
165
165
  <view v-if="(choseCoupon && choseCoupon.cardPayPrice)">
166
166
  <view style="color:#CCCCCC;font-size: 20rpx">已使用其他票券,不可用</view>
167
167
  </view>
@@ -174,7 +174,7 @@
174
174
  <view v-else>请选择</view>
175
175
  </view>
176
176
  </xd-list-item>
177
- <xd-list-item v-if="item.method === 'wallet'" :key="item.method" :label="item.show_name" paddingLR="60rpx" size="small" :showRight="!(choseCoupon && choseCoupon.cardPayPrice)" @click="toChoseWallet">
177
+ <xd-list-item v-if="item.method === 'wallet'" :key="item.method" :label="item.show_name" paddingLR="0" size="small" :showRight="!(choseCoupon && choseCoupon.cardPayPrice)" @click="toChoseWallet">
178
178
  <view v-if="(choseCoupon && choseCoupon.cardPayPrice)">
179
179
  <view style="color:#CCCCCC;font-size: 20rpx">已使用其他票券,不可用</view>
180
180
  </view>
@@ -183,7 +183,7 @@
183
183
  <view v-else>请选择</view>
184
184
  </view>
185
185
  </xd-list-item>
186
- <xd-list-item v-if="item.method === 'coupon'" :key="item.method" :label="item.show_name" paddingLR="60rpx" size="small" :showRight="!(choseCard && choseCard.cardPayPrice)" @click="toChoseCoupon">
186
+ <xd-list-item v-if="item.method === 'coupon'" :key="item.method" :label="item.show_name" paddingLR="0" size="small" :showRight="!(choseCard && choseCard.cardPayPrice)" @click="toChoseCoupon">
187
187
  <view v-if="(choseCoupon && choseCoupon.cardPayPrice)" slot="label">
188
188
  {{item.show_name}} <text style="color:red;margin-left: 4px;">(已选{{ choseCoupon.selectedCardList.length }}张)</text>
189
189
  </view>
@@ -401,7 +401,7 @@
401
401
  couponUseBtnPadding: {},
402
402
  couponImageUrl: "",
403
403
  is_plus_site: false,
404
-
404
+ skipToPay: "",
405
405
  }
406
406
  },
407
407
  watch: {
@@ -415,7 +415,8 @@
415
415
  brandInfo: state => state.brandInfo,
416
416
  siteInfo: state => state.siteInfo,
417
417
  }),
418
- isShowIcon() {
418
+ isShowIcon() {
419
+ if(this.$configProject.isPreview) return true;
419
420
  return this.siteInfo.mapping.is_show_coin_icon==='Y'
420
421
  },
421
422
  bottomFixedStyle(){
@@ -438,6 +439,15 @@
438
439
  return true; //都开启补差
439
440
  // return this.otherPayMethod.find(item => item.method === 'third')
440
441
  },
442
+ //实付展示plus立减的商品价格
443
+ isShowPlusSavingMoneyPrice(){
444
+ //如果是会员
445
+ if(this.isVip) return true;
446
+ else{
447
+ if(this.is_show_vip_card_list === 'Y') return true;
448
+ }
449
+ return false;
450
+ },
441
451
  //是否展示plus立减
442
452
  isShowPlusSavingMoney(){
443
453
  if(this.is_show_vip_card_list === 'Y') return this.vip_card_id;
@@ -465,6 +475,9 @@
465
475
  return false;
466
476
  }
467
477
  },
478
+ destroyed() {
479
+ if(this.timer) clearInterval(this.timer);
480
+ },
468
481
  created() {
469
482
  this.init(this.container);
470
483
  this.xnamespace =this.projectAttr.business_code;
@@ -781,7 +794,11 @@
781
794
  }
782
795
  this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
783
796
  }else{
784
- this.showCardPay = true;
797
+ if(this.skipToPay === 'N'){
798
+ this.showCardPay = true;
799
+ }else{
800
+ this.useTickAndWalletPay([], []);
801
+ }
785
802
  }
786
803
  }else{
787
804
  this.createSettleOrder({
@@ -913,6 +930,7 @@
913
930
  */
914
931
  init(container) {
915
932
  this.bgColor = this.$colorChange(this.mainColor).alpha(0.1).toString();
933
+ this.skipToPay = getContainerPropsValue(container, 'content.skipToPay', 'N');
916
934
  this.payPath = getContainerPropsValue(container, 'content.payPath', {value: ''}).value;
917
935
  this.paySuccessPath = getContainerPropsValue(container, 'content.paySuccessPath', {value: "/pages/order/success"}).value;
918
936
  this.bindCard = getContainerPropsValue(container,"content.bindCard","1");
@@ -977,68 +995,71 @@
977
995
 
978
996
  addSettleCoupon(options, successCb, errCb) {
979
997
 
980
- this.$xdShowLoading({})
981
- jfbRootExec('movieAddCard', {
982
- vm: this,
983
- data: {
984
- ...options,
985
- cart_order_id: this.tempOrderId,
986
- show_type: 'coupon'
987
- }
988
- }).then(res => {
989
- this.$xdHideLoading();
990
- uni.showToast({
991
- title: "添加成功",
992
- icon: "none"
993
- });
994
- successCb(res);
995
- }).catch(err => {
996
- console.log(err, 'err')
997
- this.$xdHideLoading();
998
- if(errCb) errCb();
999
- this.$xdLog.catch(err);
1000
- })
998
+ this.$xdShowLoading({})
999
+ jfbRootExec('movieAddCard', {
1000
+ vm: this,
1001
+ data: {
1002
+ ...options,
1003
+ cart_order_id: this.tempOrderId,
1004
+ show_type: 'coupon'
1005
+ }
1006
+ }).then(res => {
1007
+ this.$xdHideLoading();
1008
+ uni.showToast({
1009
+ title: "添加成功",
1010
+ icon: "none"
1011
+ });
1012
+ successCb(res);
1013
+ }).catch(err => {
1014
+ console.log(err, 'err')
1015
+ this.$xdHideLoading();
1016
+ if(errCb) errCb();
1017
+ this.$xdLog.catch(err);
1018
+ })
1001
1019
  },
1002
- getSettleListCoupons(cb) {
1020
+ getSettleListCoupons(cb) {
1003
1021
 
1004
- jfbRootExec('movieCardList', {
1005
- vm: this,
1006
- data: {
1007
- show_type: 'coupon'
1008
- }
1009
- }).then(res => {
1010
- cb(res.list)
1011
- this.cardList = res.list
1012
- }).catch(this.$xdLog.catch)
1013
- },
1014
- setSettleSelectCoupon(options, successCb, errCb) {
1015
-
1016
- this.$xdShowLoading({})
1017
- let cart_order_id = this.tempOrderId;
1018
- jfbRootExec('movieSelectCard', {
1019
- vm: this,
1020
- data: {
1021
- cart_order_id: cart_order_id,
1022
- select_content: 1,
1023
- ...options,
1024
- }
1025
- }).then(res => {
1026
- successCb(res)
1027
- this.$xdHideLoading()
1028
- }).catch(err => {
1029
- if(errCb) errCb(err)
1030
- this.$xdHideLoading()
1031
- this.$xdLog.catch(err);
1032
- })
1033
- },
1022
+ jfbRootExec('movieCardList', {
1023
+ vm: this,
1024
+ data: {
1025
+ show_type: 'coupon'
1026
+ }
1027
+ }).then(res => {
1028
+ cb(res.list)
1029
+ this.cardList = res.list
1030
+ }).catch(this.$xdLog.catch)
1031
+ },
1032
+ setSettleSelectCoupon(options, successCb, errCb) {
1033
+
1034
+ this.$xdShowLoading({})
1035
+ let cart_order_id = this.tempOrderId;
1036
+ jfbRootExec('movieSelectCard', {
1037
+ vm: this,
1038
+ data: {
1039
+ cart_order_id: cart_order_id,
1040
+ select_content: 1,
1041
+ ...options,
1042
+ }
1043
+ }).then(res => {
1044
+ successCb(res)
1045
+ this.$xdHideLoading()
1046
+ }).catch(err => {
1047
+ if(errCb) errCb(err)
1048
+ this.$xdHideLoading()
1049
+ this.$xdLog.catch(err);
1050
+ })
1051
+ },
1034
1052
 
1035
1053
  onJfbBack(options) {
1036
1054
  this.$xdUniHelper.navigateBack()
1037
1055
  },
1038
1056
 
1039
1057
  onJfbShow(options) {
1040
- if(this.timer) clearTimeout(this.timer);
1058
+ if(this.timer) clearInterval(this.timer);
1041
1059
  this.onJfbLoad(options)
1060
+ },
1061
+ onJfbUnload(){
1062
+ if(this.timer) clearInterval(this.timer);
1042
1063
  }
1043
1064
  }
1044
1065
  }