mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2026-06-12 14:51:50 +08:00
增加连接超时时间 🎨
This commit is contained in:
parent
0b004be58f
commit
297701779c
|
|
@ -11,7 +11,7 @@ const mysqlParams = {
|
||||||
port: '3306',
|
port: '3306',
|
||||||
user: 'root',
|
user: 'root',
|
||||||
password: 'Xg137839',
|
password: 'Xg137839',
|
||||||
connectTimeout: 5000
|
connectTimeout: 10000
|
||||||
};
|
};
|
||||||
// 连接 mysql 数据库
|
// 连接 mysql 数据库
|
||||||
const connection = (database) => {
|
const connection = (database) => {
|
||||||
|
|
|
||||||
|
|
@ -372,9 +372,7 @@ function getTableData(e: boolean) {
|
||||||
post('/addaimedicine', { database: database.value, key, value }, (res: any) => {
|
post('/addaimedicine', { database: database.value, key, value }, (res: any) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
tableDataStore.value = JSON.parse(JSON.stringify(tableData.value));
|
tableDataStore.value = JSON.parse(JSON.stringify(tableData.value));
|
||||||
console.log('insert成功');
|
|
||||||
}
|
}
|
||||||
console.log('insert操作');
|
|
||||||
resolve(true)
|
resolve(true)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -383,12 +381,10 @@ function getTableData(e: boolean) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
promise().then((e: any) => {
|
promise().then((e: any) => {
|
||||||
console.log(11)
|
|
||||||
isStart.value = e;
|
isStart.value = e;
|
||||||
isAIDose.value = e;
|
isAIDose.value = e;
|
||||||
const url = e ? '/getaimedicine' : '/getdoctormedicine';
|
const url = e ? '/getaimedicine' : '/getdoctormedicine';
|
||||||
tableData.value = [];
|
tableData.value = [];
|
||||||
console.log('应该是insert后');
|
|
||||||
post(url, { database: database.value, start: 0, end: 1 }, (res: any) => {
|
post(url, { database: database.value, start: 0, end: 1 }, (res: any) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user