add sesion belum fix
This commit is contained in:
28
stores/api/sidebar.ts
Normal file
28
stores/api/sidebar.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import axios from 'axios'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
// export const useMySidebarStore = defineStore({
|
||||
// id: 'mySidebarStore',
|
||||
// state: () => ({ }),
|
||||
// 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
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user