diff --git a/pages/API/download-file/download-file.uvue b/pages/API/download-file/download-file.uvue index 0b00386498952ed858f520c7b577357a0293853e..418d9a7dbbe24f1812ba90a96140d6781488e6aa 100644 --- a/pages/API/download-file/download-file.uvue +++ b/pages/API/download-file/download-file.uvue @@ -1,7 +1,7 @@ + .image-container { + display: flex; + justify-content: center; + align-items: center; + } + \ No newline at end of file diff --git a/pages/API/request/request.uvue b/pages/API/request/request.uvue index 4e1ca7b6dbb88ae19080ac0ab1c490d3b0ee58c6..cdf323c626c1f245b4a9b59625c5d9a97f743fd4 100644 --- a/pages/API/request/request.uvue +++ b/pages/API/request/request.uvue @@ -190,7 +190,7 @@ sslVerify: false, withCredentials: false, firstIpv4: false, - success(res) { + success: (res) => { if (this.pageVisible) { console.log('request success', JSON.stringify(res.data)) uni.showToast({ @@ -202,7 +202,7 @@ this.res = '请求结果 : ' + JSON.stringify(res); } }, - fail(err) { + fail: (err) => { if (this.pageVisible) { console.log('request fail', err); uni.showModal({ @@ -211,7 +211,7 @@ }); } }, - complete() { + complete: () => { uni.hideLoading() }, }); @@ -229,14 +229,14 @@ sslVerify: false, withCredentials: false, firstIpv4: false, - success() { + success: () => { this.jest_result = true; }, - fail() { + fail: () => { this.jest_result = false; }, }); } } } - + \ 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 72735bc82958b5c4743237ff194a78bc2cdd9a31..014889a95b81dce0a72b1de3b6cb58584212b6c4 100644 --- a/pages/API/websocket-global/websocket-global.uvue +++ b/pages/API/websocket-global/websocket-global.uvue @@ -60,10 +60,10 @@ export default { uni.closeSocket({ code: 1000, reason: 'close reason from client', - success(res: any) { + success:(res: any) => { console.log('uni.closeSocket success', res) }, - fail(err: any) { + fail:(err: any) => { console.log('uni.closeSocket fail', err) }, } as CloseSocketOptions) @@ -84,11 +84,11 @@ export default { }) uni.connectSocket({ url: 'ws://websocket.dcloud.net.cn', - success(res: any) { + success:(res: any) => { // 这里是接口调用成功的回调,不是连接成功的回调,请注意 console.log('uni.connectSocket success', res) }, - fail(err: any) { + fail:(err: any) => { // 这里是接口调用失败的回调,不是连接失败的回调,请注意 console.log('uni.connectSocket fail', err) }, @@ -140,10 +140,10 @@ export default { this.platform + ' : ' + parseInt((Math.random() * 10000).toString()).toString(), - success(res: any) { + success:(res: any) => { console.log(res) }, - fail(err: any) { + fail:(err: any) => { console.log(err) }, } as SendSocketMessageOptions) @@ -152,10 +152,10 @@ export default { uni.closeSocket({ code: 1000, reason: 'close reason from client', - success(res: any) { + success:(res: any) => { console.log('uni.closeSocket success', res) }, - fail(err: any) { + fail:(err: any) => { console.log('uni.closeSocket fail', err) }, } as CloseSocketOptions) diff --git a/pages/API/websocket-socketTask/websocket-socketTask.uvue b/pages/API/websocket-socketTask/websocket-socketTask.uvue index 8285294b15fd30778b811079ee00caf181d52ee5..d6b16806486235f89622d70ae1f2bb8bce866688 100644 --- a/pages/API/websocket-socketTask/websocket-socketTask.uvue +++ b/pages/API/websocket-socketTask/websocket-socketTask.uvue @@ -65,10 +65,10 @@ export default { task.close({ code: 1000, reason: 'close reason from client', - success(res: any) { + success:(res: any) => { console.log('uni.closeSocket success', res) }, - fail(err: any) { + fail:(err: any) =>{ console.log('uni.closeSocket fail', err) }, } as CloseSocketOptions) @@ -89,11 +89,11 @@ export default { }) this.socketTask = uni.connectSocket({ url: 'ws://websocket.dcloud.net.cn', - success(res: any) { + success:(res: any) =>{ // 这里是接口调用成功的回调,不是连接成功的回调,请注意 console.log('uni.connectSocket success', res) }, - fail(err: any) { + fail:(err: any) =>{ // 这里是接口调用失败的回调,不是连接失败的回调,请注意 console.log('uni.connectSocket fail', err) }, @@ -145,10 +145,10 @@ export default { parseInt(Math.random() * 10000 + '').toString() this.socketTask?.send({ data, - success(res: any) { + success:(res: any) =>{ console.log(res) }, - fail(err: any) { + fail:(err: any) =>{ console.log(err) }, } as SendSocketMessageOptions) @@ -157,10 +157,10 @@ export default { this.socketTask?.close({ code: 1000, reason: 'close reason from client', - success(res: any) { + success:(res: any) =>{ console.log('uni.closeSocket success', res) }, - fail(err: any) { + fail:(err: any) =>{ console.log('uni.closeSocket fail', err) }, } as CloseSocketOptions) @@ -184,10 +184,10 @@ export default { parseInt(Math.random() * 10000 + '').toString() this.socketTask?.send({ data, - success(_) { + success:(_) =>{ this.jest_result++ }, - fail(_) { + fail:(_) =>{ this.jest_result = 0 }, } as SendSocketMessageOptions)