调试接口
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
<view class="mt-52rpx mx-30rpx">
|
||||
<view class="text-[#333] leading-42rpx text-30rpx font-bold">当前定位</view>
|
||||
<view class="mt-40rpx">
|
||||
<view class="bg-[#F8F9FA] rounded-28rpx w-162rpx h-56rpx text-[#606266] flex items-center justify-center">
|
||||
<view class="bg-[#F8F9FA] rounded-28rpx w-162rpx h-56rpx text-[#606266] flex items-center justify-center" @click="City.handleSetCurretCity">
|
||||
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx">{{ city || LOCATION_DEFAULT_CITY }}</view>
|
||||
</view>
|
||||
@ -35,7 +35,7 @@
|
||||
@click="City.handleChooseCity(item)"
|
||||
>
|
||||
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx">{{ item.name }}</view>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx line-1">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -45,7 +45,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { router } from '@/utils/tools'
|
||||
import { getOpenCityList } from '@/api/tea-room'
|
||||
import { LOCATION_CITY_KEY, LOCATION_LAT_KEY, LOCATION_LNG_KEY } from '@/hooks/useLocation'
|
||||
import { LOCATION_CITY_KEY, LOCATION_LAT_KEY, LOCATION_LNG_KEY, LOCATION_CURRENT } from '@/hooks/useLocation'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
|
||||
@ -68,16 +68,33 @@
|
||||
|
||||
const City = {
|
||||
handleInit: async () => {
|
||||
city.value = uni.getStorageSync(LOCATION_CITY_KEY)
|
||||
const current = uni.getStorageSync(LOCATION_CURRENT)
|
||||
if (current) {
|
||||
latitude.value = current.latitude
|
||||
longitude.value = current.longitude
|
||||
city.value = current.city
|
||||
} else {
|
||||
latitude.value = uni.getStorageSync(LOCATION_LAT_KEY)
|
||||
longitude.value = uni.getStorageSync(LOCATION_LNG_KEY)
|
||||
city.value = uni.getStorageSync(LOCATION_CITY_KEY)
|
||||
}
|
||||
const res = await getOpenCityList()
|
||||
openCityList.value = res.list
|
||||
},
|
||||
|
||||
/**
|
||||
* 将缓存设置为当前定位城市
|
||||
* @param item
|
||||
*/
|
||||
handleSetCurretCity: () => {
|
||||
const params = uni.getStorageSync(LOCATION_CURRENT)
|
||||
City.handleChooseCity(params)
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择城市
|
||||
*/
|
||||
handleChooseCity: (item: any) => {
|
||||
|
||||
const params = {
|
||||
latitude: item.latitude,
|
||||
longitude: item.longitude,
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
:fixed="true">
|
||||
<view class="relative p-20rp mb-24rpx" v-for="(item, index) in list" :key="index" @click="Index.handleToReserveRoom(item.id, item.operation_type)">
|
||||
<view class="absolute top--28rpx left-0 z-1" v-if="item.operation_type == 1">
|
||||
<wd-img width="110rpx" height="110rpx" :src="`${OSS}images/home/home_image4.png`"/>
|
||||
<wd-img width="110rpx" height="110rpx" :src="`${OSS}images/home/home_image6.png`"/>
|
||||
</view>
|
||||
|
||||
<view class="mx-30rpx p-30rpx flex bg-white rounded-10rpx">
|
||||
|
||||
@ -167,12 +167,12 @@
|
||||
|
||||
// 跳转到服务协议页面
|
||||
handleToService: () => {
|
||||
|
||||
router.navigateTo('/pages/webview/webview?type=service')
|
||||
},
|
||||
|
||||
// 跳转到隐私政策页面
|
||||
handleToPrivacy: () => {
|
||||
|
||||
router.navigateTo('/pages/webview/webview?type=privacy')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -193,7 +193,7 @@
|
||||
</view> -->
|
||||
|
||||
<!-- 更多服务 -->
|
||||
<!-- <view class="bg-white rounded-16rpx mx-30rpx mt-28rpx pb-34rpx">
|
||||
<view class="bg-white rounded-16rpx mx-30rpx mt-28rpx pb-34rpx">
|
||||
<view class="px-30rpx pt-30rpx py-24rpx">更多服务</view>
|
||||
<view class="flex px-30rpx">
|
||||
<view v-for="(item, index) in serviceMenuList" :key="index">
|
||||
@ -210,7 +210,7 @@
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 推广码 -->
|
||||
|
||||
@ -92,8 +92,16 @@
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
uni.$on('refreshOrderList', () => {
|
||||
list.value = []
|
||||
getMescroll().resetUpScroll()
|
||||
})
|
||||
})
|
||||
|
||||
onUnload(() => {
|
||||
uni.$off('refreshOrderList')
|
||||
})
|
||||
|
||||
const Reserve = {
|
||||
// 上拉加载的回调: 其中num:当前页 从1开始, size:每页数据条数,默认10
|
||||
upCallback: (mescroll) => {
|
||||
|
||||
36
src/pages/webview/webview.vue
Normal file
36
src/pages/webview/webview.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page -->
|
||||
<route lang="jsonc" type="page">{
|
||||
"layout": "tabbar",
|
||||
"style": {
|
||||
// 'custom' 表示开启自定义导航栏,默认 'default'
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}</route>
|
||||
|
||||
<template>
|
||||
<view class="">
|
||||
<web-view :src="src"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const src = ref<string>('')
|
||||
|
||||
onLoad((args) => {
|
||||
switch (args.type) {
|
||||
case 'service':
|
||||
// 服务协议
|
||||
src.value = 'https://76458.com/yhxy.html'
|
||||
break
|
||||
case 'privacy':
|
||||
// 隐私政策
|
||||
src.value = 'https://76458.com/yszc.html'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
// if (options.type) {
|
||||
// src.value = decodeURIComponent(options.url as string)
|
||||
// }
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user