优化活动详情页导航栏样式,修复扫码和关注页面逻辑问题

This commit is contained in:
davy 2025-04-05 15:28:47 +08:00
parent b2bbfcd9e2
commit 54f3534be4
6 changed files with 76 additions and 19 deletions

View File

@ -54,7 +54,11 @@
"appid" : "wx5de24df912a4834c", "appid" : "wx5de24df912a4834c",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : true "minified" : true,
"es6": true,
"postcss": true,
"minifyWXSS": true,
"minifyWXML": true
}, },
"usingComponents" : true, "usingComponents" : true,
"optimization" : { "optimization" : {

View File

@ -147,7 +147,19 @@
const userInfo = uni.getStorageSync('userInfo') const userInfo = uni.getStorageSync('userInfo')
const barInfo = uni.getStorageSync('barInfo') const barInfo = uni.getStorageSync('barInfo')
this.isLoggedIn = !!token //
this.isLoggedIn = false
this.isVerified = false
this.isVerifying = false
this.userInfo = null
this.barInfo = null
//
if (!token || !userInfo) {
return
}
this.isLoggedIn = true
this.userInfo = userInfo this.userInfo = userInfo
this.barInfo = barInfo this.barInfo = barInfo
@ -171,14 +183,6 @@
this.isVerified = userInfo?.isVerified === 1 this.isVerified = userInfo?.isVerified === 1
this.isVerifying = false this.isVerifying = false
} }
console.log('【checkLoginStatus】登录状态:', {
isLoggedIn: this.isLoggedIn,
isVerified: this.isVerified,
isVerifying: this.isVerifying,
userInfo: this.userInfo,
barInfo: this.barInfo
})
}, },
// //
loginSuccess() { loginSuccess() {
@ -194,9 +198,7 @@
}, },
// //
toLogin() { toLogin() {
uni.navigateTo({ this.$refs.loginRef.open()
url: '/pages/index/chooseLogin'
})
}, },
handleScan() { handleScan() {
if (!this.isLoggedIn) { if (!this.isLoggedIn) {
@ -250,8 +252,6 @@
} }
} }
}) })
} else if (res.cancel) {
console.log('用户点击取消')
} }
} }
}) })

View File

@ -1,7 +1,16 @@
<template> <template>
<view class="page-content"> <view class="page-content">
<!-- 自定义导航栏 -->
<view class="custom-nav" :style="{ paddingTop: statusBaeHeight + 'px' }">
<view class="nav-content">
<view class="back-btn" @click="goBack">
<text class="cuIcon-back"></text>
</view>
</view>
</view>
<view class="bg-white progress-box margin-bottom-sm" style="height: 600rpx;border-radius: 0 0 36rpx 36rpx;" <view class="bg-white progress-box margin-bottom-sm" style="height: 600rpx;border-radius: 0 0 36rpx 36rpx;"
:style="{'padding-top': statusBaeHeight + 'px'}"> :style="{'margin-top': statusBaeHeight + 88 + 'px'}">
<process v-if="activityInfo.stage == 1" :value="processNum" progress_width="360" bg_color="#E3E3E5" border_width="6" progress_height="350" <process v-if="activityInfo.stage == 1" :value="processNum" progress_width="360" bg_color="#E3E3E5" border_width="6" progress_height="350"
start_color="#FEE034" end_color="#71F4B4" :total="activityInfo.duration"></process> start_color="#FEE034" end_color="#71F4B4" :total="activityInfo.duration"></process>
<process v-else :value="0" progress_width="360" bg_color="#E3E3E5" border_width="6" progress_height="350" <process v-else :value="0" progress_width="360" bg_color="#E3E3E5" border_width="6" progress_height="350"
@ -235,6 +244,9 @@
console.log(err) console.log(err)
} }
}) })
},
goBack() {
uni.navigateBack()
} }
} }
} }
@ -242,12 +254,52 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.page-content { .page-content {
// overflow-y: auto;
min-height: 100vh; min-height: 100vh;
padding-bottom: 200rpx; padding-bottom: 200rpx;
.custom-nav {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
background: transparent;
.nav-content {
height: 44px;
display: flex;
align-items: center;
padding: 0 32rpx;
.back-btn {
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.8);
border-radius: 50%;
.cuIcon-back {
font-size: 36rpx;
color: #000;
}
}
.nav-title {
flex: 1;
text-align: center;
color: #FFFFFF;
font-size: 32rpx;
font-weight: 500;
margin-right: 60rpx;
}
}
}
.progress-box { .progress-box {
position: relative; position: relative;
margin-top: v-bind('statusBaeHeight + 44 + "px"');
.progress-text { .progress-text {
position: absolute; position: absolute;

View File

@ -179,6 +179,7 @@
/* 标签栏样式 */ /* 标签栏样式 */
.tab-section { .tab-section {
display: flex; display: flex;
border-radius: 12rpx;
margin-bottom: 28rpx; margin-bottom: 28rpx;
padding: 24rpx; padding: 24rpx;
background: #FFFFFF; background: #FFFFFF;

View File

@ -148,7 +148,7 @@
this.breweryQuery.pageNum = 1 this.breweryQuery.pageNum = 1
// //
if (!token) { if (!token || !userInfo) {
return return
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB