添加公众号配置
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
<route lang="jsonc" type="page">
|
||||
{
|
||||
"needLogin": true,
|
||||
"layout": "tabbar",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
@ -25,13 +26,13 @@
|
||||
<view>
|
||||
<wd-img width="120rpx" height="120rpx" :src="`${OSS}icon/icon_avatar.png`" mode="aspectFill" round />
|
||||
</view>
|
||||
<view class="flex-1 ml-22rpx flex justify-between items-center">
|
||||
<view @click="My.handleToProfile">
|
||||
<view class="text-[#303133] text-36rpx leading-50rpx ml-8rpx">{{ isLogin ? '王大帅' : '立即登录' }}</view>
|
||||
<view v-if="isLogin" class="flex justify-center items-center vip-bg mt-10rpx">
|
||||
<view class="flex-1 ml-22rpx flex justify-between items-center" @click="My.handleToProfile">
|
||||
<view>
|
||||
<view class="text-[#303133] text-36rpx leading-50rpx ml-8rpx">{{ isLogin ? userInfo.nickname : '立即登录' }}</view>
|
||||
<view v-if="isLogin" class="flex justify-center items-center vip-bg mt-10rpx" >
|
||||
<!-- 会员显示图标 -->
|
||||
<view v-if="isVip" class="flex items-center mr-12rpx">
|
||||
<wd-img width="36rpx" height="36rpx" mode="aspectFill" :src="`${OSS}icon/icon_crown.png`" round></wd-img>
|
||||
<wd-img width="36rpx" height="36rpx" mode="aspectFill" :src="userInfo.avatar" round></wd-img>
|
||||
</view>
|
||||
<!-- 这里要根据用户身份显示不同的文字 -->
|
||||
<view class="text-24rpx text-[#675649] leading-34rpx flex items-center">茶址会员</view>
|
||||
@ -180,6 +181,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {OrderStatus} from '@/utils/order'
|
||||
import {toast} from '@/utils/toast'
|
||||
import { useUserStore } from '@/store'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const navbarHeight = inject('navbarHeight')
|
||||
@ -187,7 +189,7 @@
|
||||
|
||||
// 登录信息相关
|
||||
const userInfo = ref<any>(null)
|
||||
const isLogin = ref<boolean>(true)
|
||||
const isLogin = ref<boolean>(false)
|
||||
const isVip = ref<boolean>(true)
|
||||
|
||||
// 茶艺师订单
|
||||
@ -209,18 +211,19 @@
|
||||
// 领取优惠券
|
||||
const isClaimCoupon = ref<boolean>(false)
|
||||
|
||||
onShow(() => {
|
||||
const userStore = useUserStore()
|
||||
if (userStore.userInfo.mobile) {
|
||||
userInfo.value = userStore.userInfo
|
||||
isLogin.value = true
|
||||
}
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
})
|
||||
|
||||
const My = {
|
||||
// 跳转到个人信息
|
||||
handleToProfile: () => {
|
||||
uni.navigateTo({
|
||||
url: '/bundle/profile/profile'
|
||||
})
|
||||
},
|
||||
|
||||
// 点击显示客服电话
|
||||
handleShowService: () => {
|
||||
showServiceMobile.value = true
|
||||
@ -250,6 +253,19 @@
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转到个人信息
|
||||
handleToProfile: () => {
|
||||
if (isLogin.value) {
|
||||
uni.navigateTo({
|
||||
url: '/bundle/profile/profile'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/mobile'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转到会员权益
|
||||
handleToVipBenefits: () => {
|
||||
uni.navigateTo({
|
||||
@ -280,8 +296,8 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page, home-bg{
|
||||
<style lang="scss" scoped>
|
||||
page, home-bg {
|
||||
background: $cz-page-background url(#{$OSS}images/my/my_image1.png) 0 0 no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user