jufubao-movie 1.0.59 → 1.0.61-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-movie",
3
- "version": "1.0.59",
3
+ "version": "1.0.61-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝在线选座业务组件插件包",
6
6
  "main": "index.js",
@@ -359,6 +359,7 @@
359
359
  is_use_jfb_pay: "", //是否使用聚福宝支付
360
360
  res_total_price: 0,
361
361
  origin_total_price: 0,
362
+ hasPreNotice: false,
362
363
 
363
364
  is_show_vip_card_list: "",
364
365
  vipCardList: [],
@@ -701,9 +702,11 @@
701
702
  }
702
703
  }).then(res => {
703
704
  this.$xdHideLoading()
704
- uni.showToast({
705
- title: "添加成功",
706
- icon: "none"
705
+ this.$xdAlert({
706
+ content: '添加成功',
707
+ time: 2500,
708
+ isClose: false,
709
+ zIndex: 5000
707
710
  });
708
711
  successCb(res);
709
712
  }).catch(err => {
@@ -753,84 +756,97 @@
753
756
  })
754
757
  console.log(options, '999999')
755
758
  },
756
- handlePayBtnClick(){
757
- this.$xdConfirm({
758
- title: '在线订座提醒',
759
- showClose: true,
760
- confirmText: '我知道了',
761
- cancel: false,
762
- isHtml: true,
763
- isTitle: true,
764
- styles: this.styles,
765
- content: '<span style="color:red;font-size: 16px">提示:影票一旦售出,将不支持退换!购票成功不再发送短信通知,部分影院不提供3D眼镜,儿童身高免购票以影院实际情况为准。</span>',
766
- success: async (res) => {
767
- if(this.is_use_jfb_pay === "Y" && this.is_first_use_card === "Y"){
768
- /**
769
- * 有任一新版支付都用新版支付, 仅卡支付也用新版选卡支付
770
- */
771
- if(this.payWallet || this.payCard || this.payCoupon){ //已选卡
772
- let selected_card_list = [];
773
-
774
- if(this.choseCard) {
775
- selected_card_list = this.choseCard ? this.choseCard.selectedCardList : [];
776
- } else if(this.choseCoupon) {
777
- selected_card_list = this.choseCoupon ? this.choseCoupon.selectedCardList : [];
778
- }
759
+ handlePreNotice(){
760
+ return new Promise((resolve, reject) => {
761
+ this.$xdConfirm({
762
+ title: '在线订座提醒',
763
+ showClose: true,
764
+ confirmText: '我知道了',
765
+ cancel: false,
766
+ isHtml: true,
767
+ isTitle: true,
768
+ styles: this.styles,
769
+ content: '<span style="color:red;font-size: 16px">提示:影票一旦售出,将不支持退换!购票成功不再发送短信通知,部分影院不提供3D眼镜,儿童身高免购票以影院实际情况为准。</span>',
770
+ success: async (res) => {
771
+ this.hasPreNotice = true;
772
+ resolve(res)
773
+ },
774
+ fail: (res) => {
775
+ reject(res)
776
+ }
777
+ })
778
+ })
779
+ },
780
+ async handlePayBtnClick(){
781
+ if(!this.hasPreNotice){
782
+ await this.handlePreNotice();
783
+ }
784
+ if(this.is_use_jfb_pay === "Y" && this.is_first_use_card === "Y"){
785
+ /**
786
+ * 有任一新版支付都用新版支付, 仅卡支付也用新版选卡支付
787
+ */
788
+ if(this.payWallet || this.payCard || this.payCoupon){ //已选卡
789
+ let selected_card_list = [];
790
+
791
+ if(this.choseCard) {
792
+ selected_card_list = this.choseCard ? this.choseCard.selectedCardList : [];
793
+ } else if(this.choseCoupon) {
794
+ selected_card_list = this.choseCoupon ? this.choseCoupon.selectedCardList : [];
795
+ }
779
796
 
780
- let selected_wallet_list = this.choseWallet ? this.choseWallet.selectedWalletList : []
781
- //票券跟钱包都未选择,给用户提示
782
- if(selected_card_list.length === 0 && selected_wallet_list.length === 0){
783
- if(!this.hasAlertCardChose){
784
- if(this.payCard){
785
- this.showCardPayChose = true;
786
- }else{
787
- this.showWalletChose = true;
788
- }
789
- // this.showCardPayChose = true;
790
- return false;
791
- }else{
792
- //支持补差, 提示是否使用补差
793
- if(this.payThird){
794
- if(this.skipTip === 'N'){
795
- await this.handleConfirmAllWxPay();
796
- }
797
- }else{
798
- //不支持补差,仅提示
799
- return this.$xdAlert({content: "请选择兑换方式"})
800
- }
801
- }
797
+ let selected_wallet_list = this.choseWallet ? this.choseWallet.selectedWalletList : []
798
+ //票券跟钱包都未选择,给用户提示
799
+ if(selected_card_list.length === 0 && selected_wallet_list.length === 0){
800
+ if(!this.hasAlertCardChose){
801
+ if(this.payCard){
802
+ this.showCardPayChose = true;
803
+ }else{
804
+ this.showWalletChose = true;
802
805
  }
803
- this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
806
+ // this.showCardPayChose = true;
807
+ return false;
804
808
  }else{
805
- if(this.skipToPay === 'N'){
806
- this.showCardPay = true;
809
+ //支持补差, 提示是否使用补差
810
+ if(this.payThird){
811
+ if(this.skipTip === 'N'){
812
+ await this.handleConfirmAllWxPay();
813
+ }
807
814
  }else{
808
- this.useTickAndWalletPay([], []);
815
+ //不支持补差,仅提示
816
+ return this.$xdAlert({content: "请选择兑换方式"})
809
817
  }
810
818
  }
819
+ }
820
+ this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
821
+ }else{
822
+ if(this.skipToPay === 'N'){
823
+ this.showCardPay = true;
811
824
  }else{
812
- this.createSettleOrder({
813
- need_pay_price: this.res_total_price,
814
- total_price: this.res_total_price,
815
- selected_card_list_json: "[]"
816
- }, (res1) => {
817
- this.handleToPay(res1);
818
- // this.$xdUniHelper.redirectTo({
819
- // url: this.payPath + `?order_id=${res1['pay_order_id']}&main_order_id=${res1['order_id']}`
820
- // }, false, true)
821
- })
825
+ this.useTickAndWalletPay([], []);
822
826
  }
823
827
  }
824
- });
825
-
828
+ }else{
829
+ this.createSettleOrder({
830
+ need_pay_price: this.res_total_price,
831
+ total_price: this.res_total_price,
832
+ selected_card_list_json: "[]"
833
+ }, (res1) => {
834
+ this.handleToPay(res1);
835
+ // this.$xdUniHelper.redirectTo({
836
+ // url: this.payPath + `?order_id=${res1['pay_order_id']}&main_order_id=${res1['order_id']}`
837
+ // }, false, true)
838
+ })
839
+ }
826
840
  },
827
841
  handleConfirmAllWxPay(){
828
842
  return new Promise((resolve, reject) => {
829
- uni.showModal({
843
+ this.$xdConfirm({
830
844
  title: '提示',
831
- content: `您当前未使用票券,您将全部用微信支付`,
832
- confirmText: "我知道了",
833
- success: function (res) {
845
+ content: '您当前未使用票券,您将全部用微信支付',
846
+ confirmText: '我知道了',
847
+ width: '85%',
848
+ isTitle: true,
849
+ success: (res) => {
834
850
  if (res.confirm) {
835
851
  resolve();
836
852
  } else if (res.cancel) {
@@ -1011,27 +1027,29 @@
1011
1027
 
1012
1028
  addSettleCoupon(options, successCb, errCb) {
1013
1029
 
1014
- this.$xdShowLoading({})
1015
- jfbRootExec('movieAddCard', {
1016
- vm: this,
1017
- data: {
1018
- ...options,
1019
- cart_order_id: this.tempOrderId,
1020
- show_type: 'coupon'
1021
- }
1022
- }).then(res => {
1023
- this.$xdHideLoading();
1024
- uni.showToast({
1025
- title: "添加成功",
1026
- icon: "none"
1027
- });
1028
- successCb(res);
1029
- }).catch(err => {
1030
- console.log(err, 'err')
1031
- this.$xdHideLoading();
1032
- if(errCb) errCb();
1033
- this.$xdLog.catch(err);
1034
- })
1030
+ this.$xdShowLoading({})
1031
+ jfbRootExec('movieAddCard', {
1032
+ vm: this,
1033
+ data: {
1034
+ ...options,
1035
+ cart_order_id: this.tempOrderId,
1036
+ show_type: 'coupon'
1037
+ }
1038
+ }).then(res => {
1039
+ this.$xdHideLoading();
1040
+ this.$xdAlert({
1041
+ content: '添加成功',
1042
+ time: 2500,
1043
+ isClose: false,
1044
+ zIndex: 5000
1045
+ });
1046
+ successCb(res);
1047
+ }).catch(err => {
1048
+ console.log(err, 'err')
1049
+ this.$xdHideLoading();
1050
+ if(errCb) errCb();
1051
+ this.$xdLog.catch(err);
1052
+ })
1035
1053
  },
1036
1054
  getSettleListCoupons(cb) {
1037
1055
 
@@ -851,11 +851,13 @@
851
851
  if (!message) {
852
852
  message = `每次最多可以购买:${this.seatMaxBuyNumber}个座位。`;
853
853
  }
854
- uni.showModal({
854
+ this.$xdConfirm({
855
855
  title: '提示',
856
856
  content: message,
857
- showCancel: false,
858
- success: function (res) {
857
+ cancel: false,
858
+ width: '85%',
859
+ isTitle: true,
860
+ success: (res) => {
859
861
  if (typeof callback === 'function') {
860
862
  callback()
861
863
  }
@@ -411,10 +411,12 @@
411
411
  this.loadingFilm = false;
412
412
  const { cinema_data, film_data, pop_notice,is_pop} = res;
413
413
  if(!film_data.length){
414
- uni.showToast({
415
- title: "暂无影片排期数据",
416
- icon: "error"
417
- })
414
+ this.$xdAlert({
415
+ content: '暂无影片排期数据',
416
+ time: 2500,
417
+ isClose: false,
418
+ zIndex: 5000
419
+ });
418
420
  }
419
421
  this.cinemaInfo = cinema_data;
420
422
  this.filmList = film_data;