seat.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. <template name="dever-seat">
  2. <view class="w-100 grace-body">
  3. <view class="bg-f1">
  4. <movable-area :style="'height:'+(seatRow*40+350)+'rpx;width: 100vw;tops:'+(rpxNum*132)+'px'" class="pt-f left-0">
  5. <movable-view :style="'width: 100vw;height:'+(seatRow*40+350)+'rpx;'" :inertia="true" :scale="true" :scale-min="0.95"
  6. :scale-max="2" direction="all" @change="onMove" @scale="onScale">
  7. <picker @change="openHall" :value="hall_index" :range="hall_data" v-if="hall_state">
  8. <view class="Stage dp-f jc-c ai-c fz-22 color-333" style="margin-top:10rpx">
  9. {{hall_data[hall_index]}}
  10. </view>
  11. </picker>
  12. <view style="height: 30rpx;margin-top: 30rpx;margin-bottom: 30rpx;" class="m-0-a mt-48 dp-f jc-c ai-c fz-22 color-999 br-5">{{item.name}}</view>
  13. <view v-for="(item,index) in seatArray" :key="index" class="dp-f jc-c mt-20" :style="'width:'+boxWidth+'px;height:'+seatSize+'px'">
  14. <view v-for="(seat,col) in item" :key="col" class="dp-ib" :style="'width:'+seatSize+'px;height:'+seatSize+'px'"
  15. @click="handleChooseSeat(index,col)">
  16. <image v-if="seat.type===0" class="w-100 h-100" src="@/static/seat/unselected.png" mode="aspectFit"></image>
  17. <image v-else-if="seat.type===1" class="w-100 h-100" src="@/static/seat/selected.png" mode="aspectFit" style="width:40rpx;height:40rpx;"></image>
  18. <image v-else-if="seat.type===2" class="w-100 h-100" :id="seat.TipsId" src="@/static/seat/bought.png" mode="aspectFit" style="width:40rpx;height:40rpx;" :src="seat.User.avatar" @click="showTips(seat.TipsId, seat.Id, seat.Tips, seat.SeatCode, seat.User)"></image>
  19. </view>
  20. </view>
  21. <view class="pt-f bg-line br-15 over-h" :style="'left: '+(10-moveX/scale)+'px;top:112rpx;width:30rpx;'">
  22. <view class="w-100 dp-f ai-c jc-c fz-22 color-fff" :style="'height:'+seatSize+'px;margin-top:20rpx;'" v-for="(m,mindex) in mArr"
  23. :key="mindex">{{m}}</view>
  24. <view :style="'height: 20rpx;'"></view>
  25. </view>
  26. </movable-view>
  27. </movable-area>
  28. <view class="pt-f bottom-bar left-0 dp-f fd-cr z1000">
  29. <view class="bg-white p-all-32" style="width: 750rpx;">
  30. <view class="dp-f ai-c jc-c fz-28 color-333 mb-20" v-if="SelectNum===0">
  31. 推荐选座
  32. <view style="width: 106rpx;height: 60rpx;" class="b-1 br-5 dp-f ai-c jc-c fz-28 ml-20" v-for="(n,numindex) in 4"
  33. :key="n" @click="smartChoose(numindex+1)">
  34. {{numindex+1}}
  35. </view>
  36. </view>
  37. <view class="dp-f ai-c fw-w fz-28 color-333 mb-20" v-if="SelectNum>0">
  38. <text>已选</text>
  39. <view class="p-all-10 b-1 br-5 dp-f ai-c jc-c fz-28 ml-20" v-for="(optItem,optindex) in optArr" :key="optindex">
  40. {{optItem.RowNum+'排'+optItem.ColumnNum+'座'}}
  41. </view>
  42. </view>
  43. <view style="width: 566rpx;height: 90rpx;" class="dp-f jc-c ai-c br-10 fz-34 color-fff" :class="SelectNum>0?'bg-red-1':'bg-unbtn'"
  44. @click="buySeat">
  45. <text>{{SelectNum>0?('¥ '+aPrice+' 确认座位'):'选择座位后才能观看'}}</text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view v-if="show">
  51. <dever-publish :title="title" :is_upload="false" @hideModal="hideTips" @getRefresh="getRefresh" :type="seat_table" :type_id="seat_table_id" :api="api" :playtime="playtime"></dever-publish>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import deverPublish from '@/lib/dever/components/publish.vue';
  57. let cycle;
  58. export default {
  59. props: {
  60. type : {
  61. type : String,
  62. value : null
  63. },
  64. type_id : {
  65. type : String,
  66. value : null
  67. },
  68. item : {
  69. type : Object,
  70. value : null
  71. },
  72. index : 0
  73. },
  74. components:{
  75. deverPublish
  76. },
  77. data() {
  78. return {
  79. scaleMin:1,//h5端为解决1无法缩小问题,设为0.95
  80. boxWidth: 400, //屏幕宽度px
  81. space: ' ', //空格
  82. seatArray: [], //影院座位的二维数组,-1为非座位,0为未购座位,1为已选座位(绿色),2为已购座位(红色),一维行,二维列
  83. seatRow: 0, //影院座位行数
  84. seatCol: 0, //影院座位列数
  85. seatSize: 0, //座位尺寸
  86. SelectNum: 0, //选择座位数
  87. moveX: 0, //水平移动偏移量
  88. scale: 1, //放大倍数
  89. minRow: 0, //从第几行开始排座位
  90. minCol: 0, //从第几列开始排座位
  91. showTis: true, //显示选座提示
  92. seatList: [], //接口获取的原始位置
  93. mArr: [], //排数提示
  94. optArr: [], //选中的座位数组。
  95. isWXAPP:false,
  96. price : 1,
  97. fetch : {
  98. user : {},
  99. hall : 1,
  100. play : false,
  101. },
  102. show : false,
  103. api : 'app/community/?l=api.addTips',
  104. title : '发布聊天泡泡',
  105. seat_table : '',
  106. seat_table_id : 0,
  107. tipsData : {},
  108. page : 1,
  109. play : false,
  110. playtime : 0,
  111. tipsTimeData : {},
  112. hall_state : false,
  113. hall_data : [],
  114. hall_index : 0,
  115. };
  116. },
  117. computed: {
  118. aPrice() {
  119. return (this.SelectNum - 1) * this.price
  120. },
  121. rpxNum() {
  122. return this.boxWidth / 750
  123. },
  124. pxNum() {
  125. return 750 / this.boxWidth
  126. },
  127. },
  128. mounted() {
  129. if (this.item.title) {
  130. this.title = this.item.title;
  131. }
  132. this.price = parseFloat(this.item.seat_price);
  133. this.setHall();
  134. //获取宽度
  135. uni.getSystemInfo({
  136. success: function(e) {
  137. this.boxWidth = e.screenWidth
  138. //#ifdef H5
  139. this.scaleMin = 0.95
  140. //#endif
  141. }
  142. })
  143. this.page = 1;
  144. this.initData(this.hall)
  145. },
  146. methods: {
  147. setHall : function() {
  148. var default_hall = this.Dever.data('hall_' + this.item.id);
  149. if (!default_hall) {
  150. default_hall = 1;
  151. } else {
  152. default_hall = parseInt(default_hall);
  153. }
  154. var hall = parseInt(this.item.hall_num);
  155. this.hall_index = default_hall - 1;
  156. this.hall = default_hall;
  157. var hall_state = false;
  158. for (var i=0; i<hall ; i++) {
  159. this.hall_data[i] = (i+1) + '号厅';
  160. if (this.hall_index == i) {
  161. hall_state = true;
  162. }
  163. }
  164. if (!hall_state) {
  165. this.hall_index = 0;
  166. this.hall = 1;
  167. }
  168. this.hall_state = true;
  169. },
  170. openHall : function(e) {
  171. this.hall_index = e.detail.value;
  172. this.hall = parseInt(this.hall_index+1);
  173. this.Dever.data('hall_' + this.item.id, this.hall);
  174. this.page = 1;
  175. this.initData(this.hall);
  176. },
  177. showTips : function(tipsid, id, tips, code, user) {
  178. if (!this.play && this.playtime == 0) {
  179. this.Dever.alert('播放时才能发送消息');
  180. return;
  181. }
  182. this.seat_table = tips;
  183. this.seat_table_id = id;
  184. this.show = true;
  185. this.$emit('stop');
  186. },
  187. hideTips : function() {
  188. this.show = false;
  189. this.$emit('start');
  190. },
  191. setDisabled : function() {
  192. this.$emit('setDisabled', this.fetch.play);
  193. },
  194. tips : function(id, content) {
  195. var id = '#tips_' + this.type_id + '_' + id;
  196. if (this.tipsData[id]) {
  197. this.Dever.layer.close(this.tipsData[id]);
  198. }
  199. this.tipsData[id] = this.Dever.layer.tips(content, id, {
  200. tips: [1, '#0FA6D8'],
  201. tipsMore: true
  202. });
  203. },
  204. getRefresh : function(cate_id, type, type_id, content) {
  205. this.tips(type_id, content);
  206. if (!this.tipsTimeData[this.playtime]) {
  207. this.tipsTimeData[this.playtime] = [];
  208. }
  209. this.tipsTimeData[this.playtime].push({type_id:type_id,content:content});
  210. this.hideTips();
  211. },
  212. initData: function(hall) {
  213. var self = this;
  214. this.Dever.get(this, 'app/user/?l=api.seat', {code:this.Dever.config.code,noloading:1, content_id : this.type_id, hall : hall}, function(t) {
  215. self.setDisabled();
  216. let arr = t.seat
  217. //数据说明:SeatCode座位编号,RowNum-行号,ColumnNum-纵号,YCoord-Y坐标,XCoord-X坐标,Status-状态
  218. let row = 0
  219. let col = 0
  220. let minCol = parseInt(arr[0].XCoord)
  221. let minRow = parseInt(arr[0].YCoord)
  222. for (let i of arr) {
  223. minRow = parseInt(i.YCoord) < minRow ? parseInt(i.YCoord) : minRow
  224. minCol = parseInt(i.XCoord) < minCol ? parseInt(i.XCoord) : minCol
  225. row = parseInt(i.YCoord) > row ? parseInt(i.YCoord) : row
  226. col = parseInt(i.XCoord) > col ? parseInt(i.XCoord) : col
  227. self.seat_table = i.Tips
  228. }
  229. self.seatList = arr
  230. self.seatRow = row - minRow + 1
  231. self.seatCol = col - minCol + 3
  232. self.minRow = minRow
  233. self.minCol = minCol - 1
  234. self.initSeatArray()
  235. self.tipsTimeData = {};
  236. self.getData();
  237. });
  238. },
  239. start : function() {
  240. this.play = true;
  241. },
  242. stop : function() {
  243. this.play = false;
  244. this.Dever.layer.closeAll();
  245. },
  246. time : function(time) {
  247. this.playtime = time;
  248. //console.info(time);
  249. if (this.tipsTimeData[time]) {
  250. this.handle(this.tipsTimeData[time]);
  251. }
  252. },
  253. // 获取聊天历史数据
  254. getData : function() {
  255. var self = this;
  256. this.Dever.get(this, 'app/community/?l=api.tips', {code:this.Dever.config.code,noloading:1, type:this.seat_table, pg:this.page}, function(t) {
  257. var arr = Object.keys(t.info);
  258. if (arr.length > 0) {
  259. self.save(t.info);
  260. }
  261. });
  262. },
  263. save : function(data) {
  264. this.tipsTimeData = Object.assign(this.tipsTimeData, data);
  265. this.page++;
  266. this.getData();
  267. },
  268. //执行聊天泡泡
  269. handle : function(items) {
  270. if (!this.play) {
  271. return;
  272. }
  273. cycle && (clearInterval(cycle));
  274. var i = 0;
  275. var len = items.length;
  276. this.tips(items[i]['type_id'], items[i]['content']);
  277. i++;
  278. cycle = setInterval(() => {
  279. var time = 5;
  280. // #ifndef H5
  281. time = Math.ceil(Math.floor(Math.random() * (this.maxTime - this.minTime + 1) + this.minTime));
  282. // #endif
  283. if (!this.play) {
  284. clearInterval(cycle);
  285. } else if (i < len) {
  286. this.tips(items[i]['type_id'], items[i]['content']);
  287. i++;
  288. } else {
  289. clearInterval(cycle);
  290. }
  291. }, 1000)
  292. },
  293. //初始座位数组
  294. initSeatArray: function() {
  295. let seatArray = Array(this.seatRow).fill(0).map(() => Array(this.seatCol).fill({
  296. type: -1,
  297. SeatCode: '',
  298. RowNum: '',
  299. ColumnNum: ''
  300. }));
  301. this.seatArray = seatArray
  302. this.seatSize = this.boxWidth > 0 ?
  303. parseInt(parseInt(this.boxWidth, 10) / (this.seatCol + 1), 10) :
  304. parseInt(parseInt(414, 10) / (this.seatCol + 1), 10)
  305. this.initNonSeatPlace();
  306. },
  307. //初始化是座位的地方
  308. initNonSeatPlace: function() {
  309. let seat = this.seatList.slice()
  310. let arr = this.seatArray.slice()
  311. for (let num in seat) {
  312. let status = 2 //-1为非座位,0为未购座位,1为已选座位(绿色),2为已购座位(红色)
  313. if (seat[num].Status === 0) {
  314. status = 0
  315. } else if (seat[num].Status === -1) {
  316. status = -1
  317. }
  318. arr[parseInt(seat[num].YCoord) - this.minRow][parseInt(seat[num].XCoord) - this.minCol] = {
  319. type: status,
  320. SeatCode: seat[num].SeatCode,
  321. RowNum: seat[num].RowNum,
  322. ColumnNum: seat[num].ColumnNum,
  323. User: seat[num].User,
  324. Id : seat[num].Id,
  325. Tips : seat[num].Tips,
  326. TipsId : 'tips_' + this.type_id + '_' + seat[num].Id
  327. }
  328. }
  329. this.seatArray = arr.slice()
  330. let mArr = []
  331. for (let i in arr) {
  332. let m = ''
  333. for (let n of arr[i]) {
  334. if (n.SeatCode) {
  335. m = n.RowNum
  336. }
  337. }
  338. if (m) {
  339. mArr.push(m)
  340. } else {
  341. mArr.push('')
  342. }
  343. }
  344. this.mArr = mArr
  345. },
  346. //放大缩小事件
  347. onScale: function(e) {
  348. this.showTis = false
  349. // this.moveX=-e.detail.x
  350. let w = this.boxWidth * 0.5
  351. let s = 1 - e.detail.scale
  352. this.moveX = w * s
  353. this.scale = e.detail.scale
  354. if (s > 0 || s === 0) {
  355. this.showTis = true
  356. }
  357. },
  358. //移动事件
  359. onMove: function(e) {
  360. this.showTis = false
  361. this.moveX = e.detail.x
  362. },
  363. //重置座位
  364. resetSeat: function() {
  365. this.SelectNum = 0
  366. this.optArr = []
  367. //将所有已选座位的值变为0
  368. let oldArray = this.seatArray.slice();
  369. for (let i = 0; i < this.seatRow; i++) {
  370. for (let j = 0; j < this.seatCol; j++) {
  371. if (oldArray[i][j].type === 1) {
  372. oldArray[i][j].type = 0
  373. }
  374. }
  375. }
  376. this.seatArray = oldArray;
  377. },
  378. //选定且购买座位
  379. buySeat: function() {
  380. if (this.SelectNum === 0) {
  381. return
  382. }
  383. let oldArray = [];
  384. for (let i = 0; i < this.seatRow; i++) {
  385. for (let j = 0; j < this.seatCol; j++) {
  386. if (this.seatArray[i][j].type === 1) {
  387. oldArray.push(this.seatArray[i][j].SeatCode)
  388. }
  389. }
  390. }
  391. this.buy(oldArray);
  392. },
  393. buy : function(seat) {
  394. seat = seat.join(',');
  395. var self = this;
  396. this.Dever.confirm('确定购买座位吗?公测期间免费~', function() {
  397. self.Dever.post('app/user/?l=api.seatSave', {code:self.Dever.config.code, seat:seat, content_id : self.type_id}, function(t) {
  398. self.Dever.alert('选座成功,您可以点击头像发布内容~');
  399. self.resetSeat();
  400. self.initData(self.hall);
  401. });
  402. })
  403. },
  404. //处理座位选择逻辑
  405. handleChooseSeat: function(row, col) {
  406. let seatValue = this.seatArray[row][col].type;
  407. let newArray = this.seatArray;
  408. //如果是已购座位,直接返回
  409. if (seatValue === 2 || seatValue === -1) return
  410. //如果是已选座位点击后变未选
  411. if (seatValue === 1) {
  412. newArray[row][col].type = 0
  413. this.SelectNum--
  414. this.getOptArr(newArray[row][col], 0)
  415. } else if (seatValue === 0) {
  416. if (this.SelectNum >= 4) {
  417. this.Dever.alert('一次最多只能购买4个座位');
  418. return;
  419. }
  420. newArray[row][col].type = 1
  421. this.SelectNum++
  422. this.getOptArr(newArray[row][col], 1)
  423. }
  424. //必须整体更新二维数组,Vue无法检测到数组某一项更新,必须slice复制一个数组才行
  425. this.seatArray = newArray.slice();
  426. },
  427. //处理已选座位数组
  428. getOptArr: function(item, type) {
  429. let optArr = this.optArr
  430. if (type === 1) {
  431. optArr.push(item)
  432. } else if (type === 0) {
  433. let arr = []
  434. optArr.forEach(v => {
  435. if (v.SeatCode !== item.SeatCode) {
  436. arr.push(v)
  437. }
  438. })
  439. optArr = arr
  440. }
  441. this.optArr = optArr.slice()
  442. },
  443. //推荐选座,参数是推荐座位数目,
  444. smartChoose: function(num) {
  445. //console.log('num===', num)
  446. // 先重置
  447. this.resetSeat()
  448. //找到影院座位水平垂直中间位置的后一排
  449. let rowStart = parseInt((this.seatRow - 1) / 2, 10) + 1;
  450. //先从中间排往后排搜索
  451. let backResult = this.searchSeatByDirection(rowStart, this.seatRow - 1, num);
  452. if (backResult.length > 0) {
  453. this.chooseSeat(backResult);
  454. this.SelectNum += num
  455. return
  456. }
  457. //再从中间排往前排搜索
  458. let forwardResult = this.searchSeatByDirection(rowStart - 1, 0, num);
  459. if (forwardResult.length > 0) {
  460. this.chooseSeat(forwardResult);
  461. this.SelectNum += num
  462. return
  463. }
  464. //提示用户无合法位置可选
  465. alert('无合法位置可选!')
  466. },
  467. //搜索函数,参数:fromRow起始行,toRow终止行,num推荐座位数
  468. searchSeatByDirection: function(fromRow, toRow, num) {
  469. /*
  470. * 推荐座位规则
  471. * (1)初始状态从座位行数的一半处的后一排的中间开始向左右分别搜索,取离中间最近的,如果满足条件,
  472. * 记录下该结果离座位中轴线的距离,后排搜索完成后取距离最小的那个结果座位最终结果,优先向后排进行搜索,
  473. * 后排都没有才往前排搜,前排逻辑同上
  474. *
  475. * (2)只考虑并排且连续的座位,不能不在一排或者一排中间有分隔
  476. *
  477. * */
  478. /*
  479. * 保存当前方向搜索结果的数组,元素是对象,result是结果数组,offset代表与中轴线的偏移距离
  480. * {
  481. * result:Array([x,y])
  482. * offset:Number
  483. * }
  484. *
  485. */
  486. let currentDirectionSearchResult = [];
  487. let largeRow = fromRow > toRow ? fromRow : toRow,
  488. smallRow = fromRow > toRow ? toRow : fromRow;
  489. for (let i = smallRow; i <= largeRow; i++) {
  490. //每一排的搜索,找出该排里中轴线最近的一组座位
  491. let tempRowResult = [],
  492. minDistanceToMidLine = Infinity;
  493. for (let j = 0; j <= this.seatCol - num; j++) {
  494. //如果有合法位置
  495. if (this.checkRowSeatContinusAndEmpty(i, j, j + num - 1)) {
  496. //计算该组位置距离中轴线的距离:该组位置的中间位置到中轴线的距离
  497. let resultMidPos = parseInt((j + num / 2), 10);
  498. let distance = Math.abs(parseInt(this.seatCol / 2) - resultMidPos);
  499. //如果距离较短则更新
  500. if (distance < minDistanceToMidLine) {
  501. minDistanceToMidLine = distance;
  502. //该行的最终结果
  503. tempRowResult = this.generateRowResult(i, j, j + num - 1)
  504. }
  505. }
  506. }
  507. //保存该行的最终结果
  508. currentDirectionSearchResult.push({
  509. result: tempRowResult,
  510. offset: minDistanceToMidLine
  511. })
  512. }
  513. //处理后排的搜索结果:找到距离中轴线最短的一个
  514. //注意这里的逻辑需要区分前后排,对于后排是从前往后,前排则是从后往前找
  515. let isBackDir = fromRow < toRow;
  516. let finalReuslt = [],
  517. minDistanceToMid = Infinity;
  518. if (isBackDir) {
  519. //后排情况,从前往后
  520. currentDirectionSearchResult.forEach((item) => {
  521. if (item.offset < minDistanceToMid) {
  522. finalReuslt = item.result;
  523. minDistanceToMid = item.offset;
  524. }
  525. });
  526. } else {
  527. //前排情况,从后往前找
  528. currentDirectionSearchResult.reverse().forEach((item) => {
  529. if (item.offset < minDistanceToMid) {
  530. finalReuslt = item.result;
  531. minDistanceToMid = item.offset;
  532. }
  533. })
  534. }
  535. //直接返回结果
  536. return finalReuslt
  537. },
  538. /*辅助函数,判断每一行座位从i列到j列是否全部空余且连续
  539. *
  540. */
  541. checkRowSeatContinusAndEmpty: function(rowNum, startPos, endPos) {
  542. let isValid = true;
  543. for (let i = startPos; i <= endPos; i++) {
  544. if (this.seatArray[rowNum][i].type !== 0) {
  545. isValid = false;
  546. break;
  547. }
  548. }
  549. return isValid
  550. },
  551. //辅助函数:返回每一行的某个合理位置的座位数组
  552. generateRowResult: function(row, startPos, endPos) {
  553. let result = [];
  554. for (let i = startPos; i <= endPos; i++) {
  555. result.push([row, i])
  556. }
  557. return result
  558. },
  559. //辅助函数:智能推荐的选座操作
  560. chooseSeat: function(result) {
  561. let opt = this.optArr
  562. let oldArray = this.seatArray.slice();
  563. for (let i = 0; i < result.length; i++) {
  564. //选定座位
  565. oldArray[result[i][0]][result[i][1]].type = 1
  566. this.optArr.push(oldArray[result[i][0]][result[i][1]])
  567. }
  568. this.seatArray = oldArray;
  569. },
  570. }
  571. }
  572. </script>
  573. <style lang="scss" scoped>
  574. .main {
  575. position: relative;
  576. }
  577. .p-all-10{
  578. padding: 10rpx;
  579. }
  580. .ml-10 {
  581. margin-left: 10rpx;
  582. }
  583. .m-0-10 {
  584. margin: 0 10rpx;
  585. }
  586. .bg-unbtn {
  587. background-color: #f9abb3;
  588. }
  589. .bg-red-1 {
  590. background-color: #F45664;
  591. }
  592. .br-10 {
  593. border-radius: 10rpx;
  594. }
  595. .ml-20 {
  596. margin-left: 20rpx;
  597. }
  598. .mb-20 {
  599. margin-bottom: 20rpx;
  600. }
  601. .p-all-32 {
  602. padding: 32rpx;
  603. }
  604. .fd-cr {
  605. flex-direction: column-reverse;
  606. /* 主轴方向从下到上,默认从左到右 */
  607. }
  608. .bottom-bar {
  609. bottom: var(--window-bottom);
  610. }
  611. .color-fff {
  612. color: #fff
  613. }
  614. .br-15 {
  615. border-radius: 15rpx;
  616. }
  617. .over-h {
  618. overflow: hidden;
  619. }
  620. .dp-ib {
  621. display: inline-block;
  622. }
  623. .mt-20 {
  624. margin-top: 20rpx;
  625. }
  626. .pa-v-2 {
  627. /* 定位垂直对齐 */
  628. left: 50%;
  629. transform: translateX(-50%)
  630. }
  631. .b-d-1 {
  632. border: 1px dashed #e5e5e5;
  633. }
  634. .w-100 {
  635. width: 100%;
  636. }
  637. .h-100 {
  638. height: 100%;
  639. }
  640. .bg-f1 {
  641. background-color: #f1f1f1;
  642. }
  643. .h-100vh {
  644. height: 100vh;
  645. }
  646. .pt-f {
  647. position: fixed;
  648. }
  649. .left-0 {
  650. left: 0;
  651. }
  652. .p-0-32 {
  653. padding: 0 32rpx;
  654. }
  655. .pt-20 {
  656. padding-top: 20rpx;
  657. }
  658. .bg-white {
  659. background-color: #fff;
  660. }
  661. .z1000 {
  662. z-index: 1000;
  663. }
  664. .fz-34 {
  665. font-size: 34rpx;
  666. }
  667. .fw-b {
  668. font-weight: bold;
  669. }
  670. .mt-10 {
  671. margin-top: 10rpx;
  672. }
  673. .fz-28 {
  674. font-size: 28rpx;
  675. }
  676. .color-666 {
  677. color: #666666
  678. }
  679. .dp-f {
  680. display: flex;
  681. }
  682. .jc-c {
  683. justify-content: center;
  684. }
  685. .ai-c {
  686. align-items: center;
  687. }
  688. .fz-22 {
  689. font-size: 22rpx;
  690. }
  691. .color-333 {
  692. color: #333333
  693. }
  694. .m-0-a {
  695. margin: 0 auto;
  696. }
  697. .mt-48 {
  698. margin-top: 48rpx;
  699. }
  700. .fz-20 {
  701. font-size: 20rpx;
  702. }
  703. .color-999 {
  704. color: #999999
  705. }
  706. .b-1 {
  707. border: 1px solid #CCCCCC;
  708. }
  709. .br-5 {
  710. border-radius: 5rpx;
  711. }
  712. .Stage {
  713. background-color: #dddddd;
  714. width: 380rpx;
  715. height: 34rpx;
  716. transform: perspective(34rpx) rotateX(-10deg);
  717. margin: 0 auto;
  718. }
  719. .bg-line {
  720. background-color: rgba(0, 0, 0, 0.3);
  721. }
  722. .sel-seat {
  723. background: url('@/static/seat/selected.png') center center no-repeat;
  724. background-size: 100% 100%;
  725. }
  726. .unsel-seat {
  727. background: url('@/static/seat/unselected.png') center center no-repeat;
  728. background-size: 100% 100%;
  729. }
  730. .bought-seat {
  731. background: url('@/static/seat/bought.png') center center no-repeat;
  732. background-size: 100% 100%;
  733. }
  734. </style>