Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复地理位置丢失 #30

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/StarportCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ const coverUrl = computed(() => {
:data="imgList"
:initial-index="index"
style="object-fit: contain"
:is-need-meta-panel="isDetail"
:is-need-preview="true"
is-need-meta-panel
is-need-preview
>
<template #location="{ data: tData }">
<card-map-card v-if="showMap" ref="mapCardRef" :data="tData" />
Expand Down
37 changes: 15 additions & 22 deletions src/pages/detail/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ import { formatTime } from '~/utils'
import { adjustImgData, getUserAvatar } from '~/utils/tools'

const props = defineProps({

id: Number,
data: Object,

})

const userStore = useUserStore()
Expand Down Expand Up @@ -52,23 +50,18 @@ async function getDataDe() {
const { code, msg, result } = ({} = await topicFindById(parsms))
if (code === 200) {
dataDe.value = result
setTimeout(() => {
fileList.value = result?.fileList.map((item) => {

fileList.value
= result?.fileList.map((item) => {
return adjustImgData(item)
}) || []
}, 500)
}) || []
}
else {

}
}

function onSwiper(swiper) {

}
function onSlideChange() {

}
function onSwiper(swiper) {}
function onSlideChange() {}
const isInitDone = ref(false)
onMounted(() => {
isInitDone.value = false
Expand All @@ -80,9 +73,9 @@ onMounted(() => {
isInitDone.value = true
dataDe.value = props.data
fileList.value = props.data?.fileList
// getDataDe()
getDataDe()
getLikeData()
// getCommentData();
getCommentData()
})

// 发送评论
Expand All @@ -101,7 +94,6 @@ return
getCommentData()
}
else {

}
sendLoading.value = false
}
Expand All @@ -115,10 +107,8 @@ async function handleMessageCreate() {
}
const { code, msg, result } = ({} = await messageCreate(params))
if (code === 200) {

}
else {

}
}

Expand Down Expand Up @@ -177,7 +167,6 @@ async function getLikeData() {
likeList.value = result || []
}
else {

}
}
// 标签信息
Expand Down Expand Up @@ -261,7 +250,6 @@ return
}
}
if (err) {

}
getDataLoading.value = false
}
Expand Down Expand Up @@ -304,7 +292,12 @@ return
:key="index"
class="h-full w-full"
>
<StarportCard :data="item" :index :img-list="fileList" is-detail />
<StarportCard
:data="item"
:index
:img-list="fileList"
is-detail
/>
</component>
</component>
</div>
Expand Down Expand Up @@ -437,7 +430,7 @@ return
</div>
<!-- 返回按钮 -->
<div
v-if="0"
v-if="0"
class="close-icon"
:class="{ 'mt-10': isLive }"
@click="router.back()"
Expand Down
Loading