调用OCR识别出错
调用腾讯云的OCR识别时,报错了。
var CryptoJS = require( 'crypto-js' ); var now = parseInt(Date.now() / 1000), rdm = parseInt(Math.random() * Math.pow(2, 32)), plainText = 'a=' + appid + '&k=' + secretId + '&e=' + (now+pexpired) + '&t=' + now + '&r=' + rdm + userid + '&f=' , data = new Buffer(plainText, 'utf8' ), res = CryptoJS.HmacSHA1(data, secretKey); var bin = Buffer.concat([res, data]); //这一句运行时报错了 var sign = bin.toString( 'base64' ); return sign; |
|
不知道是什么原因?求解答!