feat: enhance login handling and message creation
- Updated main.ts to export createMessage and queryLogin. - Modified checkPluginLogin in login-handle.ts to return structured results. - Refactored query.ts to adjust imports and export queryLogin. - Cleaned up kv-login.ts by removing unused imports and improving method handling. - Adjusted Vite configuration for deployment path changes. - Simplified web.html by removing unnecessary import maps and scripts. - Created web.ts to handle login success events and user redirection logic.
This commit is contained in:
18
web.html
18
web.html
@@ -4,17 +4,9 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KvMessage Demo</title>
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"@kevisual/kv-login": "https://esm.kevisual.cn/@kevisual/kv-login"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="module">
|
||||
import '@kevisual/kv-login';
|
||||
</script>
|
||||
<title>登录页面</title>
|
||||
|
||||
<script type="module" src="../pages/web.ts"> </script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
@@ -83,9 +75,7 @@
|
||||
<div class="demo-container">
|
||||
<div class="login-section">
|
||||
<h2>登录组件</h2>
|
||||
<kv-login method="password">
|
||||
<div id="weixinLogin"></div>
|
||||
</kv-login>
|
||||
<kv-login></kv-login>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user