Commit f3a8a69a by 严立

标题栏修改

parent 9b7ee1c6
......@@ -93,7 +93,6 @@ Component({
this.setNavigationStyle()
},
'scrollHeight': function () {
console.log('this.data.scrollHeight', this.data.scrollHeight)
this.eventScroll(this.data.scrollHeight)
},
},
......@@ -107,7 +106,6 @@ Component({
* @returns
*/
setNavigationHeight: function () {
console.log('setNavigationHeight', this.data.titleText)
let funcIsIOS = wx.getSystemInfoSync().system.indexOf('iOS') > -1
let funcStatusHeight = wx.getSystemInfoSync().statusBarHeight
let funcTitleHeight = 0
......@@ -134,7 +132,6 @@ Component({
* @returns
*/
setNavigationStyle: function () {
console.log('setNavigationStyle')
let funcStatusStyle = {
'height': this.data.statusHeight + 'px',
'background': this.data.background,
......
const app = getApp()
let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
}
Page({
data: {
// 导航栏相关属性
navigationStyle: {
normal: {
backIcon: '/image/back-w.png',
color: '#FFFFFF',
background: 'rgba(255, 255, 255, 0)'
},
change: {
backIcon: '/image/back.png',
color: '#000000',
background: 'rgba(255, 255, 255, 1)'
},
scroll: '600rpx',
},
navigationScroll: 0,
// banner 列表数据
banner: [],
bannerIndex: 0,
......@@ -123,6 +144,22 @@ Page({
stateText: text,
isSubmit: state == 1 ? true : false,
})
},
onPageScroll: function (funcEvent) {
// console.log(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="主题活动" color="#ffffff" backIcon="/image/back-w.png"></navigation>
<navigation class="navigation" titleText="主题活动" color="#ffffff" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<view class="container">
<view id="banner" class="banner">
......@@ -24,14 +24,17 @@
</view>
<view class="detail-other col">
<view class="row align-c">
<image src="/image/icon/g-time.png"></image>
<text>活动时间</text>
<text>{{info.date}}</text>
</view>
<view style="height:auto;" class="row">
<image src="/image/icon/g-location.png"></image>
<text>活动地址</text>
<text style="height:auto;">{{info.address}}</text>
</view>
<view class="row align-c">
<image src="/image/icon/g-custom.png"></image>
<text>报名名额</text>
<text>{{info.quota}}人</text>
</view>
......
......@@ -79,7 +79,13 @@
margin-top: 24rpx;
}
.detail-other view text:nth-child(1) {
.detail-other view image:nth-child(1) {
width: 40rpx;
height: 40rpx;
margin-right: 8rpx;
}
.detail-other view text:nth-child(2) {
width: 120rpx;
height: 42rpx;
margin-right: 32rpx;
......@@ -89,8 +95,8 @@
line-height: 42rpx;
}
.detail-other view text:nth-child(2) {
width: 518rpx;
.detail-other view text:nth-child(3) {
width: 470rpx;
height: 40rpx;
font-size: 30rpx;
font-weight: 400;
......
.navigation {
position: relative;
position: fixed;
top: 0;
left: 0;
}
.container {
margin-top: 120rpx;
background: linear-gradient(#ffffff, #F2F2F2);
}
......
.navigation {
position: relative;
position: fixed;
top: 0;
left: 0;
}
.container {
margin-top: 120rpx;
}
.title {
width: 670rpx;
margin-top: 60rpx;
......
.navigation {
position: relative;
position: fixed;
top: 0;
left: 0;
}
.container {
margin-top: 120rpx;
}
.title {
width: 750rpx;
height: 150rpx;
......
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