From 43085e7a08403031fb09ca87ede5280d376c3fc3 Mon Sep 17 00:00:00 2001 From: taohebin Date: Tue, 8 Aug 2023 10:17:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9request=E7=9A=84loadin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/request/request.uvue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/API/request/request.uvue b/pages/API/request/request.uvue index 3d27b480..c6428bf5 100644 --- a/pages/API/request/request.uvue +++ b/pages/API/request/request.uvue @@ -9,7 +9,7 @@ - + @@ -21,7 +21,6 @@ data() { return { title: 'request', - loading: false, res: '', task: null as RequestTask | null, pageVisible: false @@ -37,7 +36,9 @@ }, methods: { sendRequest() { - this.loading = true; + uni.showLoading({ + title:"请求中..." + }) this.task = uni.request({ url: "https://unidemo.dcloud.net.cn/ajax/echo/text?name=uni-app", dataType: "json", @@ -75,7 +76,7 @@ } }, complete() { - this.loading = false; + uni.hideLoading() }, }); } -- GitLab