|
@@ -4,9 +4,11 @@
|
|
|
<movable-area :style="'height:'+(seatRow*40+350)+'rpx;width: 100vw;tops:'+(rpxNum*132)+'px'" class="pt-f left-0">
|
|
|
<movable-view :style="'width: 100vw;height:'+(seatRow*40+350)+'rpx;'" :inertia="true" :scale="true" :scale-min="0.95"
|
|
|
:scale-max="2" direction="all" @change="onMove" @scale="onScale">
|
|
|
- <view class="Stage dp-f jc-c ai-c fz-22 color-333" style="margin-top:10rpx">
|
|
|
- {{fetch.hall}}号厅
|
|
|
- </view>
|
|
|
+ <picker @change="openHall" :value="hall_index" :range="hall_data" v-if="hall_state">
|
|
|
+ <view class="Stage dp-f jc-c ai-c fz-22 color-333" style="margin-top:10rpx">
|
|
|
+ {{hall_data[hall_index]}}
|
|
|
+ </view>
|
|
|
+ </picker>
|
|
|
<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>
|
|
|
<view v-for="(item,index) in seatArray" :key="index" class="dp-f jc-c mt-20" :style="'width:'+boxWidth+'px;height:'+seatSize+'px'">
|
|
|
<view v-for="(seat,col) in item" :key="col" class="dp-ib" :style="'width:'+seatSize+'px;height:'+seatSize+'px'"
|
|
@@ -41,7 +43,7 @@
|
|
|
</view>
|
|
|
<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'"
|
|
|
@click="buySeat">
|
|
|
- <text>{{SelectNum>0?('¥ '+aPrice+' 确认座位'):'请选座位'}}</text>
|
|
|
+ <text>{{SelectNum>0?('¥ '+aPrice+' 确认座位'):'选择座位后才能观看'}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -96,6 +98,7 @@
|
|
|
fetch : {
|
|
|
user : {},
|
|
|
hall : 1,
|
|
|
+ play : false,
|
|
|
},
|
|
|
show : false,
|
|
|
api : 'app/community/?l=api.addTips',
|
|
@@ -107,11 +110,14 @@
|
|
|
play : false,
|
|
|
playtime : 0,
|
|
|
tipsTimeData : {},
|
|
|
+ hall_state : false,
|
|
|
+ hall_data : [],
|
|
|
+ hall_index : 0,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
aPrice() {
|
|
|
- return this.SelectNum - 1 * this.price
|
|
|
+ return (this.SelectNum - 1) * this.price
|
|
|
},
|
|
|
rpxNum() {
|
|
|
return this.boxWidth / 750
|
|
@@ -124,6 +130,13 @@
|
|
|
if (this.item.title) {
|
|
|
this.title = this.item.title;
|
|
|
}
|
|
|
+ this.price = parseFloat(this.item.seat_price);
|
|
|
+ var hall = parseInt(this.item.hall_num);
|
|
|
+ this.hall_index = 0;
|
|
|
+ for (var i=0; i<hall ; i++) {
|
|
|
+ this.hall_data[i] = (i+1) + '号厅';
|
|
|
+ }
|
|
|
+ this.hall_state = true;
|
|
|
//获取宽度
|
|
|
uni.getSystemInfo({
|
|
|
success: function(e) {
|
|
@@ -136,9 +149,12 @@
|
|
|
this.initData(1)
|
|
|
},
|
|
|
methods: {
|
|
|
+ openHall : function() {
|
|
|
+
|
|
|
+ },
|
|
|
showTips : function(tipsid, id, tips, code, user) {
|
|
|
if (!this.play && this.playtime == 0) {
|
|
|
- this.Dever.alert('播放时才能发送');
|
|
|
+ this.Dever.alert('播放时才能发送消息');
|
|
|
return;
|
|
|
}
|
|
|
this.seat_table = tips;
|
|
@@ -150,6 +166,9 @@
|
|
|
this.show = false;
|
|
|
this.$emit('start');
|
|
|
},
|
|
|
+ setDisabled : function() {
|
|
|
+ this.$emit('setDisabled', this.fetch.play);
|
|
|
+ },
|
|
|
tips : function(id, content) {
|
|
|
var id = '#tips_' + this.type_id + '_' + id;
|
|
|
if (this.tipsData[id]) {
|
|
@@ -172,6 +191,7 @@
|
|
|
initData: function(hall) {
|
|
|
var self = this;
|
|
|
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) {
|
|
|
+ self.setDisabled();
|
|
|
let arr = t.seat
|
|
|
//数据说明:SeatCode座位编号,RowNum-行号,ColumnNum-纵号,YCoord-Y坐标,XCoord-X坐标,Status-状态
|
|
|
let row = 0
|
|
@@ -205,7 +225,7 @@
|
|
|
},
|
|
|
time : function(time) {
|
|
|
this.playtime = time;
|
|
|
- console.info(time);
|
|
|
+ //console.info(time);
|
|
|
if (this.tipsTimeData[time]) {
|
|
|
this.handle(this.tipsTimeData[time]);
|
|
|
}
|
|
@@ -358,6 +378,7 @@
|
|
|
this.Dever.confirm('确定购买座位吗?公测期间免费~', function() {
|
|
|
self.Dever.post('app/user/?l=api.seatSave', {code:self.Dever.config.code, seat:seat, content_id : self.type_id}, function(t) {
|
|
|
self.Dever.alert('选座成功,您可以点击头像发布内容~');
|
|
|
+ self.resetSeat();
|
|
|
self.initData(self.fetch.hall);
|
|
|
});
|
|
|
})
|