style: lint

This commit is contained in:
手瓜一十雪 2024-10-29 18:48:20 +08:00
parent c1c4bdfe94
commit 4d2fccdfb4
5 changed files with 27 additions and 28 deletions

View File

@ -12,7 +12,6 @@ import {
import { isNumeric, solveAsyncProblem } from '@/common/helper'; import { isNumeric, solveAsyncProblem } from '@/common/helper';
import { LimitedHashTable } from '@/common/message-unique'; import { LimitedHashTable } from '@/common/message-unique';
import { NTEventWrapper } from '@/common/event'; import { NTEventWrapper } from '@/common/event';
import { b, c } from 'vite/dist/node/types.d-aGj9QkWt';
export class NTQQGroupApi { export class NTQQGroupApi {
context: InstanceContext; context: InstanceContext;

View File

@ -191,7 +191,7 @@ export class NTQQPacketApi {
async sendMiniAppShareInfoReq(param: MiniAppReqParams) { async sendMiniAppShareInfoReq(param: MiniAppReqParams) {
const data = this.packetSession?.packer.packMiniAppAdaptShareInfo(param); const data = this.packetSession?.packer.packMiniAppAdaptShareInfo(param);
const ret = await this.sendPacket("LightAppSvc.mini_app_share.AdaptShareInfo", data!, true); 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; return JSON.parse(body.content.jsonContent) as MiniAppRawData;
} }
} }

View File

@ -38,7 +38,7 @@ export abstract class MiniAppInfo {
}); });
MiniAppInfo.appMap.set("bili", this); MiniAppInfo.appMap.set("bili", this);
} }
} };
static WeiBo = new class extends MiniAppInfo { static WeiBo = new class extends MiniAppInfo {
constructor() { constructor() {
@ -56,7 +56,7 @@ export abstract class MiniAppInfo {
}); });
MiniAppInfo.appMap.set("weibo", this); MiniAppInfo.appMap.set("weibo", this);
} }
} };
} }
export class MiniAppInfoHelper { export class MiniAppInfoHelper {

View File

@ -742,6 +742,6 @@ export class PacketPacker {
} }
} }
) )
) );
} }
} }

View File

@ -1,8 +1,8 @@
import {ActionName} from '../types'; import { ActionName } from '../types';
import {FromSchema, JSONSchema} from 'json-schema-to-ts'; import { FromSchema, JSONSchema } from 'json-schema-to-ts';
import {GetPacketStatusDepends} from "@/onebot/action/packet/GetPacketStatus"; import { GetPacketStatusDepends } from "@/onebot/action/packet/GetPacketStatus";
import {MiniAppData, MiniAppRawData, MiniAppReqCustomParams, MiniAppReqParams} from "@/core/packet/entities/miniApp"; import { MiniAppData, MiniAppRawData, MiniAppReqCustomParams, MiniAppReqParams } from "@/core/packet/entities/miniApp";
import {MiniAppInfo, MiniAppInfoHelper} from "@/core/packet/helper/miniAppHelper"; import { MiniAppInfo, MiniAppInfoHelper } from "@/core/packet/helper/miniAppHelper";
const SchemaData = { const SchemaData = {
type: 'object', type: 'object',
@ -11,21 +11,21 @@ const SchemaData = {
type: 'string', type: 'string',
enum: ['bili', 'weibo'] enum: ['bili', 'weibo']
}, },
title: {type: 'string'}, title: { type: 'string' },
desc: {type: 'string'}, desc: { type: 'string' },
picUrl: {type: 'string'}, picUrl: { type: 'string' },
jumpUrl: {type: 'string'}, jumpUrl: { type: 'string' },
iconUrl: {type: 'string'}, iconUrl: { type: 'string' },
sdkId: {type: 'string'}, sdkId: { type: 'string' },
appId: {type: 'string'}, appId: { type: 'string' },
scene: {type: ['number', 'string']}, scene: { type: ['number', 'string'] },
templateType: {type: ['number', 'string']}, templateType: { type: ['number', 'string'] },
businessType: {type: ['number', 'string']}, businessType: { type: ['number', 'string'] },
verType: {type: ['number', 'string']}, verType: { type: ['number', 'string'] },
shareType: {type: ['number', 'string']}, shareType: { type: ['number', 'string'] },
versionId: {type: 'string'}, versionId: { type: 'string' },
withShareTicket: {type: ['number', 'string']}, withShareTicket: { type: ['number', 'string'] },
rawArkData: {type: ['boolean', 'string']} rawArkData: { type: ['boolean', 'string'] }
}, },
oneOf: [ oneOf: [
{ {
@ -75,11 +75,11 @@ export class GetMiniAppArk extends GetPacketStatusDepends<Payload, {
versionId: versionId, versionId: versionId,
withShareTicket: +withShareTicket withShareTicket: +withShareTicket
} }
) );
} }
const arkData = await this.core.apis.PacketApi.sendMiniAppShareInfoReq(reqParam); const arkData = await this.core.apis.PacketApi.sendMiniAppShareInfoReq(reqParam);
return { return {
data: Boolean(payload.rawArkData) ? arkData : MiniAppInfoHelper.RawToSend(arkData) data: payload.rawArkData ? arkData : MiniAppInfoHelper.RawToSend(arkData)
} };
} }
} }