diff --git a/Laravel/resources/views/fenzhen.blade.php b/Laravel/resources/views/fenzhen.blade.php index 4016118..c9038ea 100644 --- a/Laravel/resources/views/fenzhen.blade.php +++ b/Laravel/resources/views/fenzhen.blade.php @@ -123,20 +123,32 @@ const doneClick = async (id) => { const idn = '{{ $id_number }}' - if(!!idn && id){ - const response = await axios.post('/api/Fz/change',{ + if (!!idn && id) { + const response = await axios.post('/api/Fz/change', { id: id, id_number: idn, }); - console.log('response',response) + if (response.data.status) { + if (response.data.data.queue.length > 0) { + const clinic = response.data.data.queue[0].clinic + window.$box.alert(`登记成功,请前往${clinic}排队`, '提示', { + confirmButtonText: '确定', + callback: () => { + window.location.reload() + }, + }) + } else { + window.$box.alert(`登记失败,未查询到相关记录`, '提示', { + confirmButtonText: '确定', + callback: () => { + window.location.reload() + }, + }) + } + } else { + window.$message().error(response.data.msg) + } } - // - // window.$box.alert(`登记成功,请前往${clinic}排队`, '提示', { - // confirmButtonText: 'OK', - // callback: () => { - // console.log('AAAAA') - // }, - // }) } onMounted(() => {