jack 8 vuotta sitten
vanhempi
commit
15978474e0
2 muutettua tiedostoa jossa 66 lisäystä ja 10 poistoa
  1. 13 1
      app/js/cmpinfor-trend.js
  2. 53 9
      app/js/professorArticle.js

+ 13 - 1
app/js/cmpinfor-trend.js

@ -216,9 +216,21 @@ function timeGeshi(otm) {
216 216
}
217 217
/*进入文章详细页面*/
218 218
	mui("#trend").on('tap', '.articl', function() {
219
		var dd=plus.webview.getWebviewById("cmpinfor-Unindex.html");
220
		var dd1=plus.webview.getWebviewById("cmpinfor-index.html");
221
		if(dd==null){
222
			var id = dd1.orgId;
223
			var oflag=dd1.flag;
224
		}
225
		if(dd1==null){
226
			var id = dd.orgId;
227
			var oflag=dd.flag;
228
		}
219 229
		var artId = this.getAttribute("articleId");
220 230
		plus.nativeUI.showWaiting();
221 231
		plus.webview.create("../html/professorArticle.html", 'professorArticle.html', {}, {
222
			articleId: artId
232
			articleId: artId,
233
			ownerid:id,
234
			oFlag:1
223 235
		});
224 236
	});

+ 53 - 9
app/js/professorArticle.js

@ -6,14 +6,63 @@ mui.plusReady(function() {
6 6
	var oFlag = self.oFlag;
7 7
	var proticleName = "";
8 8
	var oImgShare = ""
9
	console.log(ownerid);
10
	console.log(proId);
11
	console.log(oFlag)
12 9
	if(oFlag == 1) {
13 10
		comBro();
11
		mui.ajax(baseUrl + "/ajax/org/authStatus", {
12
			dataType: 'json', //数据格式类型
13
			type: 'GET', //http请求类型
14
			timeout: 10000, //超时设置
15
			data: {
16
				"id": ownerid
17
			},
18
			success: function(data) {
19
				if(data.success) {
20
					if(data.data == 3) {
21
						document.getElementById("proInfor").addEventListener("tap", function() {
22
						mui.openWindow({
23
							url: '../html/cmpinfor-index.html',
24
							id: 'cmpinfor-index.html',
25
							show: {
26
								autoShow: false,
27
								aniShow: "slide-in-right",
28
							},
29
							extras: {
30
								orgId: ownerid,
31
							}
32
						})
33
						})
34
					} else {
35
						document.getElementById("proInfor").addEventListener("tap", function() {
36
						mui.openWindow({
37
							url: '../html/cmpinfor-Unindex.html',
38
							id: 'cmpinfor-Unindex.html',
39
							show: {
40
								autoShow: false,
41
								aniShow: "slide-in-right",
42
							},
43
							extras: {
44
								orgId: ownerid,
45
								flag: 0
46
							}
47
						})
48
						})
49
					}
50
				}
51
			},
52
			error: function(XMLHttpRequest) {
53
				console.log(XMLHttpRequest)
54
			}
55
		});
14 56
	} else {
15 57
		personMess();
58
		document.getElementById("proInfor").addEventListener("tap", function() {
59
			plus.nativeUI.showWaiting(); //显示原生等待框
60
			webviewShow = plus.webview.create("../html/proinforbrow.html", 'proinforbrow.html', {}, {
61
				proid: ownerid
62
			}); //后台创建webview并打开show.html
63
		})
16 64
	}
65

17 66
	function proInfoMain() {
18 67
		mui.ajax(baseUrl + "/ajax/article/query", {
19 68
			dataType: 'json', //数据格式类型
@ -23,7 +72,6 @@ mui.plusReady(function() {
23 72
			},
24 73
			timeout: 10000, //超时设置
25 74
			success: function(data) {
26
				console.log(JSON.stringify(data))
27 75
				var $info = data.data || {};
28 76
				if(data.success && data.data) {
29 77
					plus.nativeUI.closeWaiting();
@ -66,7 +114,6 @@ mui.plusReady(function() {
66 114
			type: 'GET', //http请求类型
67 115
			timeout: 10000, //超时设置
68 116
			success: function(data) {
69
				console.log(data); //
70 117
				if(data.success && data.data) {
71 118
					var $profesor = data.data;
72 119
					if($profesor.hasHeadImage) {
@ -91,9 +138,7 @@ mui.plusReady(function() {
91 138
			dataType: "json",
92 139
			beforeSend: function() {},
93 140
			success: function(data, textState) {
94
				console.log(JSON.stringify(data))
95 141
				if(data.success) {
96
					
97 142
					var $data = data.data;
98 143
					var proName = document.getElementById("proName");
99 144
					proName.innerText = $data.name;
@ -108,8 +153,7 @@ mui.plusReady(function() {
108 153
						document.getElementById('proHead').src = "images/default-icon.jpg";
109 154
					}
110 155

111
				}else{
112
				}
156
				} else {}
113 157
			},
114 158
			error: function(XMLHttpRequest, textStats, errorThrown) {
115 159
				console.log(JSON.stringify(data));