diff --git a/pages.json b/pages.json index a5a462939edcd9076da8552a2ca58777023a0bcd..c102734667e0570d3862e217906bbf21e087cd1f 100644 --- a/pages.json +++ b/pages.json @@ -659,15 +659,15 @@ } }, { - "path": "pages/API/websocket/websocket-socketTask", + "path": "pages/API/websocket/socketTask", "style": { - "navigationBarTitleText": "websocket-socketTask" + "navigationBarTitleText": "socketTask" } }, { "path": "pages/API/websocket/websocket", "style": { - "navigationBarTitleText": "websocket-global" + "navigationBarTitleText": "websocket" } }, { diff --git a/pages/API/websocket/websocket-socketTask.test.js b/pages/API/websocket/socketTask.test.js similarity index 85% rename from pages/API/websocket/websocket-socketTask.test.js rename to pages/API/websocket/socketTask.test.js index 0b53e85d85e748df3d717d9f88b7ed339a81f9dd..563dbeeb84fa2f1dd40e5cf00626908181687f11 100644 --- a/pages/API/websocket/websocket-socketTask.test.js +++ b/pages/API/websocket/socketTask.test.js @@ -1,4 +1,4 @@ -const PAGE_PATH = '/pages/API/websocket/websocket-socketTask' +const PAGE_PATH = '/pages/API/websocket/socketTask' describe('ExtApi-WebSocket', () => { diff --git a/pages/API/websocket/websocket-socketTask.uvue b/pages/API/websocket/socketTask.uvue similarity index 100% rename from pages/API/websocket/websocket-socketTask.uvue rename to pages/API/websocket/socketTask.uvue diff --git a/pages/API/websocket/websocket.uvue b/pages/API/websocket/websocket.uvue index ab58c5c5c4083838b1e68bd55c3243508cb242f1..4db59145eec13ec114e24ad2aa636f34bfa6377a 100644 --- a/pages/API/websocket/websocket.uvue +++ b/pages/API/websocket/websocket.uvue @@ -13,6 +13,9 @@ 断开websocket服务 发送消息后会收到一条服务器返回的消息(与发送的消息内容一致) + @@ -142,6 +145,11 @@ }, } as CloseSocketOptions) }, + goSocketTask() { + uni.navigateTo({ + url: '/pages/API/websocket/socketTask', + }) + } }, } diff --git a/pages/pages.test.js b/pages/pages.test.js index d22b57f64ad20babc3ec08afd314de09b3dc034c..6a72e3735b293cf61e74a928e31fc82f2ba9eba2 100755 --- a/pages/pages.test.js +++ b/pages/pages.test.js @@ -141,7 +141,7 @@ const pages = [ '/pages/API/request/request', '/pages/API/upload-file/upload-file', '/pages/API/download-file/download-file', - '/pages/API/websocket/websocket-socketTask', + '/pages/API/websocket/socketTask', // 页面销毁时会关闭socket连接,所以规避 // '/pages/API/websocket/websocket', '/pages/API/unicloud/unicloud/cloud-function',