Commit 72624e69 by 严立

LL - 代码合并

parents 0912b5b9 cbe43c25
...@@ -24,7 +24,7 @@ let output = [ ...@@ -24,7 +24,7 @@ let output = [
name: '海错图1号馆', name: '海错图1号馆',
icon: './image/icon/03.png', icon: './image/icon/03.png',
card: 'guide/card/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, isActive: false,
}, { }, {
x: 1303, x: 1303,
...@@ -51,7 +51,7 @@ let output = [ ...@@ -51,7 +51,7 @@ let output = [
name: '元养水韵SPA', name: '元养水韵SPA',
icon: './image/icon/06.png', icon: './image/icon/06.png',
card: 'guide/card/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, isActive: false,
}, { }, {
x: 1370, x: 1370,
......
.container { .container {
background: linear-gradient(180deg, #fff 10%, #F3F4F6 20%);
min-height: 100vh; min-height: 100vh;
/* background: #F3F4F6 */ background: #F3F4F6
} }
.navigation { .navigation {
...@@ -324,10 +323,6 @@ ...@@ -324,10 +323,6 @@
height: 30rpx; height: 30rpx;
} }
.approve {
padding-top: 100rpx;
}
.approve-icon { .approve-icon {
width: 168rpx; width: 168rpx;
height: 103rpx; height: 103rpx;
......
...@@ -268,8 +268,10 @@ Page({ ...@@ -268,8 +268,10 @@ Page({
funcList.push(funcItem) funcList.push(funcItem)
} }
let funcTouristRouteList = this.data.touristRouteList
funcTouristRouteList = funcTouristRouteList.concat(funcList)
this.setData({ this.setData({
touristRouteList: this.data.touristRouteList.concat(funcList) touristRouteList: funcTouristRouteList
}) })
console.log(this.data.touristRouteList) console.log(this.data.touristRouteList)
......
...@@ -12,7 +12,12 @@ Page({ ...@@ -12,7 +12,12 @@ Page({
pageNo: '1', pageNo: '1',
pageSize: '-1' pageSize: '-1'
}, },
loading: true,
marginTop: '',
// 屏幕显示高度
windowHeight: 0,
// 底部图片是否固定
footerFixed: true,
// 导航栏相关属性 // 导航栏相关属性
navigationStyle: { navigationStyle: {
normal: { normal: {
...@@ -55,8 +60,14 @@ Page({ ...@@ -55,8 +60,14 @@ Page({
} }
}, },
onLoad: function() { onLoad: function() {
let marginTop = wx.getStorageSync('navigationStatusHeight') + wx.getStorageSync('navigationCapsuleHeight') + 20
this.setData({
marginTop
})
this.setShowHeight()
this.setFooterLocation()
this.getTodayFilm() this.getTodayFilm()
this.getAllFilm() // this.getAllFilm()
}, },
onPageScroll: function(funcEvent) { onPageScroll: function(funcEvent) {
// console.log(funcEvent) // console.log(funcEvent)
...@@ -74,6 +85,32 @@ Page({ ...@@ -74,6 +85,32 @@ Page({
clearTimeout(logicData.pageScrollTimer) clearTimeout(logicData.pageScrollTimer)
}, 10) }, 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 * @function
...@@ -81,6 +118,10 @@ Page({ ...@@ -81,6 +118,10 @@ Page({
* @returns * @returns
*/ */
getTodayFilm: function() { getTodayFilm: function() {
wx.showLoading({
title: '加载中...',
success: () => {this.setData({loading: true})}
})
App.wxRequest({ App.wxRequest({
url: '/api/v1/film/getTodayFilm', url: '/api/v1/film/getTodayFilm',
data: { data: {
...@@ -96,8 +137,8 @@ Page({ ...@@ -96,8 +137,8 @@ Page({
v.filmDirector = v.filmDirector v.filmDirector = v.filmDirector
v.filmLead = v.filmLead v.filmLead = v.filmLead
v.priceSpecialText = App.modular.utils.formatAmount(v.ownerPrice), v.priceSpecialText = App.modular.utils.formatAmount(v.ownerPrice),
v.priceText = App.modular.utils.formatAmount(v.visitorPrice), v.priceText = App.modular.utils.formatAmount(v.visitorPrice),
v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').split(' ') v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').split(' ')
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型 // 根据后台判断价格显示类型
...@@ -115,6 +156,11 @@ Page({ ...@@ -115,6 +156,11 @@ Page({
}) })
this.setData({ this.setData({
movieToday movieToday
}, function () {
this.setFooterLocation()
})
wx.hideLoading({
success: () => {this.setData ({loading: false})},
}) })
} }
}) })
...@@ -126,6 +172,10 @@ Page({ ...@@ -126,6 +172,10 @@ Page({
* @returns * @returns
*/ */
getAllFilm: function() { getAllFilm: function() {
wx.showLoading({
title: '加载中...',
success: () => {this.setData({loading: true})}
})
// weekType: 0本周热映 1下周 // weekType: 0本周热映 1下周
let movieWeek = [] let movieWeek = []
let movieNextWeek = [] let movieNextWeek = []
...@@ -166,6 +216,11 @@ Page({ ...@@ -166,6 +216,11 @@ Page({
title: '本周热映', title: '本周热映',
list: movieWeek list: movieWeek
} }
}, function () {
this.setFooterLocation()
})
wx.hideLoading({
success: () => {this.setData ({loading: false})},
}) })
} }
}) })
...@@ -205,6 +260,11 @@ Page({ ...@@ -205,6 +260,11 @@ Page({
title: '下周热映', title: '下周热映',
list: movieNextWeek 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> <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"> <view class="status row align-c">
<block wx:for="{{statusList}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <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"> <view class="status-item row con-c align-c" data-type="{{index}}" bindtap="onSelectionStatus">
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<text>{{item.filmName}}</text> <text>{{item.filmName}}</text>
</view> </view>
<view class="movie-tags row"> <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> </view>
<view class="movie-info row"> <view class="movie-info row">
...@@ -80,14 +80,14 @@ ...@@ -80,14 +80,14 @@
</view> </view>
</block> </block>
<block wx:if="{{movieToday.length === 0}}"> <block wx:if="{{movieToday.length === 0 && !loading}}">
<view class="show-end col align-c"> <view class="show-end col align-c">
<image src="/image/no-movie.png"></image> <image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text> <text>观影已结束,请期待后续排片</text>
</view> </view>
</block> </block>
</view> </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}}"> <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="movie-week row align-c con-c" wx:if="{{movieList.list.length > 0}}">
<view class="line"></view> <view class="line"></view>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<text>{{item.filmName}}</text> <text>{{item.filmName}}</text>
</view> </view>
<view class="movie-tags row"> <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> </view>
<view class="movie-info row"> <view class="movie-info row">
...@@ -152,14 +152,14 @@ ...@@ -152,14 +152,14 @@
</view> </view>
</block> </block>
</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"> <view class="show-end col align-c">
<image src="/image/no-movie.png"></image> <image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text> <text>观影已结束,请期待后续排片</text>
</view> </view>
</block> </block>
</view> </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> <image src="/image/movie-bottom.png"></image>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -17,26 +17,26 @@ page { ...@@ -17,26 +17,26 @@ page {
width: 200rpx; width: 200rpx;
height: 60rpx; height: 60rpx;
} }
.contaniner { /* .contaniner {
margin-top: 200rpx; margin-top: 200rpx;
} } */
/* 状态筛选菜单 */ /* 状态筛选菜单 */
.status { .status {
width: 750rpx; width: 750rpx;
height: 112rpx; height: 72rpx;
border-bottom: 1px #3A3A40 solid; border-bottom: 1px #3A3A40 solid;
} }
.status-item { .status-item {
flex: 1; flex: 1;
height: 112rpx; height: 72rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
line-height: 36rpx; line-height: 36rpx;
color: #959DA9; color: #959DA9;
} }
.status-item-active { .status-item-active {
height: 112rpx; height: 72rpx;
color: #fff; color: #fff;
font-weight: 600; font-weight: 600;
border-bottom: 4rpx #fff solid; 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