数数:创建角色埋点放到服务器
This commit is contained in:
@@ -302,7 +302,7 @@ export default class Auth extends Service {
|
||||
return ctx.service.utils.resResult(STATUS.ROLE_NOT_FOUND);
|
||||
}
|
||||
|
||||
public async createRole(serverId: number) {
|
||||
public async createRole(serverId: number, distinctId: string) {
|
||||
console.log('enter Auth createRole');
|
||||
const ctx = this.ctx;
|
||||
const { uid } = ctx;
|
||||
@@ -324,6 +324,7 @@ export default class Auth extends Service {
|
||||
// 任务
|
||||
await checkTask(roleId, TASK_TYPE.ROLE_LV, role.lv, false, {});
|
||||
|
||||
ctx.service.sdk.reportTAEventWithRoleIdAndDistinctId(roleId, distinctId, TA_EVENT.REGISTER, null, ctx.clientIp);
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, { roleId: role.roleId });
|
||||
}
|
||||
return ctx.service.utils.resResult(STATUS.ROLE_NOT_FOUND);
|
||||
@@ -401,7 +402,7 @@ export default class Auth extends Service {
|
||||
public async channelLogin(params: {
|
||||
channelType: string, pst: string, clientId: string, deviceId: string, platform: string, platformAppid: string, childGameId: number, pkgName: string, serverType: string, getuiCID: string, distinctId: string
|
||||
}) {
|
||||
const { channelType, pst, clientId, deviceId, platform, platformAppid, childGameId, pkgName, serverType, getuiCID, distinctId } = params;
|
||||
const { channelType, pst, clientId, deviceId, platform, platformAppid, childGameId, pkgName, serverType, getuiCID } = params;
|
||||
|
||||
const ctx = this.ctx;
|
||||
|
||||
@@ -418,7 +419,7 @@ export default class Auth extends Service {
|
||||
...requestResult.data, childGameId, platformAppid
|
||||
}, token, platform, pkgName, serverType, deviceId, ctx.clientIp);
|
||||
if(isCreate) {
|
||||
ctx.service.sdk.reportTAEventWithDistinctId(distinctId, TA_EVENT.REGISTER, null, ctx.clientIp);
|
||||
// ctx.service.sdk.reportTAEventWithDistinctId(distinctId, TA_EVENT.REGISTER, null, ctx.clientIp);
|
||||
}
|
||||
|
||||
if (getuiCID) {//更新个推cid
|
||||
|
||||
Reference in New Issue
Block a user