npm i wx-check-domain
var WxCheckDomain = require('wx-check-domain');
let checker = new WxCheckDomain('your app id ', 'your app secret', 'access_token save path');
let result = await checker.check('http://www.example.com/');
console.log('==== http://www.somebannedsites.com/ ', result); // { code: -1, msg: 'banned' }
let result1 = await checker.check('http://www.maimai.cn');
console.log('==== http://www.maimai.cn/ ', result1); // { code: 0, msg: 'ok' }
v1.0.0
- 检测是否被微信封禁
- 本地存储access_token