fix: some bug

This commit is contained in:
夜鹰 2023-02-15 15:37:40 +08:00
parent 2293ef9ad5
commit 659f9f42ae
3 changed files with 7 additions and 14 deletions

View File

@ -315,7 +315,7 @@ export class UserModalComponent implements OnInit, OnDestroy {
this.store.clearAuth();
return;
}
this.trace.setUserID(data.userId);
this.trace.setUser({ loginUserId: data.userId });
// * 0=邮箱 1=手机号 2=wx 3=qq 4=飞书 5=github 6=帐号 7=跳转登录
const hash = new Map().set(0, '邮箱').set(1, '手机号').set(2, 'Wecaht').set(3, 'QQ').set(4, 'Feishu').set(5, 'Github').set(6, '账号');
// (0, '登录').set(1, '注册');
@ -325,9 +325,7 @@ export class UserModalComponent implements OnInit, OnDestroy {
}
if (data.type == 1) {
// * register
this.trace.report('register_success', {
register_way: hash.get(data.loginWay)
});
this.trace.setUser({ register_way: hash.get(data.loginWay) });
}
this.store.setLoginInfo(data);
this.effect.updateWorkspaceList();
@ -420,7 +418,7 @@ export class UserModalComponent implements OnInit, OnDestroy {
this.eMessage.error($localize`Please check you username or password`);
return;
}
this.trace.setUserID(data.userId);
this.trace.setUser({ loginUserId: data.userId });
// * 0=邮箱 1=手机号 2=wx 3=qq 4=飞书 5=github 6=帐号 7=跳转登录
const hash = new Map().set(0, '邮箱').set(1, '手机号').set(2, 'Wecaht').set(3, 'QQ').set(4, 'Feishu').set(5, 'Github').set(6, '账号');
// (0, '登录').set(1, '注册');
@ -430,9 +428,7 @@ export class UserModalComponent implements OnInit, OnDestroy {
}
if (data.type == 1) {
// * register
this.trace.report('register_success', {
register_way: hash.get(data.loginWay)
});
this.trace.setUser({ register_way: hash.get(data.loginWay) });
}
this.store.setLoginInfo(data);
this.effect.updateWorkspaceList();

View File

@ -168,7 +168,7 @@ export class ApiEditComponent implements OnDestroy, TabViewComponent {
this.trace.report('add_api_document_success', {
trigger_way: ux,
workspace_type: this.globalStore.isLocal ? 'local' : 'cloud',
param_type: IMPORT_MUI[this.model.requestParams?.bodyParams?.at(0)?.dataType] || ''
param_type: IMPORT_MUI[this.model.apiAttrInfo.contentType] || ''
});
const data = this.getFormdata();
this.initialModel = this.apiEditUtil.formatEditingApiData(data);

View File

@ -26,11 +26,8 @@ export class TraceService {
console.log('trace =>>', eventId, JSON.stringify(params, null, 2));
gio('track', eventId, params);
}
setUserID(id) {
if (!id) {
return;
}
gio('setUserId', id);
setUser(data = {}) {
gio('people.set', data);
}
start() {
gio('config', { dataCollect: false });