完善页面

This commit is contained in:
wangxiaowei
2025-12-26 14:46:30 +08:00
parent 54a850fd66
commit f8d8c29dc3
18 changed files with 77 additions and 36 deletions

View File

@ -96,14 +96,15 @@
*/
handleChooseCity: (item: any) => {
const params = {
latitude: item.latitude,
longitude: item.longitude,
// latitude: item.latitude,
// longitude: item.longitude,
id: item.id,
city: item.name
}
uni.$emit('locationUpdate', params)
uni.setStorageSync(LOCATION_LAT_KEY, item.latitude)
uni.setStorageSync(LOCATION_LNG_KEY, item.longitude)
// uni.setStorageSync(LOCATION_LAT_KEY, item.latitude)
// uni.setStorageSync(LOCATION_LNG_KEY, item.longitude)
uni.setStorageSync(LOCATION_CITY_KEY, item.name)
router.navigateBack()
}

View File

@ -136,6 +136,7 @@
const city = ref<string>('')
const keywords = ref<string>('')
const list = ref<Array<any>>([])
const city_id = ref<number>(0)
let lastLocation = { lat: 0, lng: 0 }
onShow(async () => {
@ -152,7 +153,6 @@
lastLocation.lat = location.lat
lastLocation.lng = location.lng
console.log("🚀 ~ city.value:", 'xxxxx', city.value)
Index.handleResetSearch()
}
}
@ -172,6 +172,7 @@
city.value = location.city
latitude.value = location.latitude
longitude.value = location.longitude
console.log("🚀 ~ latitude.value:", latitude.value, longitude.value)
Index.handleResetSearch()
})
@ -192,10 +193,11 @@
latitude: latitude.value,
longitude: longitude.value,
search: keywords.value,
user_id: userId
user_id: userId,
city_area_id: city_id.value || 0
}
uni.showLoading({ title: '加载中...' })
uni.showLoading({ title: '加载中...' })
try {
getHomeTeaStoreList(filter).then( res => {
uni.hideLoading()
@ -227,12 +229,11 @@
*/
handleToCity: () => {
uni.$on('locationUpdate', params => {
console.log("🚀 ~ params:", params)
uni.$off('locationUpdate')
city.value = params.city
latitude.value = params.latitude
longitude.value = params.longitude
city_id.value = params.id
// latitude.value = params.latitude
// longitude.value = params.longitude
Index.handleResetSearch()
})
router.navigateTo(`/pages/city/city?lat=${latitude.value}&lng=${longitude.value}`)

View File

@ -31,7 +31,7 @@
</view>
<view class="mt-124rpx mx-60rpx box-border">
<wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleLogin">立即登录</wd-button>
<!-- <wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleMobileLogin">测试-账号登录</wd-button> -->
<!-- <wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleMobileLogin">测试-账号登录</wd-button> -->
<!-- <wd-button open-type="getUserInfo" @getuserinfo="Login.handleWxLogin" custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border">立即登录</wd-button> -->
<!-- <view class="text-30rpx font-400 text-[#303133] leading-42rpx text-center mt-32rpx">其它手机号登录</view> -->
</view>
@ -131,14 +131,13 @@
}
},
// 手机登录
/**
* 测试-账号登录
*/
// handleMobileLogin: async () => {
// const userStore = useUserStore()
// console.log("🚀 ~ userStore:", userStore)
// const res = await userStore.mobileLogin('18868040087', 1, 2)
// const res = await userStore.mobileLogin('15005837859', 1, 2)
// if (res) {
// uni.setStorageSync('latitude', '30.74744')
// uni.setStorageSync('longitude', '120.78483')

View File

@ -365,7 +365,7 @@
// 获取会员过期时间
getUserMember().then(res => {
expireTime.value = res.data.expiration_time
expireTime.value = res?.data?.expiration_time
})
},
@ -394,14 +394,14 @@
handleShowService: () => {
showServiceMobile.value = true
sheetMenu.value = [
{ name: '400-800-8888' },
{ name: '13000000000' },
]
},
// 选择菜单-拨打客服电话
handleSelectMenu: (item: any) => {
uni.makePhoneCall({
phoneNumber: item.item.name
phoneNumber: item.item.name
})
},

View File

@ -41,8 +41,15 @@
// 是否是团购套餐
const isGroupBuying = ref<number>(0)
const storeId = ref<number>(0) // 店铺ID
const storeType = ref<number>(0) // 1. 直营 2. 加盟
onLoad((args) => {
storeId.value = Number(args.storeId) || 0
storeType.value = Number(args.storeType) || 0
console.log("🚀 ~ 456 storeId:", storeId.value, storeType.value)
type.value = args.type || ''
isGroupBuying.value = Number(args.isGroupBuying) || 0
})
@ -53,7 +60,7 @@
*/
handleRoomSeeOrder: () => {
if (isGroupBuying.value) {
router.navigateTo('/bundle/order/platform/order-list')
router.reLaunch( `/bundle/tea-room/room?id=${storeId.value}&type=${storeType.value}`)
} else {
router.navigateTo('/bundle/order/tea-room/order-list')
}