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

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

@ -29,9 +29,9 @@
<view class="mt-50rpx mx-30rpx">
<view class="text-[#333] leading-42rpx text-30rpx font-bold">已开通城市</view>
<view class="mt-40rpx grid grid-cols-4 gap-20rpx w-full">
<view class="bg-[#F8F9FA] rounded-28rpx h-56rpx text-[#606266] flex items-center justify-center" v-for="(item, index) in 9" :key="index">
<view class="bg-[#F8F9FA] rounded-28rpx h-56rpx text-[#606266] flex items-center justify-center" v-for="(item, index) in openCityList" :key="index">
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
<view class="text-26rpx text-[#606266] leading-36rpx">上海市</view>
<view class="text-26rpx text-[#606266] leading-36rpx">{{ item.name }}</view>
</view>
</view>
</view>
@ -39,18 +39,31 @@
</template>
<script lang="ts" setup>
import { ref, inject } from 'vue'
import { router } from '@/utils/tools'
import { getOpenCityList } from '@/api/tea-room'
let OSS = inject('OSS')
const OSS = inject('OSS')
onLoad(() => {
// 经纬度
const latitude = ref<number>(0)
const longitude = ref<number>(0)
// 已开通城市列表
const openCityList = ref<Array<any>>([])
onLoad((args) => {
if (args.lat && args.lng) {
latitude.value = Number(args.lat)
longitude.value = Number(args.lng)
}
City.handleInit()
})
const city = {
back: () => {
uni.navigateBack({
delta: 1,
})
const City = {
handleInit: async () => {
const res = await getOpenCityList()
openCityList.value = res.list
}
}