fix
This commit is contained in:
1 parent
6751e6cc35
commit
7a5bf5e052
2 files changed
+8
-4
No files matched your search
+1
-1
Submodule src/core updated: 2d930457e2...e5a4b1b941.
@@ -4,17 +4,21 @@ import { OB11Constructor } from '../../constructor';
|
|||||||
import BaseAction from '../BaseAction';
|
import BaseAction from '../BaseAction';
|
||||||
import { ActionName } from '../types';
|
import { ActionName } from '../types';
|
||||||
import { NTQQMsgApi } from '@/core/apis/msg';
|
import { NTQQMsgApi } from '@/core/apis/msg';
|
||||||
import { WebApi } from '@/core/apis/webapi';
|
import { GroupEssenceMsgRet, WebApi } from '@/core/apis/webapi';
|
||||||
|
|
||||||
interface PayloadType {
|
interface PayloadType {
|
||||||
group_id: number;
|
group_id: number;
|
||||||
pages: number;
|
pages: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetGroupEssence extends BaseAction<PayloadType, any> {
|
export class GetGroupEssence extends BaseAction<PayloadType, GroupEssenceMsgRet> {
|
||||||
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
|
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
|
||||||
|
|
||||||
protected async _handle(payload: PayloadType) {
|
protected async _handle(payload: PayloadType) {
|
||||||
return await WebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
|
let ret = await WebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
|
||||||
|
if (!ret) {
|
||||||
|
throw new Error('获取失败');
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user