Commit 72624e69 by 严立

LL - 代码合并

parents 0912b5b9 cbe43c25
......@@ -24,7 +24,7 @@ let output = [
name: '海错图1号馆',
icon: './image/icon/03.png',
card: 'guide/card/03.png',
detail: '/pages/play/service-detail/service-detail?id=1',
detail: '/pages/play/service-detail/service-detail?id=1&type=4',
isActive: false,
}, {
x: 1303,
......@@ -51,7 +51,7 @@ let output = [
name: '元养水韵SPA',
icon: './image/icon/06.png',
card: 'guide/card/06.png',
detail: '/pages/play/service-detail/service-detail?id=7',
detail: '/pages/play/service-detail/service-detail?id=7&type=2',
isActive: false,
}, {
x: 1370,
......
.container {
background: linear-gradient(180deg, #fff 10%, #F3F4F6 20%);
min-height: 100vh;
/* background: #F3F4F6 */
background: #F3F4F6
}
.navigation {
......@@ -324,10 +323,6 @@
height: 30rpx;
}
.approve {
padding-top: 100rpx;
}
.approve-icon {
width: 168rpx;
height: 103rpx;
......
......@@ -268,8 +268,10 @@ Page({
funcList.push(funcItem)
}
let funcTouristRouteList = this.data.touristRouteList
funcTouristRouteList = funcTouristRouteList.concat(funcList)
this.setData({
touristRouteList: this.data.touristRouteList.concat(funcList)
touristRouteList: funcTouristRouteList
})
console.log(this.data.touristRouteList)
......
......@@ -12,7 +12,12 @@ Page({
pageNo: '1',
pageSize: '-1'
},
loading: true,
marginTop: '',
// 屏幕显示高度
windowHeight: 0,
// 底部图片是否固定
footerFixed: true,
// 导航栏相关属性
navigationStyle: {
normal: {
......@@ -55,8 +60,14 @@ Page({
}
},
onLoad: function() {
let marginTop = wx.getStorageSync('navigationStatusHeight') + wx.getStorageSync('navigationCapsuleHeight') + 20
this.setData({
marginTop
})
this.setShowHeight()
this.setFooterLocation()
this.getTodayFilm()
this.getAllFilm()
// this.getAllFilm()
},
onPageScroll: function(funcEvent) {
// console.log(funcEvent)
......@@ -74,6 +85,32 @@ Page({
clearTimeout(logicData.pageScrollTimer)
}, 10)
},
setShowHeight: function () {
wx.getSystemInfo({
success: (result) => {
this.setData({
windowHeight: result.windowHeight
})
},
})
},
setFooterLocation: function () {
let that = this
let { windowHeight, marginTop, footerFixed } = this.data
let footerHeight = Math.floor(214 * wx.getStorageSync('unitProportion'))
// 显示高度
let showHeight = windowHeight - footerHeight - marginTop
let query = wx.createSelectorQuery()
query.select('#page').boundingClientRect()
query.exec(function(res){
if (res[0].height > showHeight) {
footerFixed = false
}
that.setData({
footerFixed
})
})
},
/**
* 查询今日放映
* @function
......@@ -81,6 +118,10 @@ Page({
* @returns
*/
getTodayFilm: function() {
wx.showLoading({
title: '加载中...',
success: () => {this.setData({loading: true})}
})
App.wxRequest({
url: '/api/v1/film/getTodayFilm',
data: {
......@@ -115,6 +156,11 @@ Page({
})
this.setData({
movieToday
}, function () {
this.setFooterLocation()
})
wx.hideLoading({
success: () => {this.setData ({loading: false})},
})
}
})
......@@ -126,6 +172,10 @@ Page({
* @returns
*/
getAllFilm: function() {
wx.showLoading({
title: '加载中...',
success: () => {this.setData({loading: true})}
})
// weekType: 0本周热映 1下周
let movieWeek = []
let movieNextWeek = []
......@@ -166,6 +216,11 @@ Page({
title: '本周热映',
list: movieWeek
}
}, function () {
this.setFooterLocation()
})
wx.hideLoading({
success: () => {this.setData ({loading: false})},
})
}
})
......@@ -205,6 +260,11 @@ Page({
title: '下周热映',
list: movieNextWeek
}
}, function () {
this.setFooterLocation()
})
wx.hideLoading({
success: () => {this.setData ({loading: false})},
})
}
})
......
<navigation class="navigation" titleText="所有影片" color="#ffffff" backIcon="/image/back-w.png" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="contaniner con-s">
<view id="page" class="contaniner con-s" style="margin-top: {{marginTop + 'px'}}">
<view class="status row align-c">
<block wx:for="{{statusList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="status-item row con-c align-c" data-type="{{index}}" bindtap="onSelectionStatus">
......@@ -33,7 +33,7 @@
<text>{{item.filmName}}</text>
</view>
<view class="movie-tags row">
<text wx:if="{{item.tags}}">{{item.tags[0]}}</text>
<text wx:if="{{item.tags[0]}}">{{item.tags[0]}}</text>
</view>
</view>
<view class="movie-info row">
......@@ -80,14 +80,14 @@
</view>
</block>
<block wx:if="{{movieToday.length === 0}}">
<block wx:if="{{movieToday.length === 0 && !loading}}">
<view class="show-end col align-c">
<image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text>
</view>
</block>
</view>
<view wx:else>
<view wx:if="{{statusActive === 1}}">
<block wx:for="{{movieAll}}" wx:for-index="key" wx:for-item="movieList" wx:key="key" wx:if="{{movieAll.movieWeek.list.length > 0 || movieAll.movieNextWeek.list.length > 0}}">
<view class="movie-week row align-c con-c" wx:if="{{movieList.list.length > 0}}">
<view class="line"></view>
......@@ -109,7 +109,7 @@
<text>{{item.filmName}}</text>
</view>
<view class="movie-tags row">
<text wx:if="{{item.tags}}">{{item.tags[0]}}</text>
<text wx:if="{{item.tags[0]}}">{{item.tags[0]}}</text>
</view>
</view>
<view class="movie-info row">
......@@ -152,14 +152,14 @@
</view>
</block>
</block>
<block wx:if="{{movieAll.movieWeek.list.length === 0 && movieAll.movieNextWeek.list.length === 0}}">
<block wx:if="{{movieAll.movieWeek.list.length === 0 && movieAll.movieNextWeek.list.length === 0 && !loading}}">
<view class="show-end col align-c">
<image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text>
</view>
</block>
</view>
<view class="footer-img {{movieToday.length > 3 || movieAll.movieWeek.list.length > 3 || movieAll.movieNextWeek.list.length > 3 ? '' : 'footer-fixed'}}">
<view class="footer-img {{footerFixed ? 'footer-fixed' : ''}}">
<image src="/image/movie-bottom.png"></image>
</view>
</view>
\ No newline at end of file
......@@ -17,26 +17,26 @@ page {
width: 200rpx;
height: 60rpx;
}
.contaniner {
/* .contaniner {
margin-top: 200rpx;
}
} */
/* 状态筛选菜单 */
.status {
width: 750rpx;
height: 112rpx;
height: 72rpx;
border-bottom: 1px #3A3A40 solid;
}
.status-item {
flex: 1;
height: 112rpx;
height: 72rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: #959DA9;
}
.status-item-active {
height: 112rpx;
height: 72rpx;
color: #fff;
font-weight: 600;
border-bottom: 4rpx #fff solid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment