mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
style: lint
This commit is contained in:
parent
c1c4bdfe94
commit
4d2fccdfb4
@ -12,7 +12,6 @@ import {
|
||||
import { isNumeric, solveAsyncProblem } from '@/common/helper';
|
||||
import { LimitedHashTable } from '@/common/message-unique';
|
||||
import { NTEventWrapper } from '@/common/event';
|
||||
import { b, c } from 'vite/dist/node/types.d-aGj9QkWt';
|
||||
|
||||
export class NTQQGroupApi {
|
||||
context: InstanceContext;
|
||||
|
@ -191,7 +191,7 @@ export class NTQQPacketApi {
|
||||
async sendMiniAppShareInfoReq(param: MiniAppReqParams) {
|
||||
const data = this.packetSession?.packer.packMiniAppAdaptShareInfo(param);
|
||||
const ret = await this.sendPacket("LightAppSvc.mini_app_share.AdaptShareInfo", data!, true);
|
||||
const body = new NapProtoMsg(MiniAppAdaptShareInfoResp).decode(Buffer.from(ret.hex_data, 'hex'))
|
||||
const body = new NapProtoMsg(MiniAppAdaptShareInfoResp).decode(Buffer.from(ret.hex_data, 'hex'));
|
||||
return JSON.parse(body.content.jsonContent) as MiniAppRawData;
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ export abstract class MiniAppInfo {
|
||||
});
|
||||
MiniAppInfo.appMap.set("bili", this);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static WeiBo = new class extends MiniAppInfo {
|
||||
constructor() {
|
||||
@ -56,7 +56,7 @@ export abstract class MiniAppInfo {
|
||||
});
|
||||
MiniAppInfo.appMap.set("weibo", this);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export class MiniAppInfoHelper {
|
||||
|
@ -742,6 +742,6 @@ export class PacketPacker {
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {ActionName} from '../types';
|
||||
import {FromSchema, JSONSchema} from 'json-schema-to-ts';
|
||||
import {GetPacketStatusDepends} from "@/onebot/action/packet/GetPacketStatus";
|
||||
import {MiniAppData, MiniAppRawData, MiniAppReqCustomParams, MiniAppReqParams} from "@/core/packet/entities/miniApp";
|
||||
import {MiniAppInfo, MiniAppInfoHelper} from "@/core/packet/helper/miniAppHelper";
|
||||
import { ActionName } from '../types';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import { GetPacketStatusDepends } from "@/onebot/action/packet/GetPacketStatus";
|
||||
import { MiniAppData, MiniAppRawData, MiniAppReqCustomParams, MiniAppReqParams } from "@/core/packet/entities/miniApp";
|
||||
import { MiniAppInfo, MiniAppInfoHelper } from "@/core/packet/helper/miniAppHelper";
|
||||
|
||||
const SchemaData = {
|
||||
type: 'object',
|
||||
@ -11,21 +11,21 @@ const SchemaData = {
|
||||
type: 'string',
|
||||
enum: ['bili', 'weibo']
|
||||
},
|
||||
title: {type: 'string'},
|
||||
desc: {type: 'string'},
|
||||
picUrl: {type: 'string'},
|
||||
jumpUrl: {type: 'string'},
|
||||
iconUrl: {type: 'string'},
|
||||
sdkId: {type: 'string'},
|
||||
appId: {type: 'string'},
|
||||
scene: {type: ['number', 'string']},
|
||||
templateType: {type: ['number', 'string']},
|
||||
businessType: {type: ['number', 'string']},
|
||||
verType: {type: ['number', 'string']},
|
||||
shareType: {type: ['number', 'string']},
|
||||
versionId: {type: 'string'},
|
||||
withShareTicket: {type: ['number', 'string']},
|
||||
rawArkData: {type: ['boolean', 'string']}
|
||||
title: { type: 'string' },
|
||||
desc: { type: 'string' },
|
||||
picUrl: { type: 'string' },
|
||||
jumpUrl: { type: 'string' },
|
||||
iconUrl: { type: 'string' },
|
||||
sdkId: { type: 'string' },
|
||||
appId: { type: 'string' },
|
||||
scene: { type: ['number', 'string'] },
|
||||
templateType: { type: ['number', 'string'] },
|
||||
businessType: { type: ['number', 'string'] },
|
||||
verType: { type: ['number', 'string'] },
|
||||
shareType: { type: ['number', 'string'] },
|
||||
versionId: { type: 'string' },
|
||||
withShareTicket: { type: ['number', 'string'] },
|
||||
rawArkData: { type: ['boolean', 'string'] }
|
||||
},
|
||||
oneOf: [
|
||||
{
|
||||
@ -75,11 +75,11 @@ export class GetMiniAppArk extends GetPacketStatusDepends<Payload, {
|
||||
versionId: versionId,
|
||||
withShareTicket: +withShareTicket
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
const arkData = await this.core.apis.PacketApi.sendMiniAppShareInfoReq(reqParam);
|
||||
return {
|
||||
data: Boolean(payload.rawArkData) ? arkData : MiniAppInfoHelper.RawToSend(arkData)
|
||||
}
|
||||
data: payload.rawArkData ? arkData : MiniAppInfoHelper.RawToSend(arkData)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user