|
@@ -100,7 +100,6 @@
|
|
|
tip=tip.replace(flag,"”<a>"+cards[i]+"</a>”");
|
|
|
}
|
|
|
}
|
|
|
- console.log(tip);
|
|
|
$("#case2 strong").append(tip);
|
|
|
$("#finderror a").click(function(n){
|
|
|
$("#query").val($(n.target).text());
|
|
@@ -119,7 +118,7 @@
|
|
|
strVar += "<li class=\"col-xs-12\"><table align=\"center\"><caption><div class=\"left\"><a href=\"/enterprise/$Id.html\">$EntName</a><\/div><b class=\"$status\" style='float:right;margin-right:10px;'>$OpStateName<\/b><\/caption><tr><td class=\"left\">注册号:<span>$RegNo<\/span><\/td><td align='right'>法定代表人:<span>$LeRep<\/span><\/td><\/tr><tr><td class=\"left\">成立时间:<span>$EstDate<\/span><\/td><td align='right'>所在地:<span>$OpLocDistrict<\/span><\/td><\/tr><tr><td colspan=\"2\"><hr class=\"list\"><\/td><\/tr><\/table><\/li>";
|
|
|
|
|
|
function loadData(){
|
|
|
- var li="";
|
|
|
+ var li="";
|
|
|
var len=i+5;
|
|
|
if (data.length<5 || data.length-i<5){
|
|
|
len=data.length;
|
|
@@ -129,6 +128,10 @@
|
|
|
if (data[i]["OpStateName"].indexOf("在营")>-1){
|
|
|
data[i]["OpStateName"]="存续";
|
|
|
}
|
|
|
+ var loc=data[i]["OpLocDistrict"];
|
|
|
+ if(loc.length>6){
|
|
|
+ data[i]["OpLocDistrict"]=loc.substr(0,loc.lastIndexOf(" "));
|
|
|
+ }
|
|
|
var tmp=strVar.replace("$EntName",data[i]["EntName"])
|
|
|
.replace("$RegNo",data[i]["RegNo"])
|
|
|
.replace("$LeRep",data[i]["LeRep"])
|
|
@@ -144,8 +147,7 @@
|
|
|
li=li+tmp;
|
|
|
}
|
|
|
if(i==data.length){
|
|
|
- $(".loadmore").hide();
|
|
|
- $(".nomore").show();
|
|
|
+ ajaxFrom();
|
|
|
}
|
|
|
$(".inclist").append($(li));
|
|
|
}
|
|
@@ -155,6 +157,7 @@
|
|
|
var shareTitle = "企业社区";
|
|
|
var shareLink = "http://www.qimingxing.info/wx/search/enterprise/list.html";
|
|
|
var shareIcon = "";
|
|
|
+ var currentPage=1;
|
|
|
if(typeof(signature) != "undefined" && signature != null && signature.length == 4){
|
|
|
wx.config({
|
|
|
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
@@ -226,12 +229,12 @@
|
|
|
success:function(obj){
|
|
|
if(obj["on"]=="y"){
|
|
|
if(obj["names"]==""){
|
|
|
- alert("未匹配的对应的名称");
|
|
|
+ alert("未匹配到企业名称");
|
|
|
}else{
|
|
|
if (obj["names"].length>0){
|
|
|
$("#query").val(obj["names"][0]);
|
|
|
$("#i_mingpian").val("1");
|
|
|
- $("#mingpian").val(obj.join(","));
|
|
|
+ $("#mingpian").val(obj["names"].join(","));
|
|
|
$("#search").submit();
|
|
|
}else{
|
|
|
alert("没有成功识别!");
|
|
@@ -243,7 +246,30 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ function ajaxFrom(){
|
|
|
+ var query={
|
|
|
+ "words":$("#query").val(),
|
|
|
+ "city":$("#citys").val(),
|
|
|
+ "c_hfl":$("#c_hfl").val(),
|
|
|
+ "c_zb":$("#c_zb").val(),
|
|
|
+ "currentPage":++currentPage
|
|
|
+ };
|
|
|
+ $.ajax({
|
|
|
+ url:"/wx/search/enterprise/list.html",
|
|
|
+ data:query,
|
|
|
+ type:"post",
|
|
|
+ dataType:"json",
|
|
|
+ success:function(r){
|
|
|
+ if (typeof(r)=="object"){
|
|
|
+ data=data.concat(r);
|
|
|
+
|
|
|
+ }else{
|
|
|
+ $(".loadmore").hide();
|
|
|
+ $(".nomore").show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
</body>
|