This commit is contained in:
2025-06-07 12:52:52 +07:00
parent 35772f38c9
commit 1a4edfded4
7 changed files with 57 additions and 34 deletions

No files matched your search

+23 -21
View File
@@ -1,5 +1,5 @@
import axios from 'axios'
import { defineStore } from 'pinia'
import axios from "axios";
import { defineStore } from "pinia";
// export const useMySidebarStore = defineStore({
// id: 'mySidebarStore',
@@ -7,22 +7,24 @@ import { defineStore } from 'pinia'
// actions: {}
// })
export const useSidebarStore = defineStore('SidebarStore', () => {
const getSidebar = async () => {
console.log('aaaaa')
const res = await $fetch(`http://10.10.150.131:8080/api/login/6835632801e46cf9c5551876`, {
mode: 'no-cors',
headers: {
'Access-Control-Allow-Origin': '*',
Accept: 'application/json',
'Content-Type': 'application/json',
},
})
.then((response) => {
console.log(response)
})
}
return {
getSidebar
}
})
export const useSidebarStore = defineStore("SidebarStore", () => {
const getSidebar = async () => {
console.log("aaaaa");
const res = await $fetch(
`http://10.10.150.131:8080/api/login/6835632801e46cf9c5551876`,
{
mode: "no-cors",
headers: {
"Access-Control-Allow-Origin": "*",
Accept: "application/json",
"Content-Type": "application/json",
},
}
).then((response) => {
console.log(response);
});
};
return {
getSidebar,
};
});