diff --git a/pages/API/download-file/download-file.uvue b/pages/API/download-file/download-file.uvue
index 9f1b36290e7a337b156a996405ef87c6084c45c7..fa231bf63247e5a12e3fb5ef576bb29da7160cc2 100644
--- a/pages/API/download-file/download-file.uvue
+++ b/pages/API/download-file/download-file.uvue
@@ -27,17 +27,14 @@
title: 'downloadFile',
imageSrc: '',
task: null as DownloadTask | null,
- pageVisible: false,
//自动化测试例专用
jest_result: false
}
},
onLoad() {
- this.pageVisible = true;
},
onUnload() {
this.imageSrc = '';
- this.pageVisible = false;
uni.hideLoading();
this.task?.abort();
},
@@ -50,23 +47,17 @@
this.task = uni.downloadFile({
url: "https://web-assets.dcloud.net.cn/unidoc/zh/uni-app.png",
success: (res) => {
- if (this.pageVisible) {
- console.log('downloadFile success, res is', res)
- self.imageSrc = res.tempFilePath;
- uni.hideLoading();
- }
+ console.log('downloadFile success, res is', res)
+ self.imageSrc = res.tempFilePath;
+ uni.hideLoading();
},
fail: (err) => {
- if (this.pageVisible) {
- console.log('downloadFile fail, err is:', err)
- uni.hideLoading();
- }
+ console.log('downloadFile fail, err is:', err)
+ uni.hideLoading();
}
});
this.task?.onProgressUpdate((update) => {
- if (this.pageVisible) {
- console.log("progress : ", update.progress);
- }
+ console.log("progress : ", update.progress);
})
},
//自动化测试例专用
@@ -97,4 +88,4 @@
justify-content: center;
align-items: center;
}
-
+
\ No newline at end of file
diff --git a/pages/API/get-network-type/get-network-type.uvue b/pages/API/get-network-type/get-network-type.uvue
index dcae67e586dbe9c737135e900e9e30e4c13e33b7..ed6c657bb80bd1a83dac6d2b6eec5a2c3bb5279c 100644
--- a/pages/API/get-network-type/get-network-type.uvue
+++ b/pages/API/get-network-type/get-network-type.uvue
@@ -1,83 +1,78 @@
-
-
-
-
- 网络状态
-
- 未获取
- 请点击下面按钮获取网络状态
-
-
- {{networkType}}
-
-
-
-
-
-
-
-
+
+
+
+
+ 网络状态
+
+ 未获取
+ 请点击下面按钮获取网络状态
+
+
+ {{networkType}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/API/request/request.uvue b/pages/API/request/request.uvue
index 3028c1f226cce4c87614172386a211bb309033a5..b56dcc13b4d65f69c95fe675cd0d807748236d73 100644
--- a/pages/API/request/request.uvue
+++ b/pages/API/request/request.uvue
@@ -87,7 +87,6 @@
title: 'request',
res: '',
task: null as RequestTask | null,
- pageVisible: false,
host: "http://request.dcloud.net.cn",
url: "/api/http/method/get",
method: "GET" as RequestMethod | null,
@@ -135,10 +134,8 @@
}
},
onLoad() {
- this.pageVisible = true;
},
onUnload() {
- this.pageVisible = false;
uni.hideLoading();
this.task?.abort();
},
@@ -191,25 +188,21 @@
withCredentials: false,
firstIpv4: false,
success: (res) => {
- if (this.pageVisible) {
- console.log('request success', JSON.stringify(res.data))
- uni.showToast({
- title: '请求成功',
- icon: 'success',
- mask: true,
- duration: duration
- });
- this.res = '请求结果 : ' + JSON.stringify(res);
- }
+ console.log('request success', JSON.stringify(res.data))
+ uni.showToast({
+ title: '请求成功',
+ icon: 'success',
+ mask: true,
+ duration: duration
+ });
+ this.res = '请求结果 : ' + JSON.stringify(res);
},
fail: (err) => {
- if (this.pageVisible) {
- console.log('request fail', err);
- uni.showModal({
- content: err.errMsg,
- showCancel: false
- });
- }
+ console.log('request fail', err);
+ uni.showModal({
+ content: err.errMsg,
+ showCancel: false
+ });
},
complete: () => {
uni.hideLoading()
@@ -239,4 +232,4 @@
}
}
}
-
+
\ No newline at end of file
diff --git a/pages/API/upload-file/upload-file.uvue b/pages/API/upload-file/upload-file.uvue
index d239c13886d2b5f8e7048bc7336d3adaef99db76..5355dbefe1b7c334327946303aaaa983146199aa 100644
--- a/pages/API/upload-file/upload-file.uvue
+++ b/pages/API/upload-file/upload-file.uvue
@@ -1,136 +1,122 @@
-
+
-
- + 选择图片
+
+ + 选择图片
-
+
+ .uni-hello-addfile {
+ text-align: center;
+ background: #fff;
+ padding: 50rpx;
+ margin-top: 10px;
+ font-size: 38rpx;
+ color: #808080;
+ }
+
\ No newline at end of file
diff --git a/pages/API/websocket-global/websocket-global.uvue b/pages/API/websocket-global/websocket-global.uvue
index 014889a95b81dce0a72b1de3b6cb58584212b6c4..d2593ab37c35da85f2e2c8a6bc70ef225ba57c55 100644
--- a/pages/API/websocket-global/websocket-global.uvue
+++ b/pages/API/websocket-global/websocket-global.uvue
@@ -7,94 +7,83 @@
-