update
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/kevisual-login",
|
"name": "@kevisual/kevisual-login",
|
||||||
"version": "0.0.4",
|
"version": "0.0.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"basename": "/user/login",
|
"basename": "/root/login",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"pub": "envision deploy ./dist -k login -v 0.0.4 -u -o user"
|
"pub": "envision deploy ./dist -k login -v 0.0.5 -u "
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "abearxiong <xiongxiao@xiongxiao.me>",
|
"author": "abearxiong <xiongxiao@xiongxiao.me>",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"@kevisual/system-lib": "^0.0.22",
|
"@kevisual/system-lib": "^0.0.22",
|
||||||
"@kevisual/system-ui": "^0.0.3",
|
"@kevisual/system-ui": "^0.0.3",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"dayjs": "^1.11.18",
|
"dayjs": "^1.11.19",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"react-dom": "^19.2.0",
|
"react-dom": "^19.2.0",
|
||||||
@@ -33,17 +33,17 @@
|
|||||||
"@kevisual/ssl": "^0.0.1",
|
"@kevisual/ssl": "^0.0.1",
|
||||||
"@kevisual/store": "0.0.9",
|
"@kevisual/store": "0.0.9",
|
||||||
"@kevisual/types": "^0.0.10",
|
"@kevisual/types": "^0.0.10",
|
||||||
"@tailwindcss/vite": "^4.1.16",
|
"@tailwindcss/vite": "^4.1.17",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
"@types/react": "^19.2.2",
|
"@types/react": "^19.2.2",
|
||||||
"@types/react-dom": "^19.2.2",
|
"@types/react-dom": "^19.2.2",
|
||||||
"@vitejs/plugin-basic-ssl": "^2.1.0",
|
"@vitejs/plugin-basic-ssl": "^2.1.0",
|
||||||
"@vitejs/plugin-react": "^5.1.0",
|
"@vitejs/plugin-react": "^5.1.0",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"esbuild": "^0.25.11",
|
"esbuild": "^0.27.0",
|
||||||
"react": "^19.2.0",
|
"react": "^19.2.0",
|
||||||
"tailwindcss": "^4.1.16",
|
"tailwindcss": "^4.1.17",
|
||||||
"vite": "^7.1.12"
|
"vite": "^7.2.2"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
|
|||||||
528
pnpm-lock.yaml
generated
528
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,9 @@ const app = useContextKey('app')
|
|||||||
app.route({
|
app.route({
|
||||||
path: 'test-import',
|
path: 'test-import',
|
||||||
description: 'test dynamic import module',
|
description: 'test dynamic import module',
|
||||||
|
metadata: {
|
||||||
|
group: 'test'
|
||||||
|
}
|
||||||
}).define(async(ctx)=>{
|
}).define(async(ctx)=>{
|
||||||
|
|
||||||
ctx.body = 'test-import'
|
ctx.body = 'test-import'
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ const fetchTest = async () => {
|
|||||||
console.log('Fetch Test Data:', data);
|
console.log('Fetch Test Data:', data);
|
||||||
}
|
}
|
||||||
const dynamicImport = async () => {
|
const dynamicImport = async () => {
|
||||||
|
// @ts-ignore
|
||||||
const module = await import('http://localhost:4321/test-import.js');
|
const module = await import('http://localhost:4321/test-import.js');
|
||||||
console.log('Dynamically Imported Module:', module);
|
console.log('Dynamically Imported Module:', module);
|
||||||
console.log('Test Function Output:', module.test());
|
console.log('Test Function Output:', module.test());
|
||||||
@@ -27,11 +28,16 @@ const dynamicImport = async () => {
|
|||||||
}
|
}
|
||||||
export const App = () => {
|
export const App = () => {
|
||||||
const [appRoutes, setAppRoutes] = useState(getAppRoutes());
|
const [appRoutes, setAppRoutes] = useState(getAppRoutes());
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setAppRoutes(getAppRoutes());
|
setAppRoutes(getAppRoutes());
|
||||||
}, []);
|
}, []);
|
||||||
return <div>Web Command App
|
return <div className='container mx-auto p-4'>
|
||||||
|
<div>
|
||||||
|
<textarea className='web-command-textarea border '></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Web Command App
|
||||||
<pre onClick={async () => {
|
<pre onClick={async () => {
|
||||||
|
|
||||||
await dynamicImport()
|
await dynamicImport()
|
||||||
|
|||||||
18
src/components/refresh/index.tsx
Normal file
18
src/components/refresh/index.tsx
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { useEffect, useState, Fragment } from "react";
|
||||||
|
|
||||||
|
export const Refresh = (props: { children: React.ReactNode }) => {
|
||||||
|
const [tick, setTick] = useState(0);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const listener = () => {
|
||||||
|
setTick(prevTick => prevTick + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
document?.addEventListener('refresh', listener);
|
||||||
|
return () => {
|
||||||
|
document?.removeEventListener('refresh', listener);
|
||||||
|
}
|
||||||
|
}, []) // 空依赖数组是正确的,因为我们使用了函数式更新
|
||||||
|
|
||||||
|
return <Fragment key={tick}>{props.children}</Fragment>
|
||||||
|
}
|
||||||
17
src/data/docs/login/wx-open-app.md
Normal file
17
src/data/docs/login/wx-open-app.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
title: '微信登录方案'
|
||||||
|
tags: ['首页', '工作台', '登录']
|
||||||
|
createdAt: 2025-10-28 11:18
|
||||||
|
updatedAt: 2025-10-28 11:18
|
||||||
|
---
|
||||||
|
|
||||||
|
# 首页描述
|
||||||
|
|
||||||
|
微信登录方案,有多个,这里记录关于开发平台登录和公众号登录方案。
|
||||||
|
|
||||||
|
## 功能设计
|
||||||
|
|
||||||
|
触发登录动作,生成二维码,显示弹窗。
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
Reference in New Issue
Block a user