Browse Source

权限变更呢

jack 8 years ago
parent
commit
04b530b8f3
1 changed files with 67 additions and 50 deletions
  1. 67 50
      app/js/index.js

+ 67 - 50
app/js/index.js

@ -35,11 +35,15 @@ document.getElementById("demandP").addEventListener("tap", function() {
35 35
							aniShow: "slide-in-right",
36 36
						}
37 37
					});
38
				}else if($data.authStatus == 2){
39
					plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {'verticalAlign':'center'});
40
				}else if($data.authStatus == 1){
41
					plus.nativeUI.toast("我们将尽快对您的信息进行认证", {'verticalAlign':'center'});
42
				}else if($data.authStatus <= 0){
38
				} else if($data.authStatus == 2) {
39
					plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
40
						'verticalAlign': 'center'
41
					});
42
				} else if($data.authStatus == 1) {
43
					plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
44
						'verticalAlign': 'center'
45
					});
46
				} else if($data.authStatus <= 0) {
43 47
					mui.openWindow({
44 48
						url: '../html/realname-authentication.html',
45 49
						id: 'realname-authentication.html',
@ -77,7 +81,7 @@ document.getElementById("improfessor").addEventListener("tap", function() {
77 81
		success: function(data) {
78 82
			if(data.success) {
79 83
				var $data = data.data;
80
				if($data.authStatusExpert == 3) {
84
				if($data.authType == 1) {
81 85
					mui.openWindow({
82 86
						url: '../html/needSearch.html',
83 87
						id: '../html/needSearch.html',
@ -86,35 +90,46 @@ document.getElementById("improfessor").addEventListener("tap", function() {
86 90
							aniShow: "slide-in-right",
87 91
						}
88 92
					});
89
				} else if($data.authStatusExpert == 2) {
90
					plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {'verticalAlign':'center'});						
91
				}else if($data.authStatusExpert == 1) {
92
					plus.nativeUI.toast("我们将尽快对您的信息进行认证", {'verticalAlign':'center'});						
93
				}else if($data.authStatusExpert <= 0) {
94
					if($data.authStatus == 3){
95
						mui.openWindow({
96
						url: '../html/expert-authentication.html',
97
						id: 'expert-authentication.html',
98
						show: {
99
							autoShow: false,
100
							aniShow: "slide-in-right",
101
						}
102
					});
103
					}else if($data.authStatus == 2){
104
						plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {'verticalAlign':'center'});
105
					}else if($data.authStatus == 1){
106
						plus.nativeUI.toast("我们将尽快对您的信息进行认证", {'verticalAlign':'center'});
107
					}else{
108
						mui.openWindow({
109
						url: '../html/realname-authentication2.html',
110
						id: 'realname-authentication2.html',
111
						show: {
112
							autoShow: false,
113
							aniShow: "slide-in-right",
93
				} else {
94
					if($data.authStatusExpert == 2) {
95
						plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
96
							'verticalAlign': 'center'
97
						});
98
					} else if($data.authStatusExpert == 1) {
99
						plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
100
							'verticalAlign': 'center'
101
						});
102
					} else if($data.authStatusExpert <= 0) {
103
						if($data.authStatus == 3) {
104
							mui.openWindow({
105
								url: '../html/expert-authentication.html',
106
								id: 'expert-authentication.html',
107
								show: {
108
									autoShow: false,
109
									aniShow: "slide-in-right",
110
								}
111
							});
112
						} else if($data.authStatus == 2) {
113
							plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
114
								'verticalAlign': 'center'
115
							});
116
						} else if($data.authStatus == 1) {
117
							plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
118
								'verticalAlign': 'center'
119
							});
120
						} else {
121
							mui.openWindow({
122
								url: '../html/realname-authentication2.html',
123
								id: 'realname-authentication2.html',
124
								show: {
125
									autoShow: false,
126
									aniShow: "slide-in-right",
127
								}
128
							});
114 129
						}
115
					});
116 130
					}
117 131
				}
132

118 133
			}
119 134
		},
120 135
		error: function() {
@ -124,20 +139,20 @@ document.getElementById("improfessor").addEventListener("tap", function() {
124 139
	});
125 140
})
126 141
mui('.list').on('tap', 'a', function() {
127
	var id = this.getAttribute("data-id");
128
	var userid = plus.storage.getItem('userid');
129
	console.log(id);
130
	plus.nativeUI.showWaiting(); //显示原生等待框
131
	webviewShow = plus.webview.create("../html/proinforbrow.html", 'proinforbrow.html', {}, {
132
		proid: id
133
	}); //后台创建webview并打开show.html
134
})
135
/*点击轮播图*/
142
		var id = this.getAttribute("data-id");
143
		var userid = plus.storage.getItem('userid');
144
		console.log(id);
145
		plus.nativeUI.showWaiting(); //显示原生等待框
146
		webviewShow = plus.webview.create("../html/proinforbrow.html", 'proinforbrow.html', {}, {
147
			proid: id
148
		}); //后台创建webview并打开show.html
149
	})
150
	/*点击轮播图*/
136 151
mui('.artical-scroll').on('tap', 'a', function() {
137 152
	var articalNum = this.getAttribute("data-title");
138 153
	mui.openWindow({
139
		url: '../html/artical_'+ articalNum +'.html',
140
		id: '../html/artical_'+ articalNum +'.html',
154
		url: '../html/artical_' + articalNum + '.html',
155
		id: '../html/artical_' + articalNum + '.html',
141 156
		show: {
142 157
			aniShow: "slide-in-right",
143 158
		}
@ -267,7 +282,9 @@ function getOnePase() {
267 282
				}
268 283
			},
269 284
			error: function() {
270
				plus.nativeUI.toast("服务器链接超时", {'verticalAlign':'center'});
285
				plus.nativeUI.toast("服务器链接超时", {
286
					'verticalAlign': 'center'
287
				});
271 288
			}
272 289
		});
273 290
	});
@ -289,9 +306,9 @@ function datalistEach(datalist) {
289 306
		var rlist = '';
290 307
		for(var n = 0; n < researchAreas.length; n++) {
291 308
			//console.log(researchAreas[n].caption);
292
			rlist += '<span>' + researchAreas[n].caption 
293
			if(n < researchAreas.length-1){
294
				rlist += " , "	
309
			rlist += '<span>' + researchAreas[n].caption
310
			if(n < researchAreas.length - 1) {
311
				rlist += " , "
295 312
			}
296 313
			rlist += '</span>';
297 314
		}
@ -301,9 +318,9 @@ function datalistEach(datalist) {
301 318
		var zlist = '';
302 319
		for(var m = 0; m < resources.length; m++) {
303 320
			//console.log(resources[m].caption);
304
			zlist += '<span>' + resources[m].resourceName 
305
			if(m < resources.length-1){
306
				zlist += " , "	
321
			zlist += '<span>' + resources[m].resourceName
322
			if(m < resources.length - 1) {
323
				zlist += " , "
307 324
			}
308 325
			zlist += '</span>';
309 326
		}