Browse Source

个人资源换接口

jack 7 years ago
parent
commit
4ac0687764
2 changed files with 5 additions and 4 deletions
  1. 3 2
      js/information.brow.js
  2. 2 2
      js/information.js

+ 3 - 2
js/information.brow.js

767
	
767
	
768
	//科研资源
768
	//科研资源
769
	$.ajax({
769
	$.ajax({
770
		"url": "/ajax/resource/qapro",
770
		"url": "/ajax/resource/qaProPublish",
771
		"type": "get",
771
		"type": "get",
772
		"async": false,
772
		"async": false,
773
		"data": {
773
		"data": {
774
			"professorId": professorId
774
			"professorId": professorId
775
		},
775
		},
776
		"success": function(data) {
776
		"success": function(data) {
777
			console.log(data);
777
			if(data.success) {
778
			if(data.success) {
778
				var pp=ifUserType(professorId)
779
				var pp=ifUserType(professorId)
779
				if(!pp.authType2) {
780
				if(!pp.authType2) {
810
						$("#sharescrollbox").append(add);
811
						$("#sharescrollbox").append(add);
811
						$('.applicant').eq(i).attr("resourceId", data.data[i].resourceId);
812
						$('.applicant').eq(i).attr("resourceId", data.data[i].resourceId);
812
813
813
						$(".resourceImg").eq(i).attr("src", "/images/resource/" + data.data[i].resourceId + ".jpg");
814
						$(".resourceImg").eq(i).attr("src","/data/resource/" + data.data[i].images[0].imageSrc);
814
						$(".resourceImg").load(function() {})
815
						$(".resourceImg").load(function() {})
815
							.error(function() {
816
							.error(function() {
816
								$(this).attr("src", "/images/default-resource.jpg");
817
								$(this).attr("src", "/images/default-resource.jpg");

+ 2 - 2
js/information.js

2025
		})
2025
		})
2026
		//科研资源
2026
		//科研资源
2027
	$.ajax({
2027
	$.ajax({
2028
		"url": "/ajax/resource/qapro",
2028
		"url": "/ajax/resource/qaProPublish",
2029
		"type": "get",
2029
		"type": "get",
2030
		"data": {
2030
		"data": {
2031
			"professorId": userid
2031
			"professorId": userid
2061
						});*/
2061
						});*/
2062

2062

2063
					if(data.data[i].images.length) {
2063
					if(data.data[i].images.length) {
2064
						$add.find(".resourceImg").attr("src", "/images/resource/" + data.data[i].resourceId + ".jpg");
2064
						$add.find(".resourceImg").attr("src","/data/resource/" + data.data[i].images[0].imageSrc);
2065
					} else {
2065
					} else {
2066
						$add.find(".resourceImg").attr("src", "/images/default-resource.jpg");
2066
						$add.find(".resourceImg").attr("src", "/images/default-resource.jpg");
2067
					}
2067
					}