聊天:添加屏蔽
This commit is contained in:
@@ -386,21 +386,17 @@ export default class Auth extends Service {
|
||||
|
||||
/**
|
||||
* 渠道服登录
|
||||
* @param channelType 渠道类型 37: '37'
|
||||
* @param clientId
|
||||
* @param pst
|
||||
* @param deviceId
|
||||
* @param platform
|
||||
* @param pkgName
|
||||
* @param serverType
|
||||
* @param getuiCID
|
||||
* @returns
|
||||
*/
|
||||
public async channelLogin(channelType: string, clientId: string, pst: string, deviceId: string, platform: string, pkgName: string, serverType: string, getuiCID: string) {
|
||||
public async channelLogin(params: {
|
||||
channelType: string, pst: string, clientId: string, deviceId: string, platform: string, platformAppid: string, childGameId: number, pkgName: string, serverType: string, getuiCID: string
|
||||
}) {
|
||||
const { channelType, pst, clientId, deviceId, platform, platformAppid, childGameId, pkgName, serverType, getuiCID } = params;
|
||||
|
||||
const ctx = this.ctx;
|
||||
const ip = ctx.request.ip;
|
||||
|
||||
let requestResult = await loginValidata(channelType, clientId, pst)
|
||||
let requestResult = await loginValidata(channelType, { clientId, pst, platformAppid, childGameId });
|
||||
if(!requestResult) return this.ctx.service.utils.resResult(STATUS.CHANNEL_ERR);
|
||||
if(requestResult.code != 1) {
|
||||
return this.ctx.service.utils.resResult(STATUS.VALIDATE_ERR, requestResult);
|
||||
@@ -408,7 +404,9 @@ export default class Auth extends Service {
|
||||
|
||||
let channelId = getChannelId(channelType, requestResult.data.uid);
|
||||
const token = ctx.service.utils.generateStr(256);
|
||||
let user = await UserModel.createOrUpdateChannelUser(channelId, channelType, requestResult.data, token, platform, pkgName, serverType, deviceId, ip);
|
||||
let user = await UserModel.createOrUpdateChannelUser(channelId, channelType, {
|
||||
...requestResult.data, childGameId, platformAppid
|
||||
}, token, platform, pkgName, serverType, deviceId, ip);
|
||||
if (getuiCID) {//更新个推cid
|
||||
await UserModel.updateGetuiCIDByChannel(channelId, getuiCID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user