添加收藏茶室接口和完善茶室详情

This commit is contained in:
wangxiaowei
2025-11-12 17:40:35 +08:00
parent 29bf4dae74
commit 0cad65c295
32 changed files with 1522 additions and 505 deletions

View File

@ -83,7 +83,7 @@
<wd-img width="100%" height="100%" :src="`${OSS}icon/icon_vip.png`" mode="aspectFill"></wd-img>
</view>
<view class="flex items-center leading-34rpx" @click="My.handleToVipBenefits">
<view class="font-400 text-24rpx ml-12rpx mr-20rpx text-[#EECC99]">2026.03.06到期</view>
<view class="font-400 text-24rpx ml-12rpx mr-20rpx text-[#EECC99]">{{ isLogin ? '会员到期时间' : '- -' }}</view>
<view class="flex items-center mt-4rpx">
<wd-icon name="arrow-right" size="24rpx" color="#EECC99"></wd-icon>
</view>
@ -98,7 +98,7 @@
<view class="flex items-center justify-between mx-40rpx">
<view class="flex item-center leading-34rpx text-[#EECC99]">
<view class="font-400 text-24rpx mr-18rpx">上月消费</view>
<view class="font-400 text-28rpx mr-18rpx">¥23014.02</view>
<view class="font-400 text-28rpx mr-18rpx">¥{{ isLogin ? '上月消费金额显示' : '- -' }}</view>
</view>
<view class="font-400 text-24rpx text-[#D2D0D0] leading-34rpx">请尽快领取会员权益</view>
</view>
@ -240,8 +240,10 @@
</template>
<script lang="ts" setup>
import {OrderStatus} from '@/utils/order'
import {toast} from '@/utils/toast'
import { OrderStatus } from '@/utils/order'
import { toast } from '@/utils/toast'
import { router } from '@/utils/tools'
import { useUserStore } from '@/store'
const OSS = inject('OSS')
const navbarHeight = inject('navbarHeight')
@ -249,10 +251,9 @@
// 登录信息相关
const userInfo = ref<any>(null)
const isLogin = ref<boolean>(true)
const isLogin = ref<boolean>(false)
const isVip = ref<boolean>(true)
// 茶室订单
const roomMenuList = reactive([
{ id: 1, title: '全部订单', icon: `${OSS}icon/icon_room_all_order.png`, badge: '', status: 'all' },
@ -287,6 +288,12 @@
// 领取优惠券
const isClaimCoupon = ref<boolean>(false)
onShow(() => {
const userStore = useUserStore()
isLogin.value = userStore.isLoggedIn
console.log("🚀 ~ isLogin.value:", isLogin.value)
})
onLoad(() => {
})
@ -294,24 +301,21 @@
const My = {
// 跳转抖音团购
handleToDouYinGroupBuying: () => {
uni.navigateTo({
url: '/bundle/order/douyin/order-list'
})
router.navigateTo('/bundle/order/douyin/order-list')
},
// 跳转到个人信息
handleToProfile: () => {
uni.navigateTo({
url: '/bundle/profile/profile'
})
if (isLogin.value) {
router.navigateTo('/bundle/profile/profile')
} else {
router.navigateTo('/pages/login/login')
}
},
// 跳转平台团购
handleToPlatformGroupBuying: () => {
uni.navigateTo({
url: '/bundle/order/platform/order-list'
})
router.navigateTo('/bundle/order/platform/order-list')
},
// 点击显示客服电话
@ -335,40 +339,48 @@
showPompoCodePopup.value = true
} else {
toast.info('请先登录')
setTimeout(() => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 800)
router.navigateTo('/pages/login/login', 800)
}
},
// 跳转到会员权益
handleToVipBenefits: () => {
uni.navigateTo({
url: '/bundle/vip/benefits'
})
if (isLogin.value) {
router.navigateTo('/bundle/vip/my-benefits')
} else {
toast.info('请先登录')
router.navigateTo('/pages/login/login', 800)
}
},
// 跳转到优惠券
handleToCoupon: () => {
uni.navigateTo({
url: '/bundle/coupon/my-coupon'
})
if (isLogin.value) {
router.navigateTo('/bundle/coupon/my-coupon')
} else {
toast.info('请先登录')
router.navigateTo('/pages/login/login', 800)
}
},
// 跳转到收藏
handleToCollect: () => {
uni.navigateTo({
url: '/bundle/collect/collect'
})
if (isLogin.value) {
router.navigateTo('/bundle/collect/collect')
} else {
toast.info('请先登录')
router.navigateTo('/pages/login/login', 800)
}
},
// 跳转到我的钱包
handleToWallet: () => {
uni.navigateTo({
url: '/bundle/wallet/wallet'
})
if (isLogin.value) {
router.navigateTo('/bundle/wallet/wallet')
} else {
toast.info('请先登录')
router.navigateTo('/pages/login/login', 800)
}
}
}
</script>