聊天:添加屏蔽

This commit is contained in:
luying
2021-11-10 17:28:11 +08:00
parent b15a9088e8
commit 32fe508625
16 changed files with 260 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
import { STATUS } from '@consts';
import { httpRequest } from 'app/pubUtils/httpUtil';
import { Controller } from 'egg';
import { PayCallback37Data } from '../domain/sdk';
@@ -14,15 +15,26 @@ export default class SdkController extends Controller {
public async treatRoleName() {
const { ctx } = this;
let test = await httpRequest('http://127.0.0.1:7001/cb/treatguildname', "POST", {}, null);
console.log('result: ', typeof test, test);
ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, '');
return;
}
public async treatGuildName() {
const { ctx } = this;
let promiseFun = () => {
return new Promise(resolve => {
ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, '');
setTimeout(() => {
resolve(ctx.service.utils.resResult(STATUS.SUCCESS, ''));
}, 1000)
})
}
ctx.body = await promiseFun();
return;
}
public async getGuildByUser() {