Commit 377d22f7 by 严立

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao

parents 9baebc4c afb7e057
const App = getApp()
let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({
data: {
......@@ -13,16 +17,38 @@ Page({
imageResourcesBase: App.globalData.appResourcesBase,
passList: [],
paddingTop: 0,
marginTop: 0,
noticeDetail: '',
winNoticeDetail: false,
// 导航栏相关属性
navigationStyle: {
normal: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 0)'
},
change: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 1)'
},
scroll: '100rpx',
},
navigationScroll: 0,
},
onLoad: function (options) {
this.animation = wx.createAnimation({
duration: 700,
timingFunction: 'ease'
})
let paddingTop = 28
paddingTop += wx.getStorageSync('navigationStatusHeight') + wx.getStorageSync('navigationCapsuleHeight')
this.setData({
paddingTop
})
this.getCardList()
},
// 跳转订单详情
......@@ -95,9 +121,10 @@ Page({
return item.officeName == '儿童营地'
})
let marginTop = filterList.length === 0 ? 84 : 12
that.setData({
passList: filterList
passList: filterList,
marginTop
})
......@@ -240,4 +267,20 @@ Page({
winNoticeDetail: false
})
},
// 滚动屏幕
onPageScroll: function (funcEvent) {
// 优化滚动事件触发频率
if (logicData.pageScrollLock) return
logicData.pageScrollLock = true
this.setData({
navigationScroll: funcEvent.scrollTop
})
// 恢复滚动事件
logicData.pageScrollTimer = setTimeout(function () {
logicData.pageScrollLock = false
clearTimeout(logicData.pageScrollTimer)
}, 10)
},
})
\ No newline at end of file
<navigation class="navigation" titleText="我的年卡/月卡" backIcon="/image/back.png"></navigation>
<navigation class="navigation" titleText="我的年卡/月卡" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container con-s">
<view class="container con-s" style="padding-top: {{paddingTop + 'px'}}">
<!-- 单张卡 -->
<view class="card-wrapper" wx:if="{{passList.length == 1}}">
<view class="card-header">
<image wx:if="{{passList[0].cardType==1}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{passList[0].cardType==2}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:if="{{passList[0].cardType==1}}" class="card-bg year-bg" src="{{imageResourcesBase +'mine/card/year-bg.png'}}"></image>
<image wx:elif="{{passList[0].cardType==2}}" class="card-bg year-bg" src="{{imageResourcesBase +'mine/card/month-bg.png'}}"></image>
<image wx:else class="card-bg month-bg" src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
</image>
<view class="use-notice row align-c" data-item="{{passList[0]}}" bindtap="onNotice">
<text>使用须知</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image src="{{imageBase + 'icon/arrow-r-3.png'}}"></image>
</view>
<view class="card-header-title">
<text>{{passList[0].name}}</text>
......@@ -49,7 +49,7 @@
<text>号</text>
</view>
<view class="card-header-info-right">
<text wx:if="{{passList[0].privateStatus}}">{{passList[0].privateIdNmu}}</text>
<text wx:if="{{passList[0].privateStatus}}">{{passList[0].privateIdNum}}</text>
<text wx:else>{{passList[0].identityCard}}</text>
</view>
</view>
......@@ -65,13 +65,18 @@
<image src="{{'data:image/jpg;base64,'+passList[0].qrcode}}"></image>
</view>
<view class="code-use-time">
<text>{{passList[0].useTime}}</text>
<text>{{'有效期' + passList[0].expireTime}}</text>
</view>
<view class="look-order row align-c con-c" bindtap="onOrderDetail" data-id="{{passList[0].orderId}}">
<text>查看订单</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
<!-- 右下角图片 -->
<view class="bottom-img">
<image wx:if="{{passList[0].cardType==0}}" class="bottom-month" src="{{imageResourcesBase +'mine/card/bird-2.png'}}"></image>
<image wx:if="{{passList[0].cardType==1}}" class="bottom-year" src="{{imageResourcesBase +'mine/card/bird-1.png'}}"></image>
</view>
</view>
<!-- 多张卡 -->
......@@ -80,13 +85,13 @@
<swiper-item>
<view class="card-wrapper {{index === swiperCurrent ? 'item-right' : ''}} {{swiperCurrent === passList.length-1 ? 'item-center' : ''}}">
<view class="card-header">
<image wx:if="{{item.cardType==1}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{item.cardType==2}}" class="card-bg year-bg" src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:if="{{item.cardType==1}}" class="card-bg year-bg" src="{{imageResourcesBase +'mine/card/year-bg.png'}}"></image>
<image wx:elif="{{item.cardType==2}}" class="card-bg year-bg" src="{{imageResourcesBase +'mine/card/month-bg.png'}}"></image>
<image wx:else class="card-bg month-bg" src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
</image>
<view class="use-notice row align-c" data-item="{{item}}" bindtap="onNotice">
<text>使用须知</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image src="{{imageBase + 'icon/arrow-r-3.png'}}"></image>
</view>
<view class="card-header-title">
<text>{{item.name}}</text>
......@@ -144,17 +149,36 @@
<image src="{{'data:image/jpg;base64,'+item.qrcode}}"></image>
</view>
<view class="code-use-time">
<text>{{item.useTime}}</text>
<text>{{'有效期' + item.expireTime}}</text>
</view>
<view class="look-order row align-c con-c" bindtap="onOrderDetail" data-id="{{item.orderId}}">
<text>查看订单</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
<!-- 右下角图片 -->
<view class="bottom-img">
<block>
<image wx:if="{{item.cardType==1}}" class="bottom-year" src="{{imageResourcesBase +'mine/card/bird-1.png'}}"></image>
<image wx:if="{{item.cardType==2}}" class="bottom-month" src="{{imageResourcesBase +'mine/card/bird-2.png'}}"></image>
</block>
</view>
</view>
</swiper-item>
</block>
</swiper>
<!-- 底部logo -->
<view class="footer-logo" style="margin-top: {{marginTop + 'rpx'}}">
<block>
<image src="{{imageResourcesBase +'mine/card/card-footer.png'}}"></image>
</block>
</view>
<view class="cloud-left">
<image src="{{imageResourcesBase +'mine/card/cloud-1.png'}}"></image>
</view>
<view class="cloud-right">
<image src="{{imageResourcesBase +'mine/card/cloud-2.png'}}"></image>
</view>
</view>
<!-- 须知详情 -->
......
.container {
height: 100vh;
padding-top: 232rpx;
position: relative;
min-height: 100vh;
background: linear-gradient(180deg, #fffcfc 0%, #f6dada 100%);
}
......@@ -17,6 +17,7 @@
}
.card-wrapper {
position: relative;
width: 626rpx;
height: 992rpx;
}
......@@ -138,6 +139,52 @@ image {
height: 100%;
}
.bottom-img {
position: absolute;
right: -16rpx;
bottom: -5rpx;
}
.bottom-month {
width: 180rpx;
height: 106rpx;
}
.bottom-year {
width: 114rpx;
height: 128rpx;
}
.footer-logo {
margin-top: 84rpx;
margin-left: 29rpx;
}
.footer-logo image {
width: 620rpx;
height: 316rpx;
}
.cloud-left {
position: absolute;
left: 0;
bottom: 256rpx;
}
.cloud-left image{
width: 186rpx;
height: 100rpx;
}
.cloud-right {
position: absolute;
right: 32rpx;
bottom: 204rpx;
}
.cloud-right image{
width: 156rpx;
height: 72rpx;
}
/* 使用须知 */
.notice-detail {
z-index: 1700;
......
......@@ -253,6 +253,14 @@ Page({
} else {
item.cardType = 3
}
// 姓名隐私
if (item.personName.length > 2) {
item.privateName = item.personName.substr(0, 1) + '*' + item.personName.substr(item.personName.length - 1)
} else {
item.privateName = item.personName.substr(0, 1) + '*'
}
// 身份证隐私
item.privateIdNum = item.identityCard.substr(0, 6) + '****' + item.identityCard.substr(item.identityCard.length - 4)
item.logo = shopFilter.length > 0 ? shopFilter[0].logo : ''
return item
})
......
......@@ -160,10 +160,10 @@
<text>有效期至{{myOrder.passOrder[0].expireTime}}</text>
</view>
<view class="pass-name">
<text>{{myOrder.passOrder[0].personName}}</text>
<text>{{myOrder.passOrder[0].privateName}}</text>
</view>
<view class="pass-idNum">
<text>{{myOrder.passOrder[0].identityCard}}</text>
<text>{{myOrder.passOrder[0].privateIdNum}}</text>
</view>
</view>
......
......@@ -210,8 +210,10 @@ Page({
onActivityDetail: function (event) {
let index = event.currentTarget.dataset.index
let selectedActivity = this.data.selectedActivity
if (selectedActivity.length > 0) {
selectedActivity[index].quantity = 1
this.setShopInfo(selectedActivity[index].officeId, 2)
}
wx.setStorageSync('shoppingCartBuffer', [selectedActivity[index]])
wx.navigateTo({
......
......@@ -43,7 +43,7 @@ Page({
onShow: function () {
this.setData({ appStatus: App.globalData.appStatus })
this.queryActivity()
this.queryMovie()
// this.queryMovie()
this.setData({
pageNo: 1,
......
......@@ -27,20 +27,26 @@
<image src="./image/title-activity.png"></image>
<text bindtap="onAllRecent" bindtap="onAllActivity">查看全部</text>
</view>
<swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperRecentChange">
<swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperRecentChange" wx:if="{{activityList.length > 0}}">
<block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="activity-item" data-item="{{item}}" bindtap="onActivityDetail">
<image mode="aspectFill" class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image>
</swiper-item>
</block>
</swiper>
<block wx:if="{{activityList.length === 0}}">
<view class="item-nothing col con-c align-c">
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>近期暂无活动安排</text>
</view>
</block>
<!-- 热映影片 -->
<view class="title row con-b align-c">
<image src="./image/title-movie.png"></image>
<text bindtap="onAllMovie">查看全部</text>
</view>
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange">
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange" wx:if="{{movieList.length > 0}}">
<block wx:for="{{movieList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="movie-item col con-e">
<view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}">
......@@ -81,6 +87,13 @@
</block>
</swiper>
<block wx:if="{{movieList.length === 0}}">
<view class="item-nothing col con-c align-c">
<image class="nothing-movie" src="{{resourcesBase + 'play/nothing-movie.png'}}"></image>
<text>暂无影片,请期待后续排片</text>
</view>
</block>
<!-- 游客攻略 -->
<view class="route">
<block wx:if="{{touristRouteList.length > 0}}">
......
......@@ -8,6 +8,11 @@
height: 44rpx;
}
.title > text {
color: #959DA9;
font-size: 26rpx;
}
/* 顶部标题 */
.logo {
z-index: 1900;
......@@ -119,6 +124,31 @@
margin-left: 51rpx;
}
.item-nothing {
width: 670rpx;
height: 544rpx;
}
.item-nothing text {
margin-top: 42rpx;
font-size: 30rpx;
color: #959da9;
line-height: 42rpx;
font-weight: 600;
}
.nothing-activity {
display: block;
width: 96rpx;
height: 76rpx;
}
.nothing-movie {
display: block;
width: 88rpx;
height: 76rpx;
}
/* 热映影片 */
.movie-swiper {
width: 750rpx;
......
......@@ -27,8 +27,8 @@
<view class="movie-info-wrapper">
<view class="movie-name row">
<text>{{movieInfo.filmName}}</text>
<view class="movie-tags">
<text wx:if="{{movieInfo.tags}}">{{movieInfo.tags[0]}}</text>
<view class="movie-tags" wx:if="{{movieInfo.tags[0].length > 0}}">
<text>{{movieInfo.tags[0]}}</text>
</view>
</view>
<view class="movie-info row">
......
......@@ -55,7 +55,7 @@ Page({
banner: [],
bannerIndex: 0,
bannerHeight: 300,
movieHeight: 1180,
info: {},
shopInfo: {},
......@@ -547,12 +547,14 @@ Page({
}
funcList.push(funcItem)
// if (funcItem.tagsId.includes('102')) {
// }
}
let movieHeight = 1180
if (funcList.length > 0) {
movieHeight = 1380
}
this.setData({
detailCommodity: funcList
detailCommodity: funcList,
movieHeight
})
}
})
......
......@@ -95,7 +95,7 @@
<view class="commodity-card-item col" wx:if="{{detailActivity.length !== 0}}"></view>
<block wx:if="{{detailActivity.length === 0}}">
<view class="commodity-card-item-nothing col con-c align-c">
<image src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<image class="nothing-activity" src="{{imageBase + 'icon/fireworks-2.png'}}"></image>
<text>近期暂无活动安排</text>
</view>
</block>
......@@ -292,7 +292,7 @@
</view>
</view>
<view class="commodity-movie">
<view class="commodity-movie" style="height: {{movieHeight + 'rpx'}}">
<!-- 详情标题,分享,位置 -->
<view class="commodity-title movie-title row align-c">
<text>{{info.title}}</text>
......@@ -357,8 +357,11 @@
</view>
</view>
<view class="movie-card-item-operation row con-b align-c">
<view class="row align-c">
<text>免费</text>
<view class="row align-c" wx:if="{{item.priceType === 1}}">
<text>{{item.priceSpecial == 0 ? '免费' : '¥' + item.priceSpecialText}}</text>
</view>
<view class="row align-c" wx:if="{{item.priceType === 2}}">
<text>{{item.priceText == 0 ? '免费' : '¥' + item.price}}</text>
</view>
<view>
<button class="row con-c align-c">报名观影</button>
......@@ -366,7 +369,13 @@
</view>
</view>
</block>
<view class="movie-card-item col"></view>
<view class="movie-card-last-item col" wx:if="{{detailCommodity.length > 2}}"></view>
<block wx:if="{{detailCommodity.length === 0}}">
<view class="commodity-card-item-nothing col con-c align-c">
<image class="nothing-movie" src="{{imageBase + 'no-movie.png'}}"></image>
<text>暂无影片,请期待后续排片</text>
</view>
</block>
</view>
</view>
</view>
......
......@@ -143,7 +143,6 @@
.commodity-movie {
position: relative;
height: 1380rpx;
}
.commodity-title {
......@@ -260,7 +259,7 @@
min-width: 1rpx !important;
}
.movie-card-item:last-child {
.movie-card-last-item {
width: 1rpx !important;
min-width: 1rpx !important;
}
......@@ -270,11 +269,6 @@
height: 544rpx;
}
.commodity-card-item-nothing image {
width: 96rpx;
height: 76rpx;
}
.commodity-card-item-nothing text {
margin-top: 42rpx;
font-size: 30rpx;
......@@ -283,20 +277,16 @@
font-weight: 600;
}
.commodity-card-item-nothing image {
.nothing-activity {
display: block;
width: 96rpx;
height: 76rpx;
}
.commodity-card-item-nothing text {
width: 240rpx;
height: 42rpx;
margin-top: 40rpx;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #959da9;
.nothing-movie {
display: block;
width: 88rpx;
height: 76rpx;
}
.commodity-card-item {
......
......@@ -31,7 +31,9 @@ Page({
* @returns
*/
onLocation: function () {
console.log('点了位置')
wx.navigateTo({
url: '/pages/home/guide/guide?id=' + 7 + '&card=false'
})
},
queryCommodityDetail: function () {
......
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