I want to use this code in my WeChat Mini Program, but it can't support 'promise' grammar. And I can't understand the Instructions of readme, so how to return the 'data' after calling the cloud function?
我想在我的微信小程序中使用此代码,但它不支持“promise”语法。 而且我不明白readme的说明,那么调用云函数后如何返回“data”?
const client = new OcrClient(clientConfig); const params = { "ImageUrl": "https://xxx.jpg" }; client.BusinessCardOCR(params).then( (data) => { console.log(data); }, (err) => { console.error("error", err); }
I want to use this code in my WeChat Mini Program, but it can't support 'promise' grammar. And I can't understand the Instructions of readme, so how to return the 'data' after calling the cloud function? 我想在我的微信小程序中使用此代码,但它不支持“promise”语法。 而且我不明白readme的说明,那么调用云函数后如何返回“data”?
const client = new OcrClient(clientConfig); const params = { "ImageUrl": "https://xxx.jpg" }; client.BusinessCardOCR(params).then( (data) => { console.log(data); }, (err) => { console.error("error", err); }