添加管理员逻辑
This commit is contained in:
@@ -148,12 +148,16 @@ export class DataModule {
|
||||
this.updateMarkers(updatedMarkers);
|
||||
} else {
|
||||
// 创建新的用户标记点
|
||||
const userInfo = this.pageContext.data.userInfo;
|
||||
const userRole = userInfo?.role || 'employee';
|
||||
const iconPath = userRole === 'ADMIN' ? '/images/crown.png' : '/images/truck.png';
|
||||
|
||||
const newUserMarker = {
|
||||
id: targetUserId,
|
||||
title: markerTitle,
|
||||
longitude: longitude,
|
||||
latitude: latitude,
|
||||
iconPath: '/images/trucks.png',
|
||||
iconPath: iconPath,
|
||||
width: 40,
|
||||
height: 40,
|
||||
zIndex: targetUserId === -1 ? 99 : 98 // 当前用户层级更高
|
||||
|
Reference in New Issue
Block a user