找回密码
 立即注册

QQ登录

只需一步,快速开始

ngqj

银牌会员

271

主题

742

帖子

2831

积分

银牌会员

积分
2831
ngqj
银牌会员   /  发表于:2024-8-21 11:28  /   查看:210  /  回复:1
10金币
错误:



JS是这样的,虽然我看不太懂,主要是都没动过啊


  var img1Base64;
            var idcardFp;//身份证内的指纹
            var inputFp;//录入的指纹
            var httpServerPort=8989;
function readIDcard(){   
                 Forguncy.Page.getCell("tishi").setValue("");
                                  Forguncy.Page.getCell("name").setValue("");
                      Forguncy.Page.getCell("sex").setValue("");
                          Forguncy.Page.getCell("minzu").setValue("");
                      Forguncy.Page.getCell("birthday").setValue("");
                      Forguncy.Page.getCell("address").setValue("");
                      Forguncy.Page.getCell("cardId").setValue("");
                      Forguncy.Page.getCell("yxq").setValue("");
                                          Forguncy.Page.getCell("yxqe").setValue("");
                      Forguncy.Page.getCell("fzjg").setValue("");
                                          Forguncy.Page.getCell("touxiang").setValue("");
                                           Forguncy.Page.getCell("touxiang").setValue("");
                                     
                $.ajax({
                    dataType: "JSONP",                    
                    type: "get",
                    url: "http://localhost:"+httpServerPort+"/api/ReadMsg?waitTime=3&readOnce=0",//接口服务器地址  参数: Fp=1读证内指纹,PhotoQuality 身份证头像质量,cardImg=1获取身份证正反面图片,readOnce=1同一张卡只读一次, waitTime 读卡超时单位秒 最长60秒
                    //contentType: "application/x-www-form-urlencoded; charset=utf-8",
                    success: function (data) {
                       
                    // 成功执行
                    // console.log(data);
                                        //        var dataStr=JSON.stringify(data);
                                        // Forguncy.Page.getCell("textaa").setValue(dataStr);
                                                 
                                        if(data.code=="0"){         
                                                  
                                          Forguncy.Page.getCell("name").setValue(data.name);
                      Forguncy.Page.getCell("sex").setValue(data.sex);
                          Forguncy.Page.getCell("minzu").setValue(data.nation);
                      Forguncy.Page.getCell("birthday").setValue(data.born);
                      Forguncy.Page.getCell("address").setValue(data.address);
                      Forguncy.Page.getCell("cardId").setValue(data.cardno);
                      Forguncy.Page.getCell("yxq").setValue(data.userlifeb);
                                          Forguncy.Page.getCell("yxqe").setValue(data.userlifee);
                      Forguncy.Page.getCell("fzjg").setValue(data.police); Forguncy.Page.getCell("touxiang").setValue("data:image/png;base64,"+data.photobase64);

                                           }
                                           else{
                                                   Forguncy.Page.getCell("tishi").setValue(data.retmsg+"错误代码:"+data.code);
                                                   alert(data.retmsg+"错误代码:"+data.code);
                                           }
                                               
                    },
                    error: function (e) {
                        //失败执行
                        alert(e.status + ',' + e.statusText);
                    }
                });
            };

                readIDcard();


附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

您好,看浏览器控制台的报错是 localhost:8989 这个端口的服务访问不通了,可以优先检查下这个服务是否正常。

1 个回复

倒序浏览
最佳答案
最佳答案
Simon.Sun活字格认证 Wyn认证
超级版主   /  发表于:2024-8-21 11:28:46
来自 2#
您好,看浏览器控制台的报错是 localhost:8989 这个端口的服务访问不通了,可以优先检查下这个服务是否正常。


回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部