Commit 742d5476 by wjw

ww--UI修改

parent 61ac35fc
...@@ -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,
......
...@@ -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;
......
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
</view> </view>
<!-- 简介 --> <!-- 简介 -->
<view class="detail" wx:if="{{contentType === 'detail'}}"> <view class="detail {{option.id === '1' || option.id === '4' || option.id === '6' ? 'detail-bottom' : ''}}" wx:if="{{contentType === 'detail'}}">
<block wx:for="{{info.describe}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{info.describe}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image src="{{item}}" mode="widthFix"></image> <image src="{{item}}" mode="widthFix"></image>
</block> </block>
...@@ -392,9 +392,9 @@ ...@@ -392,9 +392,9 @@
</view> </view>
</view> </view>
<view class="movie-footer"> <!-- <view class="movie-footer">
<image src="/image/movie-bottom.png"></image> <image src="/image/movie-bottom.png"></image>
</view> </view> -->
<!-- 简介,评价 --> <!-- 简介,评价 -->
<view class="selection-content movie-border row"> <view class="selection-content movie-border row">
......
...@@ -310,6 +310,7 @@ ...@@ -310,6 +310,7 @@
.commodity-card-item > image { .commodity-card-item > image {
width: 562rpx; width: 562rpx;
height: 316rpx; height: 316rpx;
background: #F5F6F8;
} }
.commodity-card-item-cover { .commodity-card-item-cover {
...@@ -320,10 +321,12 @@ ...@@ -320,10 +321,12 @@
.commodity-card-item-cover image { .commodity-card-item-cover image {
max-width: 562rpx; max-width: 562rpx;
height: 316rpx; height: 316rpx;
background: #F5F6F8;
} }
.movie-card-item > image { .movie-card-item > image {
width: 300rpx; width: 300rpx;
height: 369rpx; height: 369rpx;
background: #F5F6F8;
} }
.commodity-card-item-title { .commodity-card-item-title {
...@@ -425,9 +428,8 @@ ...@@ -425,9 +428,8 @@
height: 33rpx; height: 33rpx;
font-size: 22rpx; font-size: 22rpx;
font-weight: 400; font-weight: 400;
color: #959DA9; color: #585B6B;
line-height: 32rpx; line-height: 32rpx;
} }
.movie-card-item-info-right { .movie-card-item-info-right {
flex: 1; flex: 1;
...@@ -435,7 +437,7 @@ ...@@ -435,7 +437,7 @@
margin-left: 8rpx; margin-left: 8rpx;
font-size: 22rpx; font-size: 22rpx;
font-weight: 400; font-weight: 400;
color: #C2C7CF; color: #878A96;
line-height: 32rpx; line-height: 32rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -648,6 +650,8 @@ ...@@ -648,6 +650,8 @@
/* 详情 */ /* 详情 */
.detail { .detail {
margin-top: 62rpx; margin-top: 62rpx;
}
.detail-bottom {
padding-bottom: 160rpx; padding-bottom: 160rpx;
} }
......
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