增加连接超时时间 🎨

This commit is contained in:
gaofy 2023-11-16 11:14:55 +08:00
parent 0b004be58f
commit 297701779c
2 changed files with 1 additions and 5 deletions

View File

@ -11,7 +11,7 @@ const mysqlParams = {
port: '3306',
user: 'root',
password: 'Xg137839',
connectTimeout: 5000
connectTimeout: 10000
};
// 连接 mysql 数据库
const connection = (database) => {

View File

@ -372,9 +372,7 @@ function getTableData(e: boolean) {
post('/addaimedicine', { database: database.value, key, value }, (res: any) => {
if (res.status === 200) {
tableDataStore.value = JSON.parse(JSON.stringify(tableData.value));
console.log('insert成功');
}
console.log('insert操作');
resolve(true)
});
} else {
@ -383,12 +381,10 @@ function getTableData(e: boolean) {
})
}
promise().then((e: any) => {
console.log(11)
isStart.value = e;
isAIDose.value = e;
const url = e ? '/getaimedicine' : '/getdoctormedicine';
tableData.value = [];
console.log('应该是insert后');
post(url, { database: database.value, start: 0, end: 1 }, (res: any) => {
if (res.status === 200) {
if (res.data.length > 0) {