Commit ce27434a by wjw

ww-电影bug修改,首页儿童营地接口

parent e61124d2
......@@ -12,16 +12,7 @@ Page({
winSide: true,
sideHeight: 1250,
swiperImage: [
{
id: 0,
url: ''
},
{
id: 0,
url: ''
}
],
swiperImage: [],
bannerImage: '',
detailImage: [],
......@@ -46,9 +37,19 @@ Page({
sideHeight: this.data.sideHeight * wx.getStorageSync('unitProportion')
})
},
// 获取后台信息
queryDetail: function () {
let that = this
App.wxRequest({
url: '/api/v1/park/getList',
success: function(res) {
let funcData = res.list.filter(v => v.name === '儿童营地')
that.setData({
swiperImage: funcData[0].rotationImg,
detailImageUrl: funcData[0].content
})
}
})
},
onBackTop: function () {
......
......@@ -62,7 +62,7 @@
<!-- 滚动图片 -->
<!-- 单张图片 -->
<view class="swiper" wx:if="{{swiperImage.length === 1}}">
<view class="swiper" wx:if="{{swiperImage.length <= 1}}">
</view>
<!-- 多张图片 -->
......
let App = getApp()
Page({
data: {
history: {}
},
onLoad: function (options) {
let { index } = options
this.getBrands(index)
},
getBrands: function (index) {
let that = this
App.wxRequest({
url: '/api/v1/common/getBrands',
success: function(res) {
let history = res.data[index]
that.setData({
history
})
}
})
},
})
\ No newline at end of file
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
<navigation class="navigation" titleText="{{history.name}}" backIcon="/image/back.png"></navigation>
<view class="container">
<block wx:for="{{history.content}}" wx:key="index">
<image mode="widthFix" src="{{item}}"></image>
</block>
</view>
\ No newline at end of file
/* pages/home/home/home.wxss */
\ No newline at end of file
.container {
margin-top: 208rpx;
}
image {
width: 750rpx;
}
\ No newline at end of file
......@@ -56,20 +56,7 @@ Page({
pageSize: 10,
// 底部图片数据
footerImage: [
{
id: 0,
url: ''
},
{
id: 1,
url: ''
},
{
id: 2,
url: ''
}
]
footerImage: []
},
onLoad: function (options) {
......@@ -86,6 +73,7 @@ Page({
that.getBanner()
that.loadVisiterPlanList()
that.getNoticeList()
that.getBrands()
}
})
},
......@@ -355,7 +343,28 @@ Page({
// 跳转到登录
onLogin: function () {
wx.navigateTo({
url: '/pages/login/login',
url: '/pages/login/login'
})
},
// 获取品牌故事
getBrands: function () {
let that = this
App.wxRequest({
url: '/api/v1/common/getBrands',
success: function(res) {
let funcData = res.data
that.setData({
footerImage: funcData
})
}
})
},
// 跳转到品牌故事详情页面
onToHistory: function (event) {
let { index } = event.currentTarget.dataset
console.log(index)
wx.navigateTo({
url: '/pages/home/history/history?index=' + index,
})
},
onTest: function (event) {
......
......@@ -100,8 +100,8 @@
</view>
<view class="footer">
<block wx:for="{{footerImage}}" wx:key="index">
<image src="{{item.url}}"></image>
<block wx:for="{{footerImage}}" wx:key="brandId">
<image src="{{item.cover}}" bindtap="onToHistory" data-index="{{index}}"></image>
</block>
</view>
</view>
\ No newline at end of file
......@@ -325,7 +325,6 @@
width: 750rpx;
height: 1148rpx;
margin-bottom: 40rpx;
background-color: #ccc;
}
.footer image:last-child {
......
......@@ -19,6 +19,9 @@ Page({
},
success: (response) => {
let movieInfo = response.data
// for (let key in movieInfo.allTimes) {
// console.log(key)
// }
let showList = {}
showList[0] = movieInfo.today
showList[1] = movieInfo.tomorrow
......@@ -42,6 +45,7 @@ Page({
day = '0' + day
}
console.log(month, day)
console.log(App.modular.miment().format('YYYY-MM-DD'))
this.setData({
statusList: [
{ 'id': 0, 'name': `今日${month}${day}日`},
......@@ -67,4 +71,12 @@ Page({
bannerIndex: funcEvent.detail.current
})
},
// 跳转到报名页面
onReportMovie: function (event) {
let id = event.currentTarget.dataset.movieid
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + '7' + '&id=' + id,
})
}
})
\ No newline at end of file
<navigation class="navigation" titleText="{{movieInfo.filmName}}" color="#ffffff" backIcon="/image/back-w.png"></navigation>
<view class="container">
<!-- 顶部轮播图 -->
<view class="banner">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="5000" duration="500" bindchange="onSwiperChange">
<block wx:for="{{movieInfo.banners}}" wx:for-index="index" wx:for-item="item" wx:key="index">
......@@ -18,7 +19,7 @@
<image src="/image/ornament-2-black.png" mode="widthFix"></image>
</view>
</view>
<!-- 电影信息 -->
<view class="movie-wrapper">
<view class="movie-cover">
<image src="{{movieInfo.cover}}"></image>
......@@ -52,13 +53,14 @@
</view>
</view>
</view>
<!-- 无场次 -->
<view class="show-end col align-c" wx:if="{{false}}">
<image src=""></image>
<text>观影已结束,请期待后续排片</text>
</view>
<!-- 有场次 -->
<view wx:else>
<!-- 场次日期选择 -->
<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">
......@@ -68,19 +70,19 @@
</view>
</block>
</view>
<!-- 场次列表 -->
<block wx:for="{{showList[statusActive]}}" wx:key="id">
<view class="show-wrapper row align-c">
<view class="show-time-start">
<text>{{item.beginTime}}</text>
</view>
<view class="show-time-end">
<text>{{item.endTime}}</text>
<text>{{item.endTime + '散场'}}</text>
</view>
<view class="show-free">
<text>{{item.ownerPrice === 0 ? '免费' : item.ownerPrice}}</text>
</view>
<view class="show-btn">
<view class="show-btn" bindtap="onReportMovie" data-movieId="{{item.filmId}}">
<text>报名观影</text>
</view>
</view>
......
......@@ -64,6 +64,7 @@ page {
height: 32rpx;
margin-top: 6rpx;
margin-left: 12rpx;
color: #fff;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
......@@ -146,6 +147,7 @@ page {
font-size: 26rpx;
}
.show-free {
width: 60rpx;
margin-left: 130rpx;
color: #fff;
font-size: 26;
......
......@@ -51,6 +51,12 @@ Page({
}
})
},
/**
* 查询全部热映
* @function
* @param
* @returns
*/
getAllFilm: function () {
// weekType: 0本周热映 1下周
let movieWeek = []
......@@ -104,9 +110,16 @@ Page({
})
},
// 切换今日放映 全部热映
onSelectionStatus: function (event) {
let statusActive = Number(event.currentTarget.dataset.type)
if (statusActive === 0) {
this.getTodayFilm()
} else {
this.getAllFilm()
}
this.setData({
statusActive: Number(event.currentTarget.dataset.type)
statusActive
})
},
// 跳转到电影详情页面
......
......@@ -21,7 +21,7 @@
<view class="movie-time-end">
<text>{{item.endTime}}</text>
</view>
<image class="time-star" src=""></image>
<image class="time-star" src="/image/star-time.png"></image>
</view>
<view class="row">
<view class="movie-cover">
......@@ -77,7 +77,7 @@
<view class="movie-week row align-c con-c" wx:if="{{movieList.list.length > 0}}">
<view class="line"></view>
<view class="movie-week-title">
<image class="star-left" src=""></image>
<image class="star-left" src="/image/star-left.png"></image>
<text>{{movieList.title}}</text>
<image class="star-right" src="/image/star-right.png"></image>
</view>
......
......@@ -10,7 +10,7 @@ page {
.status {
width: 750rpx;
height: 112rpx;
border-bottom: 1px #E2E7EF solid;
border-bottom: 1px #3A3A40 solid;
}
.status-item {
flex: 1;
......@@ -61,7 +61,6 @@ page {
right: 0;
width: 64rpx;
height: 20rpx;
background-color: #ccc;
}
.movie-cover {
......@@ -84,16 +83,21 @@ page {
white-space:nowrap;
}
.movie-dimensional {
width: 52rpx;
height: 32rpx;
max-width: 110rpx;
padding: 0 13rpx;
margin-top: 6rpx;
margin-left: 12rpx;
color: #fff;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
background: #15191F;
opacity: .5;
border-radius: 4rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.movie-info {
margin-top: 8rpx;
......@@ -164,7 +168,6 @@ page {
bottom: 0;
width: 36rpx;
height: 8rpx;
background-color: #ccc;
}
.star-right {
position: absolute;
......@@ -172,7 +175,6 @@ page {
top: 0;
width: 68rpx;
height: 40rpx;
background-color: #ccc;
}
.line {
......
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