去除所有的控制台日志日志

This commit is contained in:
xiaowang
2026-03-04 10:48:29 +08:00
parent 769a736836
commit 074d49c378
19 changed files with 6 additions and 147 deletions
-19
View File
@@ -120,20 +120,13 @@ const copyToClipboard = async (text: string, type: string) => {
const loadShopImages = async () => {
try {
console.log('开始加载店铺环境图')
const imageFileIds = shopInfo.value.imageFileIds
console.log('imageFileIds:', imageFileIds)
if (imageFileIds) {
const fileIds = imageFileIds.split(',').filter(id => id.trim())
console.log('分割后的fileIds:', fileIds)
const fileIdPromises = fileIds.map(idStr => {
const fileId = parseInt(idStr)
console.log('处理fileId:', fileId)
if (!isNaN(fileId)) {
return fileApi.getSignedUrl(fileId).catch(err => {
console.error('获取店铺环境图签名失败:', err)
return null
})
}
@@ -141,17 +134,10 @@ const loadShopImages = async () => {
})
const results = await Promise.all(fileIdPromises)
console.log('签名URL请求结果:', results)
const filteredResults = results.filter((url): url is string => url !== null).map(url => url.replace(/[`]/g, '').trim())
console.log('过滤后结果:', filteredResults)
console.log('过滤后数量:', filteredResults.length)
shopImages.value = filteredResults
console.log('shopImages最终值:', shopImages.value)
}
} catch (error) {
console.error('加载店铺环境图失败:', error)
}
}
@@ -165,17 +151,12 @@ const fetchShopDetail = async () => {
return
}
console.log('请求店铺详情,shopId:', shopId)
const response = await shopApi.getShopById(Number(shopId)) as any
console.log('店铺详情响应:', response)
shopInfo.value = response || {}
console.log('shopInfo.value:', shopInfo.value)
// 加载店铺图片
await loadShopImages()
} catch (error) {
console.error('获取店铺详情失败:', error)
message.error('获取店铺详情失败')
}
}