Skip to content

Commit

Permalink
feat: test
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Jun 16, 2024
1 parent ebf461f commit 650cdf2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions NapCatNative'.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let t = require('./NapCatNative.node');
console.log(t);
let r = t.ClearElectronAsNode();
console.log(r);
9 changes: 7 additions & 2 deletions src/common/utils/Packet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@

import { NTQQSystemApi } from "@/core";

// 前排提示: 开发验证仅Win平台开展 Linux平台可行 但需要适配
// 前排提示: 开发验证仅Win平台开展
export class MiniAppUtil {
static async RunMiniAppWithGUI() {
process.env.ELECTRON_RUN_AS_NODE = "1";//没用还是得自己用cpp之类的语言写个程序转发参数
//process.env.ELECTRON_RUN_AS_NODE = undefined;//没用还是得自己用cpp之类的语言写个程序转发参数
return NTQQSystemApi.BootMiniApp(process.execPath, "miniapp://open/1007?url=https%3A%2F%2Fm.q.qq.com%2Fa%2Fs%2Fedd0a83d3b8afe233dfa07adaaf8033f%3Fscene%3D1007%26min_refer%3D10001");
}
}
// 方案二 MiniApp发包方案 替代MiniApp方案
// 前置条件: 无
export class MojoMiniAppUtil{

}
5 changes: 3 additions & 2 deletions src/onebot11/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ export class NapCatOnebot11 {
}

// export const napCatOneBot11 = new NapCatOnebot11();
// setTimeout(() => {
// MiniAppUtil.RunMiniAppWithGUI();
// setTimeout(async () => {
// let ret = await MiniAppUtil.RunMiniAppWithGUI();
// console.log(ret);
// }, 20000);

0 comments on commit 650cdf2

Please sign in to comment.