generated from template/vite-3d-template
update
This commit is contained in:
45
public/b.html
Normal file
45
public/b.html
Normal 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>
|
||||
Reference in New Issue
Block a user