From 5438935ba100bf00c91500ba594066941623e0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Fri, 24 May 2024 11:22:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=81=97=E6=BC=8F?= =?UTF-8?q?=E7=9A=84=E8=BF=94=E5=9B=9E=E5=80=BC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unicloud-database/unicloud-database.uvue | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pages/API/unicloud-database/unicloud-database.uvue b/pages/API/unicloud-database/unicloud-database.uvue index 3863f25a..f37730e2 100644 --- a/pages/API/unicloud-database/unicloud-database.uvue +++ b/pages/API/unicloud-database/unicloud-database.uvue @@ -280,19 +280,19 @@ const error = err as UniCloudError this.notify(error.errMsg, '错误') }) - }, - async dbMultiSend() { - const db = uniCloud.databaseForJQL() - const temp1 = db.collection('type') - .where( - 'tag == "default-tag"' - ).getTemp() - const temp2 = db.collection('type') - .where( - 'tag == "default-tag"' - ).getTemp() - await db.multiSend(temp1, temp2) - .then(res => { + }, + async dbMultiSend() : Promise { + const db = uniCloud.databaseForJQL() + const temp1 = db.collection('type') + .where( + 'tag == "default-tag"' + ).getTemp() + const temp2 = db.collection('type') + .where( + 'tag == "default-tag"' + ).getTemp() + await db.multiSend(temp1, temp2) + .then(res => { uni.hideLoading() let successCount = 0 for (let i = 0; i < res.dataList.length; i++) { @@ -305,14 +305,14 @@ } } this.multiSendSuccessCount = successCount - this.notify(`合并查询成功,成功查询的语句条数为:${successCount}`, '提示') - }) - .catch((err : any | null) => { - uni.hideLoading() + this.notify(`合并查询成功,成功查询的语句条数为:${successCount}`, '提示') + }) + .catch((err : any | null) => { + uni.hideLoading() const error = err as UniCloudError console.error(err) - this.notify(error.errMsg, '错误') - }) + this.notify(error.errMsg, '错误') + }) } } } -- GitLab