diff --git a/pages/API/request/request.uvue b/pages/API/request/request.uvue index 3d27b480798740112baba64ac4c31011022f8754..c6428bf52ff725f94c9b1bf634d5fab1092914a2 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() }, }); }