上面是问题截图.
function contentCheck(content){
console.log("contentCheck-----",content)
var d = Date.now()
return new Promise((resolve,reject)=>{
wx.serviceMarket.invokeService({
service: 'wxee446d7507c68b11',
api: 'msgSecCheck',
data: {
"Action": "TextApproval",
"Text": content
},
}).then(res => {
var type = Object.prototype.toString.call(res.data).slice(8,-1)
var response = ''
if(type=='Object'){
response = res.data
}else{
response =JSON.parse(res.data)
}
console.log("JSON",response)
var List = response.Response.EvilTokens
var arr = []
var i = 0;
List.forEach(e => {
e.EvilKeywords.forEach(item=>{
arr[i] =item
i++
})
});
arr =[...new Set(arr)]
resolve(arr)
}).catch(err=>{
console.log("--err",err)
reject(err)
})
})
}
你好,这里使用的是珊瑚安全API--https://developers.weixin.qq.com/community/servicemarket/detail/000a246b6fca70b76a896e6a25ec15,还是免费的内容安全API--https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.imgSecCheck.html?
现在还是不行?