belum tampil data
This commit is contained in:
22
stores/api/typeUser.ts
Normal file
22
stores/api/typeUser.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { defineStore } from "pinia";
|
||||
import axios from "axios";
|
||||
export const useTypeUser = defineStore("typeUser", () => {
|
||||
const data = ref<any>([]);
|
||||
const getTypeUser = async (body: Record<string, any>) => {
|
||||
const a = await $fetch("http://10.10.150.131:8080/api/menu/getlist", {
|
||||
mode: "no-cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Access-Control-Allow-Origin": "*"
|
||||
},
|
||||
method:"GET",
|
||||
})
|
||||
// .then((res) => {
|
||||
// data.value = res
|
||||
// console.log(data.value);
|
||||
// });
|
||||
// return data;
|
||||
console.log(a);
|
||||
};
|
||||
return { getTypeUser,data };
|
||||
});
|
||||
Reference in New Issue
Block a user