材料
This commit is contained in:
@ -237,7 +237,7 @@
|
||||
const handleQuery = () => {};
|
||||
const resetQuery = () => {};
|
||||
const handleDelete = async (id) => {
|
||||
fetch(`http://localhost:8000/personnels/${id}`, {
|
||||
fetch(`http://120.48.8.98:16948/personnels/${id}`, {
|
||||
method: "DELETE",
|
||||
}).then(() => {
|
||||
console.log("删除成功");
|
||||
@ -250,7 +250,7 @@
|
||||
};
|
||||
const handleEdit = (id) => {
|
||||
reset();
|
||||
fetch(`http://localhost:8000/personnels/${id}`)
|
||||
fetch(`http://120.48.8.98:16948/personnels/${id}`)
|
||||
.then((resp) => resp.json())
|
||||
.then((data) => {
|
||||
form.value = data.data;
|
||||
@ -260,7 +260,7 @@
|
||||
const submitForm = async () => {
|
||||
await formRef.value.validate();
|
||||
if (form.value.id) {
|
||||
fetch(`http://localhost:8000/personnels/${form.value.id}`, {
|
||||
fetch(`http://120.48.8.98:16948/personnels/${form.value.id}`, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@ -273,7 +273,7 @@
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
fetch(`http://localhost:8000/personnels`, {
|
||||
fetch(`http://120.48.8.98:16948/personnels`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@ -291,7 +291,7 @@
|
||||
};
|
||||
const getList = async () => {
|
||||
const resp = fetch(
|
||||
`http://localhost:8000/personnels?pageNum=${queryParams.value.pageNum}&pageSize=${queryParams.value.pageSize}`
|
||||
`http://120.48.8.98:16948/personnels?pageNum=${queryParams.value.pageNum}&pageSize=${queryParams.value.pageSize}`
|
||||
)
|
||||
.then((resp) => resp.json())
|
||||
.then((data) => {
|
||||
|
Reference in New Issue
Block a user