fix: BugCollect 前端空 catch 块添加错误提示
修复: - BugCollectIssues.vue - 添加 ElMessage.error - BugCollectEvents.vue - 添加 ElMessage.error - BugCollectRankFreq.vue - 添加 ElMessage.error - BugCollectRankRisk.vue - 添加 ElMessage.error - BugCollectSourcemaps.vue - 添加 ElMessage.error Co-Authored-By: Claude <noreply@anthropic.com>
这个提交包含在:
父节点
2c4dcaf130
当前提交
563a8d8af6
@ -104,6 +104,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
import { bugCollectApi, type BugCollectEventItem } from '@/api/bugcollect'
|
import { bugCollectApi, type BugCollectEventItem } from '@/api/bugcollect'
|
||||||
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
||||||
import { formatTime } from '@/utils/bugCollect'
|
import { formatTime } from '@/utils/bugCollect'
|
||||||
@ -138,6 +139,7 @@ async function loadData() {
|
|||||||
events.value = data.items ?? []
|
events.value = data.items ?? []
|
||||||
total.value = data.total ?? 0
|
total.value = data.total ?? 0
|
||||||
} catch {
|
} catch {
|
||||||
|
ElMessage.error('加载事件列表失败')
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,6 +100,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
import { bugCollectApi, type BugCollectIssue } from '@/api/bugcollect'
|
import { bugCollectApi, type BugCollectIssue } from '@/api/bugcollect'
|
||||||
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
||||||
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
||||||
@ -134,6 +135,7 @@ async function loadData() {
|
|||||||
issues.value = data.items ?? []
|
issues.value = data.items ?? []
|
||||||
total.value = data.total ?? 0
|
total.value = data.total ?? 0
|
||||||
} catch {
|
} catch {
|
||||||
|
ElMessage.error('加载错误列表失败')
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,6 +68,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
import { ref, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
import { bugCollectApi, type BugCollectIssueRanking } from '@/api/bugcollect'
|
import { bugCollectApi, type BugCollectIssueRanking } from '@/api/bugcollect'
|
||||||
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
||||||
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
||||||
@ -104,6 +105,7 @@ async function loadData() {
|
|||||||
await nextTick()
|
await nextTick()
|
||||||
renderChart()
|
renderChart()
|
||||||
} catch {
|
} catch {
|
||||||
|
ElMessage.error('加载高频排行失败')
|
||||||
rankings.value = []
|
rankings.value = []
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
@ -73,6 +73,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
import { ref, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
import { bugCollectApi, type BugCollectIssueRanking } from '@/api/bugcollect'
|
import { bugCollectApi, type BugCollectIssueRanking } from '@/api/bugcollect'
|
||||||
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
||||||
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
||||||
@ -116,6 +117,7 @@ async function loadData() {
|
|||||||
await nextTick()
|
await nextTick()
|
||||||
renderChart()
|
renderChart()
|
||||||
} catch {
|
} catch {
|
||||||
|
ElMessage.error('加载高危排行失败')
|
||||||
rankings.value = []
|
rankings.value = []
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
@ -94,6 +94,7 @@ npx react-native bundle --platform android --dev false</pre>
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
import { bugCollectApi, type BugCollectSourcemap } from '@/api/bugcollect'
|
import { bugCollectApi, type BugCollectSourcemap } from '@/api/bugcollect'
|
||||||
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
import { useBugCollectApp } from '@/composables/useBugCollectApp'
|
||||||
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
import { levelTag, statusTag, statusLabel, formatTime } from '@/utils/bugCollect'
|
||||||
@ -120,6 +121,7 @@ async function loadData() {
|
|||||||
const res = await bugCollectApi.sourcemaps.list(appKey.value)
|
const res = await bugCollectApi.sourcemaps.list(appKey.value)
|
||||||
sourcemaps.value = res.data.data ?? []
|
sourcemaps.value = res.data.data ?? []
|
||||||
} catch {
|
} catch {
|
||||||
|
ElMessage.error('加载 Sourcemap 列表失败')
|
||||||
sourcemaps.value = []
|
sourcemaps.value = []
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户