feat 选座页轮次切换

develop
GJW200011 4 years ago
parent 89a4b28f76
commit e3cea140b3

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

@ -1,6 +1,6 @@
<!-- 轮播图 -->
<view class="banner">
<swiper class="swiper" autoplay interval="2500" duration="2000" previous-margin="45rpx" next-margin="45rpx" circular bindchange="bindchange">
<swiper class="swiper" autoplay interval="3000" duration="2500" previous-margin="45rpx" next-margin="45rpx" circular bindchange="bindchange">
<swiper-item class="swiper_item" wx:for="{{banner_list}}">
<image class="img {{swiperIdx == index ? 'active' : 'quiet'}}" src="{{item.pic}}" data-key='{{item.route_path+item.key}}' bindtap="banner_nav"></image>
<view class="shadow" />

@ -11,7 +11,8 @@ Page({
data: {
select_grade: '',
max_select: 6,
onSelect(items) {},
onSelect(items) { },
},
select_grade(e) {
@ -180,19 +181,35 @@ Page({
onLoad: function (options) {
//wx.createSelectorQuery().select("#c").boundingClientRect(function(rect){console.log(rect)}).exec()
let drama_id = options.drama_id
let that =this
let that = this
wx.getSystemInfo({
success(res) {
//获取屏幕的宽成功
that.setData({
screenWidth : res.screenWidth,
screenHeight : res.screenHeight
screenWidth: res.screenWidth,
screenHeight: res.screenHeight
})
}
})
this.setData({
drama_id
})
this.drama_list(drama_id)
},
getdrama_list(e){
let drama_id=e.currentTarget.dataset.drama_id
if(drama_id==0){
return
}
this.setData({
sel_ticket:[],
total_price:'',
select_grade:'',
// obj:{}
})
this.drama_list(drama_id)
},
drama_list(drama_id) {
httpUtil("/api/v1/seat-list", "get", {
drama_id
}).then(res => {
@ -201,9 +218,9 @@ Page({
let seatHeight = 20
let seatMargin = 2
let seatSpace = seatWidth + seatMargin * 2
let scaleTimes = this.data.screenWidth / (res.max_x*seatSpace )
let scaleTimes = this.data.screenWidth / (res.max_x * seatSpace)
this.setData({
drama_seat_info: res,seatWidth,seatHeight,seatMargin,scaleTimes
drama_seat_info: res, seatWidth, seatHeight, seatMargin, scaleTimes
})
const obj = {
seats: [],
@ -241,7 +258,6 @@ Page({
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

@ -11,21 +11,33 @@
</view> -->
<view style="background:#fff; position: fixed; top: 0; width: 100%;z-index: 1;">
<view style=" font-size: 28rpx; color: #181818; padding: 20rpx 0 0 40rpx;">
场次:{{drama_seat_info.show_info.show_date}}</view>
<!-- <scroll-view class="seat_grade" scroll-x='true'>
<view class="drma_title" style=" font-size: 28rpx; color: #181818; padding: 20rpx 20rpx 0;" >
<view class="pic" bind:tap='getdrama_list' data-drama_id='{{drama_seat_info.prev_show}}'>
<image src="../../../images/ui/{{drama_seat_info.prev_show!==0?'dram_activeleft.png':'dram_left.png'}}" alt=""/>
<!-- <image src="https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/{{drama_seat_info.prev_show==0?'61669cb53d79d4be15a7f3c0567ed8abdfb2579e2db6f.png':'61669cb554a694be15a7f3c0567ed8abdfb2579e2db6f.png'}}"></image> -->
</view>
<view>{{drama_seat_info.show_info.show_date}}</view>
<view class="pic" bindtap='getdrama_list' data-drama_id='{{drama_seat_info.next_show}}' >
<image src="../../../images/ui/{{drama_seat_info.next_show!==0?'dram_activeright.png':'dram_right.png'}}" alt=""/>
<!-- <image src="https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/{{drama_seat_info.next_show==0?'61669cb562ea94be15a7f3c0567ed8abdfb2579e2db6f.png':'61669cb5712434be15a7f3c0567ed8abdfb2579e2db6f.png'}}"></image> -->
</view>
</view>
<!-- <scroll-view class="seat_grade" scroll-x='true'>
<van-icon wx:for="{{drama_seat_info.grade_list}}" color="red" name="/images/seats/{{item.grade}}.png" size="60rpx"
custom-style="margin:20rpx;{{select_grade==item.grade?' border: 1px solid red;':''}}"
data-select_grade="{{item.grade}}" bind:click="select_grade" info="{{item.tkt_num}}" />
</scroll-view> -->
<view class="seat_grade">
<view class="seat_grade_info {{item.tkt_num==0?'null_tic':''}} {{select_grade==item.grade?'select':''}}" wx:for="{{drama_seat_info.grade_list}}" data-num="{{item.tkt_num}}" data-select_grade="{{item.grade}}" bindtap="select_grade" >
<van-icon name="/images/seats/{{item.grade}}.png" custom-style="margin-left: 20rpx;" />
<view style=" margin: 0 10rpx 0 10rpx;">¥{{item.price}}</view>
</view>
</view>
<view class="direction"><view style="margin-top: -35rpx;">舞台方向</view>
</view>
<view class="seat_grade">
<view class="seat_grade_info {{item.tkt_num==0?'null_tic':''}} {{select_grade==item.grade?'select':''}}"
wx:for="{{drama_seat_info.grade_list}}" data-num="{{item.tkt_num}}" data-select_grade="{{item.grade}}"
bindtap="select_grade">
<van-icon name="/images/seats/{{item.grade}}.png" custom-style="margin-left: 20rpx;" />
<view style=" margin: 0 10rpx 0 10rpx;">¥{{item.price}}</view>
</view>
</view>
<view class="direction">
<view style="margin-top: -35rpx;">舞台方向</view>
</view>
</view>
<!-- <view class="_area">
<block wx:for="{{ obj.maps }}" wx:key="">
@ -49,12 +61,14 @@
scale-max="3" damping="900" friction="100"> -->
<movable-area class="father-size" style="height:{{screenHeight-200}}px;">
<movable-view class='size d' direction="all" inertia="true" scale="true" out-of-bounds="true" x="{{3*screenWidth/4}}" y="360px" scale-max="2.5" scale-min="1" damping="20" friction="100" >
<movable-view class='size d' direction="all" inertia="true" scale="true" out-of-bounds="true" x="{{3*screenWidth/4}}"
y="360px" scale-max="2.5" scale-min="1" damping="20" friction="100">
<checkbox-group class="seats-container {{ animateCss }}" bindchange="bindchange" style="transform-origin:0 0;transform: scale({{scaleTimes}});">
<checkbox-group class="seats-container {{ animateCss }}" bindchange="bindchange"
style="transform-origin:0 0;transform: scale({{scaleTimes}});">
<scroll-view scroll-x="true" scroll-y="true" style="width: max-content;transform: translate(-50%,-50%);">
<view class="seats-body" style="width: max-content;" >
<view class="seats-body" style="width: max-content;">
<block wx:for="{{ obj.maps }}" wx:key="">
<view class="seats-row">
<!-- <view class="seats-cell seats-icon seats-space">{{ index + 1 }}</view> -->

@ -222,7 +222,19 @@ page{
font-size: 28rpx;
color: #FFFFFF;
}
.drma_title{
display: flex;
justify-content: space-between;
align-items: center;
}
.drma_title .pic{
width:60rpx;
height:60rpx;
}
.drma_title .pic image{
width: 100%;
height:100%;
}
.seats-icon.selected{
background-size: 20px;

Loading…
Cancel
Save