提交 213988d9 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

refactor: 调整部分示例页面路径

上级 ed612a2f
...@@ -659,15 +659,15 @@ ...@@ -659,15 +659,15 @@
} }
}, },
{ {
"path": "pages/API/websocket/websocket-socketTask", "path": "pages/API/websocket/socketTask",
"style": { "style": {
"navigationBarTitleText": "websocket-socketTask" "navigationBarTitleText": "socketTask"
} }
}, },
{ {
"path": "pages/API/websocket/websocket", "path": "pages/API/websocket/websocket",
"style": { "style": {
"navigationBarTitleText": "websocket-global" "navigationBarTitleText": "websocket"
} }
}, },
{ {
......
const PAGE_PATH = '/pages/API/websocket/websocket-socketTask' const PAGE_PATH = '/pages/API/websocket/socketTask'
describe('ExtApi-WebSocket', () => { describe('ExtApi-WebSocket', () => {
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
断开websocket服务 断开websocket服务
</button> </button>
<text class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</text> <text class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</text>
<button class="uni-btn-v" type="primary" @click="goSocketTask">
跳转 socketTask 示例
</button>
</view> </view>
</view> </view>
</template> </template>
...@@ -142,6 +145,11 @@ ...@@ -142,6 +145,11 @@
}, },
} as CloseSocketOptions) } as CloseSocketOptions)
}, },
goSocketTask() {
uni.navigateTo({
url: '/pages/API/websocket/socketTask',
})
}
}, },
} }
</script> </script>
......
...@@ -141,7 +141,7 @@ const pages = [ ...@@ -141,7 +141,7 @@ const pages = [
'/pages/API/request/request', '/pages/API/request/request',
'/pages/API/upload-file/upload-file', '/pages/API/upload-file/upload-file',
'/pages/API/download-file/download-file', '/pages/API/download-file/download-file',
'/pages/API/websocket/websocket-socketTask', '/pages/API/websocket/socketTask',
// 页面销毁时会关闭socket连接,所以规避 // 页面销毁时会关闭socket连接,所以规避
// '/pages/API/websocket/websocket', // '/pages/API/websocket/websocket',
'/pages/API/unicloud/unicloud/cloud-function', '/pages/API/unicloud/unicloud/cloud-function',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册