From 992b830066591d1a2e391c638c701ffc925025cf Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Wed, 6 Sep 2023 21:04:30 +0800 Subject: [PATCH] fix: promise error --- pages/API/call-function/call-function.uvue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/API/call-function/call-function.uvue b/pages/API/call-function/call-function.uvue index 9e74d443..9c545240 100644 --- a/pages/API/call-function/call-function.uvue +++ b/pages/API/call-function/call-function.uvue @@ -45,11 +45,12 @@ content: result['showMessage'] as string, showCancel: false }) - }).catch((err: UniCloudError) => { + }).catch((err: any) => { + const error = err as UniCloudError uni.hideLoading() uni.showModal({ title: '错误', - content: err.errMsg, + content: error.errMsg, showCancel: false }) }) -- GitLab