liting2017 7 년 전
부모
커밋
55e9216846
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/css/news/appCognizance.css
  2. 2 2
      src/js/news/appCognizance.js

+ 1 - 1
src/css/news/appCognizance.css

@@ -2,7 +2,7 @@
 	padding: 0;
 	margin: 0;
 	font-size: 62.5%;
-	outline: 0 none;
+	outline:  none;
 }
 h3{margin: 0;padding: 0;}
 .container {

+ 2 - 2
src/js/news/appCognizance.js

@@ -5,7 +5,7 @@ $(function(){
 	//获取id
 	var https=window.location.href;
 	var indexs = https.indexOf('id=');
-	var ids=https.substr(indexs+3,https.length);
+	var ids=parseInt(indexs)>0?https.substr(indexs+3,https.length):'';
 	//数据获取
 	
 	function DataList(){
@@ -23,7 +23,7 @@ $(function(){
 					var dataList=[];             //所需资料
 					var specificationList=[];    //服务规格
 					var promiseLsit=[];
-					if(data.data.length){
+					if(data.data&&data.data.length){
 						describeList.push([
 							"<div><p>"+theData[0].introduce!='null'?theData[0].introduce:''+"</p></div>",
 						  ].join(','));