Skip to content

Commit

Permalink
fix: gio bind userID
Browse files Browse the repository at this point in the history
  • Loading branch information
scarqin committed Feb 15, 2023
1 parent 1b16017 commit 441322f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export class UserModalComponent implements OnInit, OnDestroy {
this.store.clearAuth();
return;
}
this.trace.setUser({ loginUserId: data.userId });
this.trace.setUserID(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, '注册');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export class TraceService {
// console.log('trace =>>', eventId, JSON.stringify(params, null, 2));
gio('track', eventId, params);
}
setUserID(id) {
gio('setUserId', id);
}
setUser(data = {}) {
gio('people.set', data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/workbench/browser/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
(n.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + g),
tag.parentNode.insertBefore(n, tag);
})(window, document, 'script', 'assets.giocdn.com/2.1/gio.js', 'gio');
// @ts-ignore
gio('init', 'bd7645ddc19400a8', {});
//custom page code begin here

//Electron use hash mode
if (!!window.electron) {
gio('config', { hashtag: true });
Expand Down

0 comments on commit 441322f

Please sign in to comment.