jack 7 years ago
parent
commit
7efe4388e0
1 changed files with 37 additions and 14 deletions
  1. 37 14
      app/js/articleShow.js

+ 37 - 14
app/js/articleShow.js

452
	if(oArticleModule.oFlag == 1) {
452
	if(oArticleModule.oFlag == 1) {
453
		/*企业发布文章信息*/
453
		/*企业发布文章信息*/
454
		oArticleModule.oAjaxGet(baseUrl + "/ajax/org/" + oArticleModule.oWner, "", "get", oArticleModule.business);
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
		companylist();
456
		companylist();
457
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
458
			"watchObject": oArticleModule.oWner,
459
			'orgId': oCurren.userid
460
		}, "get", oArticleModule.attentionGetExpert);
457
	} else {
461
	} else {
458
		if(plus.storage.getItem('userid') == oArticleModule.oWner) {
462
		if(plus.storage.getItem('userid') == oArticleModule.oWner) {
459
			document.getElementById('attBtn').style.display = "none";
463
			document.getElementById('attBtn').style.display = "none";
634
		if(oCurren.userid == oArticleModule.oWner) {
638
		if(oCurren.userid == oArticleModule.oWner) {
635
			document.getElementById('attBtn').style.display = "none";
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
		oArticleModule.oAjaxGet(baseUrl + "/ajax/article/isAgree", {
654
		oArticleModule.oAjaxGet(baseUrl + "/ajax/article/isAgree", {
638
			"articleId": oArticleModule.articleId,
655
			"articleId": oArticleModule.articleId,
639
			'operateId': oCurren.userid
656
			'operateId': oCurren.userid
640
		}, "get", oArticleModule.thumbs);
657
		}, "get", oArticleModule.thumbs);
641
		console.log(oArticleModule.oFlag)
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
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
663
		oArticleModule.oAjaxGet(baseUrl + "/ajax/watch/hasWatch", {
657
		var oClsNm = document.getElementsByClassName("attenSpan")[0].className;
670
		var oClsNm = document.getElementsByClassName("attenSpan")[0].className;
658
		oCurren.userid = plus.storage.getItem('userid');
671
		oCurren.userid = plus.storage.getItem('userid');
659
		if(oCurren.userid) {
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
					"watchObject": oArticleModule.oWner,
681
					"watchObject": oArticleModule.oWner,
663
					'professorId': oCurren.userid
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
			} else {
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
		} else {
695
		} else {
673
			oCurren.login();
696
			oCurren.login();