jufubao-movie 1.0.66 → 1.0.67-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.66",
3
+ "version": "1.0.67-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝在线选座业务组件插件包",
6
6
  "main": "index.js",
@@ -367,9 +367,7 @@
367
367
  width:seatSize + 'px',
368
368
  height: seatSize + 'px',
369
369
  }"
370
- @click="(e)=>{
371
- handleChooseSeat(e,seat,index,col)
372
- }"
370
+ @click="(e)=>{ handleChooseSeat(e,seat,index,col)}"
373
371
  >
374
372
  <!--分区排期-->
375
373
  <template v-if="isAreaPrice">
@@ -401,7 +399,7 @@
401
399
  }"></view>
402
400
  <template v-else>
403
401
  <view v-if="seat.typeStatus" class="xd-online-seat__bg" :style="{
404
- backgroundImage:'url('+ nomarlOhter+seat.typeStatus +'.png?ver='+ver+')'
402
+ backgroundImage:'url('+ nomarlOhter + seat.typeStatus +'.png?ver='+ver+')'
405
403
  }"></view>
406
404
  <view v-else class='xd-online-seat__bg'></view>
407
405
  </template>
@@ -742,7 +740,7 @@
742
740
 
743
741
  /**
744
742
  * @description 影院座位的二维数组,一维行,二维列
745
- * @desc cell.type -1为非座位,0为可购座位,1为不可购座位, 2为已购座位(平台起作用), 3为情侣座位(LL,LR),
743
+ * @desc cell.type -1为非座位,0为可购座位,1为不可购座位, 2为已购座位(区分选中与不选中), 3为情侣座位(LL,LR),
746
744
  */
747
745
  initSeatArray() {
748
746
 
@@ -752,12 +750,11 @@
752
750
  cell['posRow'] = posRow;
753
751
  cell['posCell'] = posCell;
754
752
 
755
-
756
753
  //非座位状态
757
754
  if (cell.type === 'G') cell.type = -1;
758
755
 
759
- //非地板|右情侣|左情侣
760
- if(!(cell.type === -1 || cell.type === 'LR' || cell.type === 'LL')){
756
+ //普通座位(-1为非座位,情侣座位(LL,LR))
757
+ if(![-1,'LR','LL'].includes(cell.type)){
761
758
  cell.type = cell.type + '';
762
759
  if(!cell.isLove) cell.isLove = '';
763
760
  }
@@ -766,29 +763,38 @@
766
763
  if (cell.type === 'LL') {
767
764
  cell.type = 3;
768
765
  cell.lovely = 'LL'; //记录左情侣座
769
- cell.typeStatus = 'use'
766
+ cell.typeStatus = cell.status === 'false'?'sold':'use'
770
767
  cell.isLove = 'l';
771
768
  this.seatTotalNumber++;
772
769
  }
773
770
 
774
771
  //记录右情侣座
775
772
  if (cell.type === 'LR') {
773
+ cell.type = 3;
776
774
  cell.lovely = 'LR';
777
- cell.typeStatus = 'use'
775
+ cell.typeStatus = cell.status === 'false'?'sold':'use'
778
776
  cell.isLove = 'r';
779
777
  }
780
778
 
781
- //可选 or 不可购买座位状态
782
- if (cell.type === '0' || cell.type === 'LR') {
783
- if (cell.status === 'false') cell.type = 1;
784
- else cell.type = 0;
785
-
779
+ //可选 or 不可购买座位状态(普通座位)
780
+ if (cell.type === '0') {
786
781
  //status false: 不可以用 true:可用
787
- if(cell.status === 'false') cell.typeStatus = 'sold'
788
- else cell.typeStatus = 'use'
782
+ if(cell.status === 'false') {
783
+ cell.type = 1;
784
+ cell.typeStatus = 'sold'
785
+ }
786
+ else {
787
+ cell.type = 0;
788
+ cell.typeStatus = 'use'
789
+ }
789
790
 
790
791
  this.seatTotalNumber++;
791
792
  }
793
+
794
+ if(cell.type === '2') {
795
+ cell.type = 2;
796
+ cell.typeStatus = 'selected'
797
+ }
792
798
  });
793
799
  });
794
800
 
@@ -913,7 +919,7 @@
913
919
 
914
920
  /**
915
921
  * @description 检查正负2内的座位是否有错误
916
- * cell.type -1为非座位,0为可购座位,1为不可购座位, 2为已购座位(平台起作用), 3为情侣座位(LL,LR),
922
+ * cell.type -1为非座位,0为可购座位,1为不可购座位, 2为已购座位(区分选中与不选中), 3为情侣座位(LL,LR),
917
923
  * @param rows 被检查座位所在行的行数据
918
924
  * @param posCell 被检查的座位所在列位置
919
925
  * @return boolean
@@ -1122,23 +1128,19 @@
1122
1128
  * @param posCol
1123
1129
  */
1124
1130
  handleChooseSeat: function (ev, item, posRow, posCol) {
1125
- //如果是不可选,直接返回
1126
- if (item['type'] === 1 || item['type'] === -1) return;
1131
+ //不可操作(cell.type -1为非座位,0为可购座位,1为不可购座位, 2为已购座位(区分选中与不选中), 3为情侣座位(LL,LR),)
1132
+ if(item.status ==='false' || [1,-1].includes(item['type'])) return;
1127
1133
 
1128
- //购买数量大于设定购买数量并且是选择操作
1129
- if ((item['type'] === 0 || item['type']=== 3)
1130
- && this.seatSelected.length >= this.seatMaxBuyNumber
1131
- ) {
1134
+ //购买数量大于设定购买数量并且是选择操作(当前座位为普通座位)
1135
+ if ([0,3].includes(item['type']) && this.seatSelected.length >= this.seatMaxBuyNumber) {
1132
1136
  this.seatTips();
1133
1137
  return;
1134
1138
  }
1135
1139
 
1136
- //当前选中的单座已经选中了3个,在选择情侣座控制
1137
- if ((item['type'] === 0 || item['type']=== 3) && this.seatSelected.length === 3) {
1138
- if(item.lovely === 'LL' || item.lovely === 'LR') {
1139
- this.seatTips();
1140
- return;
1141
- }
1140
+ //当前选中的单座已经选中了3个(当前选中为情侣座位)
1141
+ if ((item['type']=== 3) && this.seatSelected.length === 3) {
1142
+ this.seatTips();
1143
+ return;
1142
1144
  }
1143
1145
 
1144
1146
  //选择当前行数据