This commit is contained in:
2025-10-14 23:50:09 +08:00
parent 647d008dbd
commit 5dd4a6767a
9 changed files with 1575 additions and 5 deletions

45
public/b.html Normal file
View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>网页</title>
</head>
<body>
sdf
<script type="module">
import { QueryClient } from 'https://esm.xiongxiao.me/@kevisual/query'
const url = 'https://kevisual.xiongxiao.me/api/router'
const devUrl = 'http://localhost:4002/api/router'
const query = new QueryClient({ io: true, url: devUrl })
console.log(query)
query.qws.listenConnect(() => {
console.log('Connected to WebSocket server');
const test = {
path: "test",
key: "test"
}
const me = {
path: 'user',
key: 'me'
}
// query.qws.send({
// type: 'router', data: {
// ...me,
// token: 'st_9lpn3uy6qtso7346qqey0w0623mxpfsi'
// }
// });
query.qws.send('ping')
query.qws.send({
type: 'router',
id: "123",
data: test
})
});
</script>
</body>
</html>