This commit is contained in:
jxxghp
2023-07-02 11:18:34 +08:00
parent c5bb4a115c
commit 8ee6b0900f
5 changed files with 22 additions and 40 deletions
+3 -3
View File
@@ -12,16 +12,16 @@ const props = defineProps({
const siteIcon = ref<string>("");
// 查询站点图标
const getSiteIcon = async (siteid: number) => {
const getSiteIcon = async () => {
try {
siteIcon.value = (await api.get("site/icon/" + siteid)).data.icon;
siteIcon.value = (await api.get("site/icon/" + props.site?.id)).data.icon;
} catch (error) {
console.error(error);
}
};
onMounted(() => {
getSiteIcon(props.site?.id ?? 0);
getSiteIcon();
});
</script>