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 @@ + \ 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 @@ - - 发送消息后会收到一条服务器返回的消息(与发送的消息内容一致) + 发送消息后会收到一条服务器返回的消息(与发送的消息内容一致) + .websocket-tips { + padding: 40px 0px; + text-align: center; + font-size: 14px; + line-height: 24px; + color: #666666; + } + \ No newline at end of file diff --git a/pages/API/websocket-socketTask/websocket-socketTask.uvue b/pages/API/websocket-socketTask/websocket-socketTask.uvue index 7f0b9fc55f8430ec030fb10412eb751def700dde..fb3f40fb351097ca3aa400ba580dee6d1461c712 100644 --- a/pages/API/websocket-socketTask/websocket-socketTask.uvue +++ b/pages/API/websocket-socketTask/websocket-socketTask.uvue @@ -1,105 +1,94 @@ - - - - - + } + + + \ No newline at end of file diff --git a/pages/template/list-news/list-news.uvue b/pages/template/list-news/list-news.uvue index b3e0804f7b492ca091ba4b7abf3e5fb32a342617..d74cda1c45b04fdb2e35c561535852b8cdf81ab4 100644 --- a/pages/template/list-news/list-news.uvue +++ b/pages/template/list-news/list-news.uvue @@ -1,229 +1,219 @@ - - - - - + + + + + \ No newline at end of file