1.0.2 • Published 6 years ago
tencent-ai-sign v1.0.2
基于Node的腾讯AI开放平台AI接口鉴权模块
http://ai.qq.com/doc/auth.shtml
安装
npm install tencent-ai-sign -S
const txAiSign = require("tencent-ai-sign")
let params = {
"app_id":app_id,
"key1":"value",
"time_stamp":"10位(秒级)时间戳",
"nonce_str":"小于32的随机数",
"sign":""
}
//app_key 控制台->应用的app_key
params.sign = txAiSign(params,app_key)
``
## bug
### 1.0.2
发现encodeURI不能对半角符号进行转码,验证出现错误
修改 encodeURI 改用 encodeURIComponent