统一了review.vue中写酒评、生成酒单和收藏三个按键的权限判断逻辑
36
pages.json
@ -143,7 +143,9 @@
|
||||
"path" : "pages/index/myJoin",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"navigationBarTitleText" : "我参与的",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -230,7 +232,9 @@
|
||||
"path" : "winelist",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "生成酒单"
|
||||
"navigationBarTitleText" : "生成酒单",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -267,7 +271,9 @@
|
||||
"path" : "beerCoin",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "啤酒币兑好礼"
|
||||
"navigationBarTitleText" : "啤酒币兑好礼",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -308,42 +314,54 @@
|
||||
"path" : "myWineReview",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我的酒评"
|
||||
"navigationBarTitleText" : "我的酒评",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "myAttention",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我的关注"
|
||||
"navigationBarTitleText" : "我的关注",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "myAddress",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我的地址"
|
||||
"navigationBarTitleText" : "我的地址",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "feedback",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"navigationBarTitleText" : "意见反馈",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "setting",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"navigationBarTitleText" : "设置",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "addAiad",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"navigationBarTitleText" : "修改地址",
|
||||
"navigationBarBackgroundColor": "#19367A",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}
|
||||
// {
|
||||
|
@ -349,7 +349,7 @@
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 40rpx;
|
||||
background: #F2F2F2;
|
||||
background: #f9f9f9;
|
||||
|
||||
.user-box {
|
||||
margin-left: 36rpx;
|
||||
|
@ -622,48 +622,49 @@
|
||||
<style lang="scss" scoped>
|
||||
.activitypage {
|
||||
height: 100vh;
|
||||
background: #F9F9F9;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.main-nav {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
padding: 0 32rpx;
|
||||
background: #FFFFFF;
|
||||
// border-bottom: 1rpx solid #F5F5F5;
|
||||
height: 88rpx;
|
||||
align-items: center;
|
||||
|
||||
.nav-item {
|
||||
position: relative;
|
||||
padding: 28rpx 0;
|
||||
margin-right: 48rpx;
|
||||
margin: 0 48rpx;
|
||||
color: #606060;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
// margin-right: 24rpx;
|
||||
|
||||
&.nav-active {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
padding: 32rpx;
|
||||
// padding: 32rpx;
|
||||
color: #19367A;
|
||||
font-weight: 600;
|
||||
// font-weight: 600;
|
||||
}
|
||||
|
||||
.nav-line {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 48rpx;
|
||||
height: 4rpx;
|
||||
background: #19367A;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
.nav-line {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 48rpx;
|
||||
height: 4rpx;
|
||||
background: #19367A;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -374,6 +374,25 @@
|
||||
this.$refs.loginRef.open()
|
||||
return
|
||||
}
|
||||
|
||||
// 检查认证状态
|
||||
const barInfo = uni.getStorageSync('barInfo')
|
||||
if (!barInfo || barInfo.authState !== 2) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请先认证门店',
|
||||
showCancel: true,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/registration'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/writeReview?beerId=' + this.beerId
|
||||
})
|
||||
@ -398,6 +417,25 @@
|
||||
this.$refs.loginRef.open()
|
||||
return
|
||||
}
|
||||
|
||||
// 检查认证状态
|
||||
const barInfo = uni.getStorageSync('barInfo')
|
||||
if (!barInfo || barInfo.authState !== 2) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请先认证门店',
|
||||
showCancel: true,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/registration'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let data = {
|
||||
beerId: this.beerId,
|
||||
status
|
||||
@ -451,6 +489,25 @@
|
||||
this.$refs.loginRef.open()
|
||||
return
|
||||
}
|
||||
|
||||
// 检查认证状态
|
||||
const barInfo = uni.getStorageSync('barInfo')
|
||||
if (!barInfo || barInfo.authState !== 2) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请先认证门店',
|
||||
showCancel: true,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/registration'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pagesActivity/winelist?beerId=" + this.beerId
|
||||
})
|
||||
|
@ -125,20 +125,43 @@
|
||||
data() {
|
||||
return {
|
||||
userInfo: null,
|
||||
barInfo: null,
|
||||
isLoggedIn: false,
|
||||
isVerified: false,
|
||||
navHeight: 0,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let a = uni.getMenuButtonBoundingClientRect()
|
||||
this.navHeight = a.bottom +18
|
||||
let a = uni.getMenuButtonBoundingClientRect()
|
||||
this.navHeight = a.bottom +18
|
||||
this.checkLoginStatus()
|
||||
},
|
||||
onShow() {
|
||||
this.checkLoginStatus()
|
||||
},
|
||||
// created(){
|
||||
// this.userInfo = uni.getStorageSync('userInfo')
|
||||
// if(this.userInfo) {
|
||||
// this.handleScan()
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
// 检查登录状态
|
||||
checkLoginStatus() {
|
||||
const token = uni.getStorageSync('token')
|
||||
const userInfo = uni.getStorageSync('userInfo')
|
||||
const barInfo = uni.getStorageSync('barInfo')
|
||||
|
||||
this.isLoggedIn = !!token
|
||||
this.userInfo = userInfo
|
||||
this.barInfo = barInfo
|
||||
this.isVerified = barInfo && barInfo.authState === 2
|
||||
|
||||
console.log('【checkLoginStatus】登录状态:', {
|
||||
isLoggedIn: this.isLoggedIn,
|
||||
isVerified: this.isVerified,
|
||||
userInfo: this.userInfo,
|
||||
barInfo: this.barInfo
|
||||
})
|
||||
},
|
||||
// 登录成功回调
|
||||
loginSuccess() {
|
||||
this.checkLoginStatus()
|
||||
},
|
||||
openP(index) {
|
||||
uni.hideTabBar()
|
||||
this.$refs['p' + index].open()
|
||||
@ -154,10 +177,27 @@
|
||||
})
|
||||
},
|
||||
handleScan() {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
if (!this.isLoggedIn) {
|
||||
this.$refs.loginRef.open()
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.isVerified) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请先认证门店',
|
||||
showCancel: true,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/registration'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.getSetting({
|
||||
success: (res) => {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
@ -187,12 +227,11 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
this.startScan()
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
},
|
||||
// 开始扫码
|
||||
startScan() {
|
||||
|
BIN
static/icons/wechat-white.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.6 KiB |