This commit is contained in:
sa_10_0 2024-10-31 16:25:23 +08:00
parent 40fb1c11ae
commit 8767d7e857

View File

@ -266,6 +266,7 @@ const editDialogVisible = ref(false);
const types = ref('');
const Region = ref('');
let selectedProduct = ref('');
const loading = ref(false)
let editForm = ref({
id: '',
goodImg: '',
@ -311,14 +312,23 @@ const handleDelete = (index: number, row: any) => {
}
};
const searchParams: any = ref({})
const getTableData = async ()=>{
const res = await myAxios.post('/api/goods/update',{...tableData.value})
if(res.data.code === 1){
tableData.value = res.data.data.records;
}else{
const getTableData = async () => {
loading.value = true;
try {
const res = await myAxios.post('/api/goods/update', {...tableData.value });
if (res.data.code === 1) {
tableData.value = res.data.data.records;
} else {
ElMessage({
message: '获取数据失败',
});
}
} catch (error) {
ElMessage({
message:'获取数据失败'
})
message: '发生错误',
});
} finally {
loading.value = false;
}
}