Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
leochen-g committed Mar 24, 2021
1 parent a7d6748 commit 58b5dc3
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ let config = {}

async function fanli({ msg }) {
try {
const htmlReg = /(<([^>]+)>)/gi
msg = msg.replace(htmlReg, '*').replace(config.keyword, '')
const taobao = new TaoBaoController({ ...config })
const rgx = /\w{8,11}/
const pwd = msg.match(rgx)
if (pwd !== null) {
const res = await taobao.getInfo(msg)
return res
}
return '查询失败'
// const rgx = /\w{8,11}/
// const pwd = msg.match(rgx)
// if (pwd !== null) {
const res = await taobao.getInfo(msg)
return res
// }
// return '查询失败'
} catch (e) {
console.log('查询失败', e)
return '查询失败'
Expand Down

0 comments on commit 58b5dc3

Please sign in to comment.