diff --git a/backend/alembic/versions/a3af70d43e98_011_license_ddl.py b/backend/alembic/versions/a3af70d43e98_011_license_ddl.py new file mode 100644 index 00000000..69f98966 --- /dev/null +++ b/backend/alembic/versions/a3af70d43e98_011_license_ddl.py @@ -0,0 +1,33 @@ +"""011_license_ddl + +Revision ID: a3af70d43e98 +Revises: 8dc3b1bdbfef +Create Date: 2025-06-18 16:09:33.896600 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'a3af70d43e98' +down_revision = '8dc3b1bdbfef' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'license', + sa.Column('id', sa.BigInteger(), primary_key=True, nullable=False), + sa.Column('license_key', sa.Text(), default="", nullable=False), + sa.Column('f2c_license', sa.Text(), default="", nullable=False), + sa.Column('create_time', sa.BigInteger(), default=0, nullable=False), + sa.Column('update_time', sa.BigInteger(), default=0, nullable=False) + ) + op.create_index(op.f('ix_license_id'), 'license', ['id'], unique=False) + + +def downgrade(): + op.drop_table('license') + op.drop_index(op.f('ix_license_id'), table_name='license') diff --git a/backend/main.py b/backend/main.py index df21bfc6..932df913 100644 --- a/backend/main.py +++ b/backend/main.py @@ -15,7 +15,7 @@ from common.core.response_middleware import ResponseMiddleware, exception_handle from alembic.config import Config from alembic import command from fastapi_mcp import FastApiMCP - +import sqlbot_xpack def run_migrations(): alembic_cfg = Config("alembic.ini") @@ -88,6 +88,7 @@ else: mcp.setup_server() +sqlbot_xpack.init_fastapi_app(app) if __name__ == "__main__": import uvicorn diff --git a/frontend/src/api/license.ts b/frontend/src/api/license.ts new file mode 100644 index 00000000..b68589a1 --- /dev/null +++ b/frontend/src/api/license.ts @@ -0,0 +1,7 @@ +import { request } from '@/utils/request' + +export const licenseApi = { + validate: () => request.get('/system/license'), + version: () => request.get('/system/license/version'), + update: (data: any) => request.post('/system/license', data), +} diff --git a/frontend/src/assets/img/about-bg.png b/frontend/src/assets/img/about-bg.png new file mode 100644 index 00000000..4076b9eb Binary files /dev/null and b/frontend/src/assets/img/about-bg.png differ diff --git a/frontend/src/assets/svg/logo.svg b/frontend/src/assets/svg/logo.svg new file mode 100644 index 00000000..6acaee20 --- /dev/null +++ b/frontend/src/assets/svg/logo.svg @@ -0,0 +1,21 @@ + + + diff --git a/frontend/src/components/about/index.ts b/frontend/src/components/about/index.ts new file mode 100644 index 00000000..b4d88919 --- /dev/null +++ b/frontend/src/components/about/index.ts @@ -0,0 +1,11 @@ +export interface F2CLicense { + isv: string + status: string + corporation: string + expired: string + count: number + version: string + edition: string + serialNo: string + remark: string +} diff --git a/frontend/src/components/about/index.vue b/frontend/src/components/about/index.vue new file mode 100644 index 00000000..c5e9f966 --- /dev/null +++ b/frontend/src/components/about/index.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/frontend/src/components/layout/index.vue b/frontend/src/components/layout/index.vue index f7b8a455..0aa85842 100644 --- a/frontend/src/components/layout/index.vue +++ b/frontend/src/components/layout/index.vue @@ -84,6 +84,7 @@ + About @@ -116,6 +117,7 @@ + About @@ -153,6 +155,7 @@ +