generated from template/vite-3d-template
45 lines
1.0 KiB
HTML
45 lines
1.0 KiB
HTML
<!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> |