优化功能
This commit is contained in:
@ -142,12 +142,14 @@
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||
import { LOCATION_DENY_TIME_KEY, handleEnsureLocationAuthHooks, LOCATION_DEFAULT_CITY, handleGetLocationCity, LOCATION_CITY_KEY, handleForceGetLocation } from '@/hooks/useLocation'
|
||||
import { getHomeBannerList, getHomeCouponPopup } from '@/api/home'
|
||||
import { getHomeBannerList, getHomeCouponPopup, claimIndexCoupon } from '@/api/home'
|
||||
import { getHomeTeaStoreList } from '@/api/tea-room'
|
||||
import { useUserStore } from '@/store'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const navbarHeight = inject('navbarHeight')
|
||||
const toast = useToast()
|
||||
|
||||
// 轮播图
|
||||
const swiperList = ref<string[]>([])
|
||||
@ -354,9 +356,9 @@
|
||||
/**
|
||||
* 跳转领取优惠券页面
|
||||
*/
|
||||
handleToGetCoupon: () => {
|
||||
handleToGetCoupon: async () => {
|
||||
await claimIndexCoupon()
|
||||
showCoupon.value = false
|
||||
router.switchTab('/pages/my/my')
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -158,15 +158,20 @@
|
||||
*/
|
||||
handleToLogin: () => {
|
||||
const decoded = decodeURIComponent(redirectUrl.value)
|
||||
console.log("🚀 ~ decoded:", decoded)
|
||||
console.log("🚀 ~ decoded:", uni.getStorageSync('refreshTeaSpecialistDetailsParams'))
|
||||
|
||||
if (decoded == '/bundle/order/tea-room/order-detail') {
|
||||
// 茶室订单转让
|
||||
const transferOrderParams = uni.getStorageSync('transferOrderParams')
|
||||
uni.$emit('transferOrder', transferOrderParams)
|
||||
} else if (decoded == '/bundle_b/pages/tea-specialist/detail') {
|
||||
// 刷新茶艺师详情页
|
||||
uni.$emit('refreshTeaSpecialistDetails')
|
||||
} else if (decoded == '/bundle/tea-room/room') {
|
||||
// 刷新茶室列表页
|
||||
uni.$emit('refreshShareTeaRoomLists')
|
||||
} else if (decoded == '/bundle_b/pages/tea-specialist/list') {
|
||||
// 刷新茶艺师列表页
|
||||
uni.$emit('refreshTeaSpecialist')
|
||||
}
|
||||
|
||||
toast.info('登录成功')
|
||||
|
||||
@ -53,7 +53,8 @@
|
||||
<!-- 余额显示 -->
|
||||
<view class="mt-16rpx mx-30rpx flex justify-between">
|
||||
<view class="flex items-center">
|
||||
<view class="w-160rpx text-[#303133] text-center" @click="router.navigateTo('/bundle/coupon/my-coupon')">
|
||||
<!-- <view class="w-160rpx text-[#303133] text-center" @click="router.navigateTo('/bundle/coupon/my-coupon')"> -->
|
||||
<view class="w-160rpx text-[#303133] text-center">
|
||||
<view class="font-bold text-36rpx leading-50rpx"> {{ isLogin ? user.coupon_count : '- -' }}</view>
|
||||
<view class="text-24rpx leading-34rpx">优惠券</view>
|
||||
</view>
|
||||
@ -62,13 +63,23 @@
|
||||
<view class="text-24rpx leading-34rpx">收藏</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="relative" @click="router.navigateTo('/bundle/wallet/wallet')">
|
||||
<view class="w-300rpx h-148rpx">
|
||||
<wd-img width="100%" height="100%" :src="`${OSS}images/my/my_image3.png`" mode="aspectFill"></wd-img>
|
||||
<view class="relative">
|
||||
<view class="w-378rpx h-148rpx">
|
||||
<wd-img width="100%" height="100%" :src="`${OSS}images/my/my_image8.png`" mode="aspectFill"></wd-img>
|
||||
</view>
|
||||
<view class="text-[#303133] absolute bottom-12rpx left-24rpx text-center">
|
||||
<view class="text-30rpx leading-36rpx font-bold">{{ isLogin ? user.user_money : '- -' }}</view>
|
||||
<view class="text-20rpx leading-28rpx ml-10rpx">平台余额</view>
|
||||
<view class="text-[#303133] absolute bottom-12rpx text-center flex items-center justify-center w-full">
|
||||
<view class="" @click="router.navigateTo('/bundle/wallet/wallet')">
|
||||
<view class="text-30rpx leading-36rpx font-bold">{{ isLogin ? user.user_money : '- -' }}</view>
|
||||
<view class="text-20rpx leading-28rpx ml-10rpx">平台余额</view>
|
||||
</view>
|
||||
<view class="border-dashed border-2rpx border-[#FFBC01] h-62rpx w-2rpx mx-28rpx"></view>
|
||||
<view @click="router.navigateTo('/bundle/user/store-balance')">
|
||||
<view class="text-30rpx leading-36rpx font-bold">{{ isLogin ? user.store_money : '- -' }}</view>
|
||||
<view class="flex itemsc-center">
|
||||
<view class="text-20rpx leading-28rpx ml-10rpx">门店余额</view>
|
||||
<wd-icon name="chevron-right" color="#C78C4A" size="28rpx" custom-class="!mt-2rpx"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -269,7 +280,7 @@
|
||||
|
||||
// 登录信息相关
|
||||
const userInfo = ref<any>(null)
|
||||
const user = ref<IUserResult>({
|
||||
const user = ref({
|
||||
id: 0,
|
||||
sn: 0,
|
||||
sex: "未知",
|
||||
@ -285,6 +296,7 @@
|
||||
member: 0,
|
||||
mobile: "",
|
||||
user_money: "0.00",
|
||||
store_money: "0.00",
|
||||
version: "",
|
||||
last_month: 0
|
||||
})
|
||||
|
||||
@ -90,6 +90,14 @@
|
||||
*/
|
||||
handleToUse: () => {
|
||||
router.redirectTo(`/bundle/tea-room/room?id=${storeId.value}&type=${storeType.value}`)
|
||||
},
|
||||
|
||||
/**
|
||||
* 完成
|
||||
*/
|
||||
handleRoomDone: () => {
|
||||
router.redirectTo('/bundle_b/pages/tea-specialist/list')
|
||||
// router.switchTab('/pages/index/index')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user