v1.1.0: 新增安装统计与版本推送
功能说明: - 安装统计: 每次安装独立计数(含已删除), 存活/已删除, 最后上线时间 - 版本推送: 上传安装包并推送客户端下载, 支持强制更新提示(不阻断授权) - 客户端接口: check-update / heartbeat, verify 成功附带更新字段 - 管理端: 安装统计页 + 版本推送页; agent 不可发布版本(仅只读) - 文档: README API 说明 + /docs 功能介绍与使用方法 + CHANGELOG 数据库: - 新表 ca_installations / ca_project_versions - 增量升级: backend/database/migrations/20261008_add_installations_and_versions.sql
This commit is contained in:
1 parent
af98618810
commit
e809b7a903
22 files changed
+3153
-32
No files matched your search
@@ -22,7 +22,6 @@ const routes = [
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('@/views/layout/MainLayout.vue'),
|
||||
redirect: '/dashboard',
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
@@ -78,6 +77,18 @@ const routes = [
|
||||
component: () => import('@/views/Authorizations.vue'),
|
||||
meta: { title: '授权管理', icon: 'Lock' }
|
||||
},
|
||||
{
|
||||
path: 'installations',
|
||||
name: 'Installations',
|
||||
component: () => import('@/views/Installations.vue'),
|
||||
meta: { title: '安装统计', icon: 'Download' }
|
||||
},
|
||||
{
|
||||
path: 'project-versions',
|
||||
name: 'ProjectVersions',
|
||||
component: () => import('@/views/ProjectVersions.vue'),
|
||||
meta: { title: '版本推送', icon: 'Upload' }
|
||||
},
|
||||
{
|
||||
path: 'coupons',
|
||||
name: 'Coupons',
|
||||
@@ -109,6 +120,18 @@ const routes = [
|
||||
name: 'Shop',
|
||||
component: () => import('@/views/public/Shop.vue'),
|
||||
meta: { title: '购买中心' }
|
||||
},
|
||||
{
|
||||
path: '/docs',
|
||||
name: 'IntroDocs',
|
||||
component: () => import('@/views/public/Docs.vue'),
|
||||
meta: { title: '系统介绍与使用文档' }
|
||||
},
|
||||
{
|
||||
path: '/result',
|
||||
name: 'PaymentResult',
|
||||
component: () => import('@/views/public/PaymentResult.vue'),
|
||||
meta: { title: '支付结果' }
|
||||
}
|
||||
]
|
||||
|
||||
@@ -129,9 +152,14 @@ router.beforeEach((to, from, next) => {
|
||||
document.title = to.meta.title ? `${to.meta.title} - CardAuth` : 'CardAuth'
|
||||
const token = localStorage.getItem('access_token')
|
||||
const userRole = localStorage.getItem('user_role')
|
||||
const publicPaths = ['/login', '/shop', '/agent/login', '/agent/register']
|
||||
const publicPaths = ['/login', '/shop', '/agent/login', '/agent/register', '/docs', '/result']
|
||||
const isPublic = publicPaths.some(p => to.path.startsWith(p))
|
||||
|
||||
// 首页一律显示介绍页;管理员可从介绍页顶部进入后台
|
||||
if (to.path === '/') {
|
||||
return next('/docs')
|
||||
}
|
||||
|
||||
// 未登录访问非公开页面 -> 登录页
|
||||
if (!isPublic && !token) {
|
||||
return next('/login')
|
||||
|
||||
Reference in new issue
Block a user