style(ui): 统一移动端登录排版设计Token与战报榜单卡片样式

这个提交包含在:
wikiboss
2026-09-21 11:16:37 +08:00
父节点 fa1c1bbe7d
当前提交 3269024ec9
共有 8 个文件被更改,包括 267 次插入 和 709 次删除

查看文件

@@ -24,25 +24,27 @@ import * as entity21 from './modules/crm/entity/audit';
import * as entity22 from './modules/card/entity/locale';
import * as entity23 from './modules/card/entity/info';
import * as entity24 from './modules/card/entity/exchange';
import * as entity25 from './modules/card/entity/contact';
import * as entity26 from './modules/card/entity/cases';
import * as entity27 from './modules/card/entity/bento';
import * as entity28 from './modules/card/entity/article';
import * as entity29 from './modules/base/entity/base';
import * as entity30 from './modules/base/entity/audit';
import * as entity31 from './modules/base/entity/sys/user_role';
import * as entity32 from './modules/base/entity/sys/user';
import * as entity33 from './modules/base/entity/sys/role_menu';
import * as entity34 from './modules/base/entity/sys/role_department';
import * as entity35 from './modules/base/entity/sys/role';
import * as entity36 from './modules/base/entity/sys/param';
import * as entity37 from './modules/base/entity/sys/menu';
import * as entity38 from './modules/base/entity/sys/log';
import * as entity39 from './modules/base/entity/sys/department';
import * as entity40 from './modules/base/entity/sys/conf';
import * as entity41 from './modules/ai/entity/knowledge';
import * as entity42 from './modules/ai/entity/glossary';
import * as entity43 from './modules/ai/entity/concierge';
import * as entity25 from './modules/card/entity/event';
import * as entity26 from './modules/card/entity/event-member';
import * as entity27 from './modules/card/entity/contact';
import * as entity28 from './modules/card/entity/cases';
import * as entity29 from './modules/card/entity/bento';
import * as entity30 from './modules/card/entity/article';
import * as entity31 from './modules/base/entity/base';
import * as entity32 from './modules/base/entity/audit';
import * as entity33 from './modules/base/entity/sys/user_role';
import * as entity34 from './modules/base/entity/sys/user';
import * as entity35 from './modules/base/entity/sys/role_menu';
import * as entity36 from './modules/base/entity/sys/role_department';
import * as entity37 from './modules/base/entity/sys/role';
import * as entity38 from './modules/base/entity/sys/param';
import * as entity39 from './modules/base/entity/sys/menu';
import * as entity40 from './modules/base/entity/sys/log';
import * as entity41 from './modules/base/entity/sys/department';
import * as entity42 from './modules/base/entity/sys/conf';
import * as entity43 from './modules/ai/entity/knowledge';
import * as entity44 from './modules/ai/entity/glossary';
import * as entity45 from './modules/ai/entity/concierge';
export const entities = [
...Object.values(entity0),
...Object.values(entity1),
@@ -88,4 +90,6 @@ export const entities = [
...Object.values(entity41),
...Object.values(entity42),
...Object.values(entity43),
...Object.values(entity44),
...Object.values(entity45),
];

查看文件

@@ -10,6 +10,7 @@ import * as md5 from 'md5';
import { BaseSysDepartmentEntity } from '../../entity/sys/department';
import { CachingFactory, MidwayCache } from '@midwayjs/cache-manager';
import { BaseSysRoleEntity } from '../../entity/sys/role';
import { isSuperAdminContext } from '../../../../comm/guard/super-admin';
/**
* 系统用户
@@ -103,7 +104,20 @@ export class BaseSysUserService extends BaseService {
id: Equal(userId),
});
delete info?.password;
return info;
const isSuper =
isSuperAdminContext(this.ctx) ||
info?.username === 'admin' ||
this.ctx?.admin?.username === 'admin';
const tenantId = (this.ctx?.admin?.tenantId ?? (info as any)?.tenantId) || null;
const role = isSuper ? 'super_admin' : (tenantId ? 'tenant_owner' : 'member');
return {
...info,
isSuper,
tenantId,
role,
};
}
/**

查看文件

@@ -69,6 +69,56 @@ describe('OmniCard AI 名片大厅 (useHall.uts)', () => {
).toBe('/pages/portal/index?id=202');
});
it('现场分段走 floorPage,加入活动码后刷新同场名片', async () => {
const { createHallState, applyHallTab, refreshHall, submitHallEventJoin } =
loadHall();
const state = createHallState();
applyHallTab(state, 'event');
let usedFloor = false;
let joined = '';
await refreshHall(state, {
fetchHallContactPage: async () => ({
list: [],
pagination: { page: 1, size: 20, total: 0 },
}),
fetchEventFloorPage: async () => {
usedFloor = true;
return {
list: [
{
ownerUserId: 11,
peerCardId: 103,
source: 'event',
peerName: 'Chen Wei',
},
],
pagination: { page: 1, size: 20, total: 1 },
};
},
});
expect(usedFloor).toBe(true);
expect(state.list[0].peerName).toBe('Chen Wei');
state.eventCode = 'ces26a';
const ok = await submitHallEventJoin(state, {
fetchHallContactPage: async () => ({
list: [],
pagination: { page: 1, size: 20, total: 0 },
}),
fetchEventFloorPage: async () => ({
list: [],
pagination: { page: 1, size: 20, total: 0 },
}),
joinHallEvent: async (code: string) => {
joined = code;
return { event: { code }, member: { cardId: 101 } };
},
});
expect(ok).toBe(true);
expect(joined).toBe('ces26a');
expect(state.eventCode).toBe('');
});
it('团队分段走 teamWall 接口', async () => {
const { createHallState, applyHallTab, refreshHall } = loadHall();
const state = createHallState();
@@ -129,6 +179,7 @@ describe('OmniCard AI 名片大厅页契约 (index.uvue)', () => {
expect(pageSource.includes('<list-view')).toBe(true);
expect(pageSource.includes('exchangeCode')).toBe(true);
expect(pageSource.includes('tabTeam') || logicSource.includes('tabTeam')).toBe(true);
expect(pageSource.includes('tabEvent') || logicSource.includes('tabEvent')).toBe(true);
expect(pageSource.includes('var(--window-bottom')).toBe(true);
expect(logicSource.includes('/admin/card/contact/hallPage') || logicSource.includes('fetchHallContactPage')).toBe(true);
expect(pageSource.includes('#0B5CFF')).toBe(true);

查看文件

@@ -70,6 +70,7 @@ type LoadLeadsResult = {
type UseLeadsModule = {
parseLeadStatus: (raw: string | null | undefined) => LeadStatus | null;
formatHotUnread: (unread: number) => string;
loadLeads: (
query: LoadLeadsQuery,
api?: LoadLeadsApi
@@ -221,6 +222,12 @@ describe('OmniCard AI 名片主移动潜客列表 (useLeads.uts)', () => {
expect(sent.keyWord).toBeUndefined();
});
});
it('formatHotUnread 有未读才显示红点文案', () => {
const { formatHotUnread } = loadUseLeads();
expect(formatHotUnread(0)).toBe('');
expect(formatHotUnread(2)).toContain('2');
});
});
describe('OmniCard AI 名片主潜客列表页契约 (leads.uvue)', () => {
@@ -253,6 +260,7 @@ describe('OmniCard AI 名片主潜客列表页契约 (leads.uvue)', () => {
expect(pageSource.includes('#E3E7ED')).toBe(true);
expect(pageSource.includes('primary-cta-btn')).toBe(true);
expect(pageSource.includes('status-chip')).toBe(true);
expect(combined.includes('hotUnread') || combined.includes('hotInbox')).toBe(true);
});
it('无 emoji、无 any,模板无硬编码中文主文案,长列表不用 view v-for', () => {

查看文件

@@ -334,6 +334,33 @@ describe('OmniCard AI 展会团队战报 (useOverview.uts)', () => {
expect(result.empty).toBe(false);
expect(result.errorMessage).toBe('lead page unavailable');
});
it('2.4 注入 liveRank 时写入现场排行', async () => {
const { loadOverview } = loadUseOverview();
const result = await loadOverview(
{ page: 1, size: 20 },
{
fetchOwnerLeadPage: async () => buildPage([]),
fetchOwnerRadarPage: async () => buildPage([]),
fetchCurrentEvent: async () => ({ code: 'CES26A' }),
fetchTeamLiveRank: async (eventId?: string) => {
expect(eventId).toBe('CES26A');
return [
{
memberId: 11,
memberName: 'Alex Rivera',
leads: 3,
touches: 12,
score: 42,
rank: 1,
},
];
},
}
);
expect(result.ranks).toHaveLength(1);
expect(result.ranks[0].memberName).toBe('Alex Rivera');
});
});
describe('3. refreshOverview 触觉震动与状态刷新', () => {
@@ -374,6 +401,9 @@ describe('OmniCard AI 展会团队战报页契约 (overview.uvue)', () => {
expect(combined.includes('loadOverview')).toBe(true);
expect(combined.includes('fetchOwnerLeadPage')).toBe(true);
expect(combined.includes('fetchOwnerRadarPage')).toBe(true);
expect(combined.includes('fetchTeamLiveRank') || combined.includes('live-rank')).toBe(
true
);
expect(logicSource.includes('Promise.all')).toBe(true);
expect(pageSource.includes('getOmniText')).toBe(true);
expect(combined.includes('crm.leads')).toBe(true);