permission
This commit is contained in:
+57
-32
@@ -7,28 +7,55 @@ export type UserStatus = (typeof USER_STATUS)[keyof typeof USER_STATUS]
|
||||
|
||||
export interface MockUser {
|
||||
id: number
|
||||
username: string
|
||||
mini_id: number
|
||||
openid: string
|
||||
union_id: string
|
||||
nickname: string
|
||||
mobile: string
|
||||
email: string
|
||||
status: UserStatus
|
||||
deptName: string
|
||||
roleNames: string[]
|
||||
createTime: string
|
||||
avatar: string
|
||||
status: 0 | 1
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export const users: MockUser[] = Array.from({ length: 36 }, (_, index) => {
|
||||
export const users: MockUser[] = Array.from({ length: 15 }, (_, index) => {
|
||||
const id = index + 1
|
||||
return {
|
||||
id,
|
||||
username: `user${String(id).padStart(3, '0')}`,
|
||||
nickname: `测试用户${id}`,
|
||||
mobile: `13${String(100000000 + id).slice(0, 9)}`,
|
||||
email: `user${id}@example.com`,
|
||||
status: id % 5 === 0 ? USER_STATUS.DISABLED : USER_STATUS.ENABLED,
|
||||
deptName: id % 3 === 0 ? '运营部' : '技术部',
|
||||
roleNames: id % 4 === 0 ? ['管理员'] : ['普通用户'],
|
||||
createTime: new Date(Date.now() - id * 86400000).toISOString(),
|
||||
mini_id: (id % 3) + 1,
|
||||
openid: `oABC${String(100000 + id)}`,
|
||||
union_id: id % 2 === 0 ? `uXYZ${id}` : '',
|
||||
nickname: `用户${id}`,
|
||||
avatar: `https://picsum.photos/seed/${id}/80`,
|
||||
status: id % 4 === 0 ? 0 : 1,
|
||||
created_at: new Date(Date.now() - id * 86400000).toISOString(),
|
||||
updated_at: new Date(Date.now() - id * 3600000).toISOString(),
|
||||
}
|
||||
})
|
||||
|
||||
export interface MockMiniApp {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
app_id: string
|
||||
app_secret: string
|
||||
status: 0 | 1
|
||||
ext: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export const miniApps: MockMiniApp[] = Array.from({ length: 12 }, (_, index) => {
|
||||
const id = index + 1
|
||||
return {
|
||||
id,
|
||||
name: `小程序${id}`,
|
||||
description: `用于演示的第 ${id} 个小程序`,
|
||||
app_id: `wx${String(1000000000 + id * 137)}`,
|
||||
app_secret: `secret-${id}`,
|
||||
status: id % 3 === 0 ? 0 : 1,
|
||||
ext: '{}',
|
||||
created_at: new Date(Date.now() - id * 86400000).toISOString(),
|
||||
updated_at: new Date(Date.now() - id * 3600000).toISOString(),
|
||||
}
|
||||
})
|
||||
|
||||
@@ -47,20 +74,18 @@ export const menuRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/miniapp',
|
||||
component: 'Layout',
|
||||
redirect: '/miniapp/list',
|
||||
meta: { title: '小程序管理', icon: 'Menu', hidden: false },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
component: 'miniapp/index',
|
||||
name: 'Miniapp',
|
||||
meta: { title: '小程序管理', icon: 'Menu', hidden: false },
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export const dashboardSummary = {
|
||||
userTotal: 1024,
|
||||
orderTotal: 8672,
|
||||
gmv: 1289340.55,
|
||||
pendingApproval: 12,
|
||||
trend: [
|
||||
{ date: '10-01', value: 120 },
|
||||
{ date: '10-02', value: 200 },
|
||||
{ date: '10-03', value: 150 },
|
||||
{ date: '10-04', value: 320 },
|
||||
{ date: '10-05', value: 280 },
|
||||
{ date: '10-06', value: 410 },
|
||||
{ date: '10-07', value: 365 },
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user