Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
055b328432 | ||
|
|
768fc88fca |
@ -1,5 +1,5 @@
|
||||
NODE_ENV= development
|
||||
# VITE_HTTP_BASE_URL = http://10.39.13.78:8002/api/
|
||||
VITE_HTTP_BASE_URL = http://test-weapp-api.linyikj.com.cn/api/
|
||||
VITE_HTTP_BASE_URL = http://10.39.13.78:8002/api/
|
||||
# VITE_HTTP_BASE_URL = http://test-weapp-api.linyikj.com.cn/api/
|
||||
# VITE_HTTP_BASE_URL = https://weapp-api.linyikj.com.cn/api/
|
||||
VITE_ACCESS_TOKEN_KEY= 'ACCESS_TOKEN_CUSTOMER'
|
||||
@ -177,6 +177,54 @@ uni.getLocation({
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const getShowApiAddress = () => {
|
||||
// ShowAPI(易源数据) 逆地理编码
|
||||
const SHOWAPI_APP_KEY = 'C59885FE214644168eB4197eFe9a48b9'
|
||||
return new Promise<{ formatted_address: string }>((resolve, reject) => {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
altitude: true,
|
||||
isHighAccuracy: true,
|
||||
success(res) {
|
||||
console.log(res, '经纬度')
|
||||
const url = `https://route.showapi.com/238-3?appKey=${SHOWAPI_APP_KEY}&lng=${res.longitude}&lat=${res.latitude}&from=5`
|
||||
uni.request({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success(res: any) {
|
||||
console.log(res, 'address')
|
||||
data.value.current_city = res?.data?.showapi_res_body?.addressComponent || {}
|
||||
},
|
||||
fail(res) {
|
||||
resolve({ formatted_address: '拒绝定位' })
|
||||
console.error('获取地址失败:', res)
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请先允许定位!',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.openSetting()
|
||||
console.log('用户点击确定')
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(e) {
|
||||
console.log('拒绝定位', e)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
loading,
|
||||
hasError,
|
||||
|
||||
@ -43,7 +43,7 @@ const emit = defineEmits(['change'])
|
||||
const tabList = ref<any>([])
|
||||
const list = ref([])
|
||||
const current = ref('PropertyExclusive')
|
||||
const props = defineProps(['data'])
|
||||
const props = defineProps(['data','visible'])
|
||||
const handleSwitchType = (type: string) => {
|
||||
current.value = type
|
||||
emit('change', type)
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<cc-scroll-loading :meta="metaData" @load="handleLoadMore">
|
||||
<MyEventList v-if="eventList?.length && current === 0" :data="eventList" />
|
||||
<MyConvenienceServices
|
||||
v-if="convenienceServices?.length && current === 1 || !eventList?.length && current === 0"
|
||||
v-if="current === 1"
|
||||
:data="convenienceServices"
|
||||
@change="getConvenienceServices"
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user