🐞 fix: 修复贴吧小程序无法解析问题

This commit is contained in:
zhiyu1998 2024-07-26 18:47:57 +08:00
parent ab49daf067
commit d6cbb483c8

View File

@ -95,7 +95,8 @@ class GeneralLinkAdapter {
async tieba(link) {
const msg = /https:\/\/tieba\.baidu\.com\/p\/[A-Za-z0-9]+/.exec(link)?.[0];
// 这里必须使用{ ...GENERAL_REQ_LINK_2 }赋值,不然就是对象的引用赋值,会造成全局数据问题!
const reqLink = this.createReqLink(GENERAL_REQ_LINK, msg)
// !!!这里加了 '\?' 是因为 API 问题
const reqLink = this.createReqLink(GENERAL_REQ_LINK, msg + "\"?")
return { name: "贴吧", reqLink };
}