🐞 fix: 修复医药查询匹配问题

This commit is contained in:
zhiyu1998 2023-03-21 01:00:48 +08:00
parent d6f2b0be30
commit 876194438e

View File

@ -21,7 +21,7 @@ export class query extends plugin {
priority: 500,
rule: [
{
reg: "^#*医药查询 (.*)$",
reg: "^#医药查询(.*)$",
fnc: "doctor",
},
{
@ -61,7 +61,7 @@ export class query extends plugin {
}
async doctor(e) {
let keyword = e.msg.split(" ")[1];
let keyword = e.msg.replace("#医药查询", "").trim();
const url = `https://api2.dayi.org.cn/api/search2?keyword=${keyword}&pageNo=1&pageSize=10`;
let res = await fetch(url)
.then(resp => resp.json())