import { STATUS } from '@consts'; import { httpRequest } from 'app/pubUtils/httpUtil'; import { Controller } from 'egg'; import { PayCallback37Data } from '../domain/sdk'; export default class SdkController extends Controller { public async pay37Callback() { const { ctx } = this; const params: PayCallback37Data = ctx.request.body; ctx.body = await ctx.service.sdk.pay37Callback(params); return; } 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; const params = ctx.request.body; console.log(params) ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, ''); return; } public async getGuildByUser() { const { ctx } = this; ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, ''); return; } }