用户在线状态处理
This commit is contained in:
@@ -255,9 +255,10 @@ class UserService {
|
||||
|
||||
/**
|
||||
* 用户签到
|
||||
* @param initialLocation 初始位置数据(必须)
|
||||
* @returns 签到结果和更新后的用户信息
|
||||
*/
|
||||
async signIn(): Promise<{ success: boolean; employeeInfo: EmployeeInfo; message?: string }> {
|
||||
async signIn(initialLocation: { latitude: number; longitude: number; timestamp: number }): Promise<{ success: boolean; employeeInfo: EmployeeInfo; message?: string }> {
|
||||
const userInfo = this.getGlobalUserInfo();
|
||||
if (!userInfo || !userInfo.id) {
|
||||
throw new Error('用户未登录,无法签到');
|
||||
@@ -269,7 +270,7 @@ class UserService {
|
||||
throw new Error('用户认证信息缺失,请重新登录');
|
||||
}
|
||||
|
||||
return apiService.userSignIn(userInfo.id);
|
||||
return apiService.userSignIn(userInfo.id, initialLocation);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user