jufubao-movie 1.0.25 → 1.0.27-beta10

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.25",
3
+ "version": "1.0.27-beta10",
4
4
  "private": false,
5
5
  "description": "聚福宝在线选座业务组件插件包",
6
6
  "main": "index.js",
@@ -120,4 +120,41 @@ module.exports = [
120
120
  isConsole: true,
121
121
  disabled: true,
122
122
  },
123
+ {
124
+ mapFnName: "getPayMethod",
125
+ title: "订单支付-获取支付列表",
126
+ path: "/pay/v1/wallet/list-user-available-pay-method",
127
+ isRule: false,
128
+ params: {
129
+ support_methods: ['元宝:wallet 积分: score 补差:third 卡券:card', 'Array', true],
130
+ },
131
+ isConsole: true,
132
+ disabled: true
133
+ },
134
+ {
135
+ mapFnName: "getUserWallet",
136
+ title: "订单支付-可用钱包列表",
137
+ path: "/pay/v1/wallet/list-user-movie-available-wallet",
138
+ isRule: false,
139
+ params: {
140
+ support_method: ['元宝:wallet 积分: score', 'string', true],
141
+ business_code: ['业务线', 'string', true],
142
+ sub_business_codes: ['子业务线', 'string', true],
143
+ },
144
+ isConsole: true,
145
+ disabled: true
146
+ },
147
+ {
148
+ mapFnName: "useBindedWallet",
149
+ title: "使用已绑钱包",
150
+ path: "/movie/v1/order/use-wallet",
151
+ isRule: false,
152
+ data: {
153
+ selected_card_list_json: ['卡', 'string', true],
154
+ selected_wallet_list_json: ['钱包', 'string', true],
155
+ total_price: ['总金额', 'string', true],
156
+ },
157
+ isConsole: true,
158
+ disabled: true
159
+ }
123
160
  ];
@@ -93,6 +93,7 @@
93
93
  共{{order_info.seat_number}}张:
94
94
  <xd-unit
95
95
  :color="mainColor"
96
+ :isOld="false"
96
97
  :iocnSize="0.32"
97
98
  :fontSize="24"
98
99
  :price="order_info.total_price"
@@ -125,12 +126,26 @@
125
126
  <xd-content-xss style="color: #999" :html="notice"></xd-content-xss>
126
127
  </view>
127
128
  </view>
129
+ <view class="jfb-movie-confirm__body-card">
130
+ <template v-for="item in otherPayMethod">
131
+ <xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="0rpx" size="small" showRight @click="toChoseCard">
132
+ <view v-if="choseCard && choseCard.cardPayPrice" slot="label">{{item.show_name}} <text style="color:red;margin-left: 4px;">(已选{{ choseCard.selectedCardList.length }}张)</text></view>
133
+ <xd-unit v-if="choseCard && choseCard.cardPayPrice" :price="choseCard.cardPayPrice" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
134
+ <view v-else>请选择</view>
135
+ </xd-list-item>
136
+ <xd-list-item v-if="item.method === 'wallet'" :key="item.method" :label="item.show_name" paddingLR="0rpx" size="small" showRight @click="toChoseWallet">
137
+ <xd-unit v-if="choseWallet && choseWallet.walletPayPrice" :price='choseWallet.walletPayPrice' :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
138
+ <view v-else>请选择</view>
139
+ </xd-list-item>
140
+ </template>
141
+ </view>
128
142
  <view class="jfb-movie-confirm__body-btn-height" :style="bottomFixedStylePlaceholder"></view>
129
143
  <view class="jfb-movie-confirm__body-btn" :style="bottomFixedStyle">
130
144
  <view style="display: flex;align-items:center;">
131
145
  <view style="margin-right: 8rpx;">应付:</view>
132
146
  <xd-unit
133
- :price="order_info.total_price"
147
+ :price="orderNeedPayPrice"
148
+ :isOld="false"
134
149
  :font-size="36"
135
150
  :iocn-size=".45"
136
151
  ></xd-unit>
@@ -145,31 +160,66 @@
145
160
  >确认支付</xd-button>
146
161
  </view>
147
162
  </view>
148
- <xd-card-pay
163
+ <template v-if="otherPayLoaded">
164
+ <xd-card-pay
165
+ v-if="!payCard"
166
+ :layoutInfo="layoutInfo"
167
+ :show.sync="showCardPay"
168
+ :payChannels="payChannels"
169
+ :jwxSDK="jwxSDK"
170
+ :validImageAPIUrl="validImageAPIUrl"
171
+ :price="order_info.total_price/100"
172
+ :getSettleListCards="getSettleListCards"
173
+ :setSettleSelectCard="setSettleSelectCard"
174
+ :createSettleOrder="createSettleOrder"
175
+ :addSettleCard="addSettleCard"
176
+ :setThirdPlace="setThirdPlace"
177
+ ref="cardPay"
178
+ @onCreateOrder="handleCreateSuccess"
179
+ ></xd-card-pay>
180
+ <xd-card-pay-chose
181
+ v-else
182
+ ref="xdCardPayChose"
183
+ :layoutInfo="layoutInfo"
184
+ :show.sync="showCardPayChose"
185
+ :hadChoseCard="choseCard && choseCard.selectedCardList"
186
+ :jwxSDK="jwxSDK"
187
+ :selected_wallet_list="choseWallet ? choseWallet.selectedWalletList : []"
188
+ :validImageAPIUrl="validImageAPIUrl"
189
+ :orderTotalPrice="order_info.total_price/100"
190
+ :orderNeedPayPrice="orderNeedPayPrice"
191
+ :getSettleListCards="getSettleListCards"
192
+ :setSettleSelectCard="setSettleSelectCard"
193
+ :addSettleCard="addSettleCard"
194
+ @onChose="handleCardChose"
195
+ @onAlert="() => hasAlertCardChose = true"
196
+ >
197
+ </xd-card-pay-chose>
198
+ </template>
199
+ <xd-wallet-chose
200
+ v-if="payWallet"
201
+ ref="xdWalletChose"
149
202
  :layoutInfo="layoutInfo"
150
- :show.sync="showCardPay"
151
- :payChannels="payChannels"
152
- :jwxSDK="jwxSDK"
153
- :validImageAPIUrl="validImageAPIUrl"
154
- :price="order_info.total_price"
155
- :getSettleListCards="getSettleListCards"
156
- :setSettleSelectCard="setSettleSelectCard"
157
- :createSettleOrder="createSettleOrder"
158
- :addSettleCard="addSettleCard"
159
- :setThirdPlace="setThirdPlace"
160
- ref="cardPay"
161
- @onCreateOrder="handleCreateSuccess"
162
- ></xd-card-pay>
203
+ :show.sync="showWalletChose"
204
+ :hadChoseWallet="choseWallet && choseWallet.selectedWalletList"
205
+ :getUserWalletList="getUserWalletList"
206
+ :useBindedWallet="p_useBindedWallet"
207
+ @onChose="handleWalletChose"
208
+ ></xd-wallet-chose>
209
+
163
210
  </view>
164
211
  </view>
165
212
  </template>
166
213
 
167
214
  <script>
168
215
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
216
+ import XdListItem from "./XdListItem.vue"
169
217
  import XdUnit from "@/components/XdUnit/XdUnit";
170
218
  import XdTag from "@/components/XdTag/XdTag";
171
219
  import XdButton from "@/components/XdButton/XdButton";
172
220
  import XdCardPay from "@/components/XdCardPay/XdCardPay";
221
+ import XdCardPayChose from "@/components/XdCardPayChose/XdCardPayChose"
222
+ import XdWalletChose from "@/components/XdWalletChose/XdWalletChose"
173
223
  import XdContentXss from "@/components/XdContentXss/XdContentXss";
174
224
  import {jfbRootExec} from "@/utils/xd.event";
175
225
  import JfbMovieConfirmMixin from "./JfbMovieConfirmMixin";
@@ -186,7 +236,10 @@
186
236
  XdTag,
187
237
  XdButton,
188
238
  XdCardPay,
189
- XdContentXss
239
+ XdContentXss,
240
+ XdListItem,
241
+ XdCardPayChose,
242
+ XdWalletChose
190
243
  },
191
244
  mixins: [componentsMixins,extsMixins,JfbMovieConfirmMixin],
192
245
  data() {
@@ -212,6 +265,18 @@
212
265
 
213
266
  cardShow: false,
214
267
 
268
+ otherPayMethod: [],
269
+ otherPayLoaded: false,
270
+
271
+ showCardPayChose: false,
272
+ choseCard: null,
273
+ hasAlertCardChose: false,
274
+
275
+ showWalletChose: false,
276
+ choseWallet: null,
277
+
278
+ xnamespace: "",
279
+
215
280
  //提示
216
281
  notice: '',
217
282
  title: '',
@@ -233,10 +298,26 @@
233
298
  },
234
299
  bottomFixedStylePlaceholder(){
235
300
  return this.fixedStyle({paddingBottom: 24, zIndex: 110}, 'bottom', false);
301
+ },
302
+ payWallet(){
303
+ return this.otherPayMethod.find(item => item.method === 'wallet')
304
+ },
305
+ payCard(){
306
+ return this.otherPayMethod.find(item => item.method === 'card')
307
+ },
308
+ //订单实际需要支付金额(减去各项已选,票券、钱包)
309
+ orderNeedPayPrice(){
310
+ let choseCardPay = this.choseCard ? this.choseCard.cardPayPrice : 0;
311
+ let choseWalletPay = this.choseWallet ? this.choseWallet.walletPayPrice : 0;
312
+ let total = this.$xdUniHelper.addFloatNumber(choseCardPay, choseWalletPay);
313
+ let total_amount = this.order_info.total_price ? this.order_info.total_price : 0;
314
+ let result = this.$xdUniHelper.cutFloatNumber(total_amount, total);
315
+ return result;
236
316
  }
237
317
  },
238
318
  created() {
239
319
  this.init(this.container);
320
+ this.xnamespace =this.projectAttr.business_code;
240
321
  // #ifdef H5
241
322
  if (!this.$configProject.isPreview){
242
323
  jfbRootExec("getH5WxAuthorize", {
@@ -295,7 +376,8 @@
295
376
  res.show_time = baseJsDateToTime(res.show_time)
296
377
  res.seat_number = JSON.parse(res.seat_name).length;
297
378
  res.seat_name = JSON.parse(res.seat_name).join(' | ')
298
- res.total_price = this.$xdUniHelper.divisionFloatNumber(res.total_price, 100)
379
+ // res.total_price = this.$xdUniHelper.divisionFloatNumber(res.total_price, 100)
380
+ res.total_price = res.total_price;
299
381
  this.order_info = res
300
382
  this.times = Number(this.order_info['count_down']);
301
383
  let minutes = Math.floor(this.times / 60);
@@ -311,6 +393,12 @@
311
393
  this.times--
312
394
  this.getCountDown();
313
395
 
396
+ //支付方式跟用户相关,与订单无关。
397
+ //只获取一次。
398
+ if(!this.otherPayLoaded){
399
+ this.p_getPayMethod(res.pay_methods);
400
+ }
401
+
314
402
  })
315
403
  .catch(err => {
316
404
  this.$xdHideLoading();
@@ -319,6 +407,94 @@
319
407
  // }
320
408
  });
321
409
  },
410
+ //only选择卡片
411
+ toChoseCard(){
412
+ this.showCardPayChose = true;
413
+ },
414
+ //only选卡结果
415
+ handleCardChose(data){
416
+ console.log(data)
417
+ this.choseCard = data;
418
+ this.showCardPayChose = false;
419
+ },
420
+ //选择元宝
421
+ toChoseWallet(){
422
+ this.showWalletChose = true;
423
+ },
424
+ handleWalletChose({walletPayPrice, needPayPrice, selectedWalletList}){
425
+ this.choseWallet = {
426
+ walletPayPrice,
427
+ needPayPrice,
428
+ selectedWalletList
429
+ }
430
+ console.log(this.choseWallet)
431
+ this.showWalletChose = false;
432
+ },
433
+
434
+ p_getPayMethod(support_methods){
435
+ jfbRootExec("getPayMethod", {
436
+ vm: this,
437
+ data: {
438
+ support_methods: JSON.stringify(support_methods)
439
+ }
440
+ }).then(res => {
441
+ this.otherPayMethod = res.list;
442
+ this.otherPayLoaded = true;
443
+ })
444
+ },
445
+ p_useBindedWallet(options, successCb, errCb){
446
+ console.log("this.choseCard", this.choseCard)
447
+ const { choseCard } = this;
448
+ let selected_card_list = choseCard ? choseCard.selectedCardList : [];
449
+ this.$xdShowLoading({})
450
+ jfbRootExec("useBindedWallet", {
451
+ vm: this,
452
+ data: {
453
+ ...options,
454
+ total_price: this.order_info.total_price,
455
+ selected_card_list_json: JSON.stringify(selected_card_list),
456
+ namespace: this.xnamespace,
457
+ cart_order_id: this.tempOrderId
458
+ }
459
+ }).then(res => {
460
+ successCb(res)
461
+ this.$xdHideLoading()
462
+ }).catch(err => {
463
+ if(errCb) errCb(err)
464
+ })
465
+ },
466
+ getUserWalletList(cb){
467
+ jfbRootExec("getUserWallet", {
468
+ vm: this,
469
+ data: {
470
+ support_method: "wallet",
471
+ business_code: this.xnamespace
472
+ }
473
+ }).then(res => {
474
+ cb(res);
475
+ })
476
+ },
477
+ p_useBindedWallet(options, successCb, errCb){
478
+ console.log("this.choseCard", this.choseCard)
479
+ const { choseCard } = this;
480
+ let selected_card_list = choseCard ? choseCard.selectedCardList : [];
481
+ this.$xdShowLoading({})
482
+ jfbRootExec("useBindedWallet", {
483
+ vm: this,
484
+ data: {
485
+ ...options,
486
+ total_price: this.order_info.total_price,
487
+ selected_card_list_json: JSON.stringify(selected_card_list),
488
+ namespace: this.xnamespace,
489
+ cart_order_id: this.tempOrderId
490
+ }
491
+ }).then(res => {
492
+ successCb(res)
493
+ this.$xdHideLoading()
494
+ }).catch(err => {
495
+ if(errCb) errCb(err)
496
+ })
497
+ },
322
498
  addSettleCard(options, successCb, errCb) {
323
499
  console.log(options, 'ioioioioi')
324
500
  this.$xdShowLoading({})
@@ -389,9 +565,27 @@
389
565
  isTitle: true,
390
566
  $vm: this,
391
567
  content: '<span style="color:red;font-size: 16px">提示:影票一旦售出,将不支持退换!购票成功不再发送短信通知,部分影院不提供3D眼镜,儿童身高免购票以影院实际情况为准。</span>',
392
- success: (res) => {
568
+ success: async (res) => {
393
569
  if(this.is_use_jfb_pay === "Y" && this.is_first_use_card === "Y"){
394
- this.showCardPay = true;
570
+ /**
571
+ * 有任一新版支付都用新版支付, 仅卡支付也用新版选卡支付
572
+ */
573
+ if(this.payWallet || this.payCard){ //已选卡
574
+ let selected_card_list = this.choseCard ? this.choseCard.selectedCardList : [];
575
+ let selected_wallet_list = this.choseWallet ? this.choseWallet.selectedWalletList : []
576
+ //票券跟钱包都未选择,给用户提示
577
+ if(selected_card_list.length == 0 && selected_wallet_list.length == 0){
578
+ if(!this.hasAlertCardChose){
579
+ this.showCardPayChose = true;
580
+ return false;
581
+ }else{
582
+ await this.handleConfirmAllWxPay();
583
+ }
584
+ }
585
+ this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
586
+ }else{
587
+ this.showCardPay = true;
588
+ }
395
589
  }else{
396
590
  this.createSettleOrder({
397
591
  need_pay_price: this.res_total_price,
@@ -407,6 +601,39 @@
407
601
  });
408
602
 
409
603
  },
604
+ handleConfirmAllWxPay(){
605
+ return new Promise((resolve, reject) => {
606
+ uni.showModal({
607
+ title: '提示',
608
+ content: `您当前未使用票券,您将全部用微信支付`,
609
+ confirmText: "我知道了",
610
+ success: function (res) {
611
+ if (res.confirm) {
612
+ resolve();
613
+ } else if (res.cancel) {
614
+ reject("取消支付");
615
+ }
616
+ }
617
+ });
618
+ })
619
+ },
620
+ //使用钱包跟票券一同支付
621
+ useTickAndWalletPay(selected_card_list, selected_wallet_list){
622
+ this.createSettleOrder({
623
+ total_price: this.order_info.total_price,
624
+ selected_card_list_json: JSON.stringify(selected_card_list),
625
+ selected_wallet_list_json: JSON.stringify(selected_wallet_list),
626
+ need_pay_price: this.orderNeedPayPrice
627
+ }, (res) => {
628
+ console.warn("创建订单成功");
629
+ console.warn(res);
630
+ this.handleCreateSuccess({
631
+ need_pay_price: this.orderNeedPayPrice,
632
+ order_id: res.order_id,
633
+ pay_order_id: res.pay_order_id
634
+ })
635
+ })
636
+ },
410
637
  createSettleOrder(options, successCb, errCb) {
411
638
  this.$xdShowLoading({})
412
639
  jfbRootExec("movieCreateOrder", {
@@ -142,5 +142,7 @@ module.exports = {
142
142
  "order_id": "478270984734121984",
143
143
  "pay_order_id": "478270986643316736",
144
144
  "request_id": "c0feda27f5679197"
145
- }
145
+ },
146
+ getPayMethod: {"list":[{"method":"card","show_name":"使用票券1","icon":"icon_4"},{"method":"wallet","show_name":"使用我的元宝","icon":"icon_1"},{"method":"score","show_name":"使用积分","icon":"icon_3"}],"request_id":"3746368129d64b96"},
147
+ getUserWallet: {"show_name":"我的元宝","icon":"icon_1","total_amount":179989,"list":[{"wallet_type":"UB","wallet_name":"账户3","wallet_virtual_number":"1000000000000244","amount":79789,"business_codes":"cake,v-RcA8Mv-Gpd96_Y_mjIf","business_codes_name":"蛋糕(勿改),商城","wallet_rule":"<p>UB使用规则说明<\/p>\n<p>123456<\/p>"},{"wallet_type":"UC","wallet_name":"账户1","wallet_virtual_number":"1000000000000245","amount":100200,"business_codes":"mall,movie,v-RcA8Mv-Gpd96_Y_mjIf,cake","business_codes_name":"商城,电影(勿改),商城,蛋糕(勿改)","wallet_rule":"<p>UC使用规则说明<\/p>\n<p>123<\/p>\n<p>阿达我娃的啊我啊我啊我啊我<\/p>\n<p><span style=\"color: #ff0000;\">阿我打我爱我的啊我啊我<\/span><\/p>"}],"request_id":"823e7aa78fa32fa9"},
146
148
  }
@@ -0,0 +1,137 @@
1
+ <template>
2
+ <view class="xd-my-list-item"
3
+ :class="'size_'+size"
4
+ :style="{
5
+ borderTop: showBottom ? '1px solid #eee':'none',
6
+ marginTop: showBottom? paddingTB: 0,
7
+ paddingLeft: paddingLR,
8
+ paddingRight: paddingLR,
9
+ paddingTop: paddingTB,
10
+ paddingBottom: paddingTB,
11
+ }"
12
+ @click="$emit('click')">
13
+ <view v-if="listIcon" class="my-list_icon">
14
+ <image mode="widthFix" :src="listIcon" />
15
+ </view>
16
+ <view class="my-list_label">
17
+ <slot name="label">
18
+ <view v-html="label"></view>
19
+ </slot>
20
+ </view>
21
+ <view class="my-list_value">
22
+ <slot></slot>
23
+ <xd-font-icon
24
+ v-if="showRight"
25
+ :style="{
26
+ marginLeft: '10rpx',
27
+ color: '#B1B1B1'
28
+ }"
29
+ size="24"
30
+ icon="iconxiangyou_xian"
31
+ ></xd-font-icon>
32
+ </view>
33
+
34
+ </view>
35
+ </template>
36
+
37
+ <script>
38
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
39
+ export default {
40
+ components: {
41
+ XdFontIcon
42
+ },
43
+ data(){
44
+ return {
45
+
46
+ }
47
+ },
48
+ props: {
49
+ size: {
50
+ type: String,
51
+ default: "default"
52
+ },
53
+ paddingTB:{
54
+ type: String,
55
+ default: "24rpx"
56
+ },
57
+ paddingLR: {
58
+ type: String,
59
+ default: "0rpx"
60
+ },
61
+ //是否显示border-bottom
62
+ showBottom: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ //是否显示右箭头
67
+ showRight: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ //是否显示图标
72
+ listIcon: {
73
+ type: String,
74
+ default: ''
75
+ },
76
+ //label
77
+ label: {
78
+ type: String,
79
+ default: ''
80
+ }
81
+ }
82
+
83
+ }
84
+ </script>
85
+
86
+ <style lang="less" scoped>
87
+ .xd-my-list-item{
88
+ display: flex;
89
+ align-items: center;
90
+ padding: 30rpx 0;
91
+ font-size: 28rpx;
92
+
93
+ &.size_large{
94
+ .my-list_value,
95
+ .my-list_label{
96
+ font-size: 28rpx;
97
+ font-weight: 400;
98
+ }
99
+ }
100
+ &.size_default{
101
+ .my-list_value,
102
+ .my-list_label{
103
+ font-size: 28rpx;
104
+ font-weight: 400;
105
+ }
106
+ }
107
+ &.size_small{
108
+ .my-list_value,
109
+ .my-list_label{
110
+ font-size: 24rpx;
111
+ font-weight: 400;
112
+ }
113
+ }
114
+
115
+ .my-list_icon{
116
+ width: 32rpx;
117
+ margin-right: 24rpx;
118
+
119
+ image{
120
+ width: 32rpx;
121
+ }
122
+ }
123
+
124
+ .my-list_label{
125
+ // flex: 1;
126
+ }
127
+ .my-list_value{
128
+ flex: 1;
129
+ display: flex;
130
+ align-items: center;
131
+ justify-content: flex-end;
132
+ }
133
+ .arrow_right{
134
+ width: 44rpx;
135
+ }
136
+ }
137
+ </style>
@@ -36,6 +36,7 @@
36
36
  </view>
37
37
  <xd-online-seat
38
38
  v-if="filmId"
39
+ ref="xdOnlineSeat"
39
40
  :key="cinemaSeatKey"
40
41
  :is-old="false"
41
42
  :film-id="filmId"
@@ -73,6 +74,10 @@
73
74
  cinemaSeatKey: 'cinemaSeatKey',
74
75
  loadingList: true,
75
76
  request_ident: '',
77
+ seatTimer: null,
78
+ seatTime: 0,
79
+ isPop: false,
80
+ paiQiData: [],
76
81
 
77
82
  //面板
78
83
  payPath: "", //三方支付路径
@@ -121,9 +126,11 @@
121
126
  } else if (res.seat_status === 'N') {
122
127
  clearTimeout(this.timer)
123
128
  this.$xdHideLoading();
124
- uni.showToast({
125
- title: res.seat_message,
126
- icon: "none"
129
+ this.$xdAlert({
130
+ content: res.seat_message,
131
+ time: 2500,
132
+ isClose: false,
133
+ zIndex: 5000
127
134
  })
128
135
  return
129
136
  }else{
@@ -155,20 +162,21 @@
155
162
  ]).then(([res, res1]) => {
156
163
  this.loadingList = false;
157
164
  this.$xdHideLoading();
158
- let paiqi_data = res.schedule_data;
165
+ let paiqi_data = res.schedule_data.map(item => {
166
+ item['name'] = item['date_name'];
167
+ item['paiqi_data'] = item['paiqi'].map(pp => {
168
+ pp['price'] = pp['sale_price'];
169
+ pp['jfb_film_id'] = pp['film_id'];
170
+ pp['jfb_cinema_id'] = pp['cinema_id'];
171
+ pp['data_id'] = pp['schedule_id'];
172
+ return pp;
173
+ });
174
+ return item;
175
+ });
176
+ this.paiQiData = paiqi_data;
159
177
  // const {cinema_data, film_data} = res1;
160
178
  resolve({
161
- paiqi_data: paiqi_data.map(item => {
162
- item['name'] = item['date_name'];
163
- item['paiqi_data'] = item['paiqi'].map(pp => {
164
- pp['price'] = pp['sale_price'];
165
- pp['jfb_film_id'] = pp['film_id'];
166
- pp['jfb_cinema_id'] = pp['cinema_id'];
167
- pp['data_id'] = pp['schedule_id'];
168
- return pp;
169
- });
170
- return item;
171
- }),
179
+ paiqi_data: paiqi_data,
172
180
  film_data: [{
173
181
  ...res1,
174
182
  id: res1.film_id,
@@ -176,12 +184,14 @@
176
184
  cinema_data: res1
177
185
  })
178
186
  if(res1.temp_order_id || res1.oms_order_id){
187
+ this.isPop = true;
179
188
  this.handleToPay(res1);
180
189
  }
181
190
  })
182
191
  },
183
192
 
184
193
  handleGetSeatList(item, resolve) {
194
+ if(this.isPop) return;
185
195
  this.$xdShowLoading({});
186
196
  const {cinemaId} = this;
187
197
  this.scheduleId = item.data_id;
@@ -197,9 +207,10 @@
197
207
  if(res.status === "P"){
198
208
  if(!this.$root.$isShow) return;
199
209
  this.request_ident = res.request_ident;
200
- setTimeout(() => {
210
+ if(this.seatTimer) clearTimeout(this.seatTimer);
211
+ this.seatTimer = setTimeout(() => {
201
212
  this.handleGetSeatList(item, resolve);
202
- }, 2000)
213
+ }, ++this.seatTime > 5 ? (Math.pow(2, (this.seatTime - 4)) * 1000) : 2000)
203
214
  return;
204
215
  }
205
216
  if(res.status === "E"){
@@ -217,7 +228,6 @@
217
228
  })
218
229
  resolve(seatData);
219
230
  this.$xdHideLoading();
220
-
221
231
  })
222
232
  },
223
233
  //去支付未完成订单
@@ -247,7 +257,11 @@
247
257
  data: {
248
258
  order_id: temp_order_id || oms_order_id
249
259
  }
250
- }).then(suc => {})
260
+ }).then(suc => {
261
+ this.isPop = false;
262
+ // this.cinemaSeatKey = Date.now()
263
+ this.$refs.xdOnlineSeat.getScheduleList(this.paiQiData)
264
+ })
251
265
  }
252
266
  }
253
267
  })
@@ -287,6 +301,16 @@
287
301
  console.log('onJfbShow', options)
288
302
  this.onJfbLoad(options);
289
303
  this.cinemaSeatKey = Date.now()
304
+ },
305
+ onJfbUnload(){
306
+ this.unmount();
307
+ },
308
+ onJfbHide(){
309
+ this.unmount();
310
+ },
311
+ unmount(){
312
+ if(this.seatTimer) clearTimeout(this.seatTimer);
313
+ if(this.timer) clearTimeout(this.timer);
290
314
  }
291
315
  }
292
316
  }