var System=require("../../system")
class PicToTextCtl{
  constructor(){
    this.businesslicenseKeyCode="95c8b314de2c4e38b8882508cd7e1d0c";
    this.businesslicenseUrl="http://dm-58.data.aliyun.com/rest/160601/ocr/ocr_business_license.json";
    this.idCardUrl="http://dm-51.data.aliyun.com/rest/160601/ocr/ocr_idcard.json";
    this.homecardUrl="https://ocrapi-house-cert.taobao.com/ocrservice/houseCert";
    this.idCardKeyCode="aaaaaaaaaaaaaa";
  }
  async getConfig(qobj,pobj){
    var transformType=pobj.transformType;
    if(transformType=="1"){
      return {keycode:this.businesslicenseKeyCode,
              url:this.businesslicenseUrl}
    }
    if(transformType=="2"){
      return {keycode:this.businesslicenseKeyCode,
              url:this.idCardUrl}
    }
    if(transformType=="3"){
      return {keycode:this.businesslicenseKeyCode,
              url:this.homecardUrl}
    }
    return null;
  };

}
module.exports=PicToTextCtl;
