有验证码.js 1.52 KB
Mobile_NS.scanQRCode(function(result){
    checkInvoiceByImage(result);
});

function checkInvoiceByImage(result){
	Mobile_NS.showLoader();
	Mobile_NS.ajax("/mobile/plugin/1/fna/invoiceInfoAjax.jsp", {"result" : result,"type" : "1"}, function(responseText){
    	Mobile_NS.hideLoader();
    	if(responseText.status == 1){
    		var imagetype = responseText.imagetype;
    		var imagecontent = responseText.imagecontent;
    		var checkkey = responseText.checkkey;
    		var checktype = responseText.checktype;
    		var invoicecode = responseText.invoicecode;
    		var invoicenumber = responseText.invoicenumber;
    		var totalamount = responseText.totalamount;
    		var invoicedate = responseText.invoicedate;
    		var yzmsj = responseText.yzmsj;
    		var ymmj = responseText.ymmj;
		 	openCheckCodePage(imagetype,imagecontent,checkkey,checktype,invoicecode,invoicenumber,totalamount,invoicedate,yzmsj,ymmj,result);
		}else{
			Mobile_NS.Alert(responseText.errMsg, false);
			return;
		}
	},"json");
}

function openCheckCodePage(imagetype,imagecontent,checkkey,checktype,invoicecode,invoicenumber,totalamount,invoicedate,yzmsj,ymmj,result){
	var url = "/mobilemode/appHomepageView.jsp?appHomepageId=4427&imagetype="+imagetype+"&imagecontent="+encodeURIComponent(imagecontent)+"&checkkey="+checkkey+"&checktype="+checktype+
				"&invoicecode="+invoicecode+"&invoicenumber="+invoicenumber+"&totalamount="+totalamount+"&invoicedate="+invoicedate+"&yzmsj="+yzmsj+"&ymmj="+ymmj+"&result="+
				encodeURIComponent(result);
	Mobile_NS.hideLoader();
	$u(url);
}