mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复帮助部分问题
This commit is contained in:
parent
bddefcf066
commit
918143d33e
11
apps/help.js
11
apps/help.js
@ -2,11 +2,6 @@ import Help from "../model/help.js";
|
||||
import puppeteer from "../../../lib/puppeteer/puppeteer.js";
|
||||
import md5 from "md5";
|
||||
|
||||
let helpData = {
|
||||
md5: "",
|
||||
img: "",
|
||||
};
|
||||
|
||||
export class help extends plugin {
|
||||
constructor(e) {
|
||||
super({
|
||||
@ -31,8 +26,12 @@ export class help extends plugin {
|
||||
}
|
||||
|
||||
async cache(data) {
|
||||
let helpData = {
|
||||
md5: "",
|
||||
img: "",
|
||||
};
|
||||
let tmp = md5(JSON.stringify(data));
|
||||
if (helpData.md5 == tmp) return helpData.img;
|
||||
if (helpData.md5 === tmp) return helpData.img;
|
||||
|
||||
helpData.img = await puppeteer.screenshot("help", data);
|
||||
helpData.md5 = tmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user