mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-23 20:44:58 +08:00
增加连接超时时间 🎨
This commit is contained in:
parent
0b004be58f
commit
297701779c
|
@ -11,7 +11,7 @@ const mysqlParams = {
|
|||
port: '3306',
|
||||
user: 'root',
|
||||
password: 'Xg137839',
|
||||
connectTimeout: 5000
|
||||
connectTimeout: 10000
|
||||
};
|
||||
// 连接 mysql 数据库
|
||||
const connection = (database) => {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user