jack 7 anos atrás
pai
commit
7efe4388e0
1 arquivos alterados com 37 adições e 14 exclusões
  1. 37 14
      app/js/articleShow.js

+ 37 - 14
app/js/articleShow.js

@ -452,8 +452,12 @@ mui.plusReady(function() {
452 452
	if(oArticleModule.oFlag == 1) {
453 453
		/*企业发布文章信息*/
454 454
		oArticleModule.oAjaxGet(baseUrl + "/ajax/org/" + oArticleModule.oWner, "", "get", oArticleModule.business);
455
		document.getElementById('attBtn').style.display = "none";
455
		//document.getElementById('attBtn').style.display = "none";
456 456
		companylist();
457
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
458
			"watchObject": oArticleModule.oWner,
459
			'orgId': oCurren.userid
460
		}, "get", oArticleModule.attentionGetExpert);
457 461
	} else {
458 462
		if(plus.storage.getItem('userid') == oArticleModule.oWner) {
459 463
			document.getElementById('attBtn').style.display = "none";
@ -634,17 +638,26 @@ mui.plusReady(function() {
634 638
		if(oCurren.userid == oArticleModule.oWner) {
635 639
			document.getElementById('attBtn').style.display = "none";
636 640
		}
641
		if(oArticleModule.oFlag == 1) {
642
			/*查询是否关注专家*/
643
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
644
			"watchObject": oArticleModule.oWner,
645
			'orgId': oCurren.userid
646
		}, "get", oArticleModule.attentionGetExpert);
647
		}else{
648
			/*查询是否关注专家*/
649
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
650
			"watchObject": oArticleModule.oWner,
651
			'professorId': oCurren.userid
652
		}, "get", oArticleModule.attentionGetExpert);
653
		}
637 654
		oArticleModule.oAjaxGet(baseUrl + "/ajax/article/isAgree", {
638 655
			"articleId": oArticleModule.articleId,
639 656
			'operateId': oCurren.userid
640 657
		}, "get", oArticleModule.thumbs);
641 658
		console.log(oArticleModule.oFlag)
642 659

643
		/*查询是否关注专家*/
644
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
645
			"watchObject": oArticleModule.oWner,
646
			'professorId': oCurren.userid
647
		}, "get", oArticleModule.attentionGetExpert);
660
		
648 661

649 662
		/*查询是否收藏文章*/
650 663
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
@ -657,17 +670,27 @@ mui.plusReady(function() {
657 670
		var oClsNm = document.getElementsByClassName("attenSpan")[0].className;
658 671
		oCurren.userid = plus.storage.getItem('userid');
659 672
		if(oCurren.userid) {
660
			if(oClsNm == 'mui-icon attenSpan attenedSpan') {
661
				oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/delete", {
673
			var $info={};
674
			if(oArticleModule.oFlag == 1) {
675
				$info={
676
					"watchObject": oArticleModule.oWner,
677
					'orgId': oCurren.userid
678
				}
679
			}else{
680
				$info={
662 681
					"watchObject": oArticleModule.oWner,
663 682
					'professorId': oCurren.userid
664
				}, "post", oArticleModule.attentionNoPostExpert);
683
				}
684
			}
685
			if(oClsNm == 'mui-icon attenSpan attenedSpan') {
686
				oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/delete",$info , "post", oArticleModule.attentionNoPostExpert);
665 687
			} else {
666
				oArticleModule.oAjaxGet(baseUrl + "/ajax/watch", {
667
					"watchObject": oArticleModule.oWner,
668
					'professorId': oCurren.userid,
669
					"watchType": 1
670
				}, "post", oArticleModule.attentionPostExpert);
688
				if(oArticleModule.oFlag == 1) {
689
					$info.watchType=6;
690
				}else{
691
					$info.watchType=1;
692
				}
693
				oArticleModule.oAjaxGet(baseUrl + "/ajax/watch", $info, "post", oArticleModule.attentionPostExpert);
671 694
			}
672 695
		} else {
673 696
			oCurren.login();