Преглед на файлове

根据身份跳不同扥页面

jack преди 8 години
родител
ревизия
cb49eeb61b
променени са 3 файла, в които са добавени 28 реда и са изтрити 15 реда
  1. 1 1
      app/js/needSure.js
  2. 1 1
      app/js/researchArea.js
  3. 26 13
      app/js/resinforbrow.js

+ 1 - 1
app/js/needSure.js

@ -165,7 +165,7 @@ mui.ready(function() {
165 165
				plus.webview.create("../html/researcherProw.html", 'researcherProw.html', {}, {
166 166
					proid: professId
167 167
				});
168
			} else if(authentication == 2) {
168
			} else if(authentication == 2|| authentication == 0) {
169 169
				plus.webview.create("../html/companybrowse.html", 'companybrowse.html', {}, {
170 170
					proid: conId
171 171
				});

+ 1 - 1
app/js/researchArea.js

@ -36,7 +36,7 @@ mui.plusReady(function() {
36 36
				plus.webview.create("../html/researcherProw.html", 'researcherProw.html', {}, {
37 37
					proid: professId
38 38
				});
39
			} else if(authentication == 2) {
39
			} else if(authentication == 2||authentication == 0) {
40 40
				plus.webview.create("../html/companybrowse.html", 'companybrowse.html', {}, {
41 41
					proid: professId
42 42
				});

+ 26 - 13
app/js/resinforbrow.js

@ -181,7 +181,7 @@ mui.plusReady(function() {
181 181
					var $info = data.data || {}
182 182
183 183
					if(data.success && data.data) {
184
						if($info.authType||$info.authentication == 1) {
184
						if($info.authType==1){
185 185
							mui.openWindow({
186 186
								url: '../html/proinforbrow.html',
187 187
								id: 'html/proinforbrow.html',
@ -193,7 +193,20 @@ mui.plusReady(function() {
193 193
									proid: professorId
194 194
								},
195 195
							});
196
						} else if(!$info.authType&&$info.authentication == 2) {
196
						}else{
197
						if($info.authentication == 1) {
198
							mui.openWindow({
199
								url: '../html/researcherProw.html',
200
								id: 'researcherProw.html',
201
								show: {
202
									autoShow: false,
203
									aniShow: "slide-in-left"
204
								},
205
								extras: {
206
									proid: professorId
207
								},
208
							});
209
						} else if($info.authentication == 2 ||$info.authentication == 0) {
197 210
							mui.openWindow({
198 211
								url: '../html/companybrowse.html',
199 212
								id: 'html/companybrowse.html',
@ -205,7 +218,7 @@ mui.plusReady(function() {
205 218
									proid: professorId
206 219
								},
207 220
							});
208
						} else if(!$info.authType&&$info.authentication == 3) {
221
						} else if($info.authentication == 3) {
209 222
							mui.openWindow({
210 223
								url: '../html/studentbrowse.html',
211 224
								id: 'html/studentbrowse.html',
@ -218,6 +231,7 @@ mui.plusReady(function() {
218 231
								},
219 232
							});
220 233
						}
234
						}
221 235
222 236
					}
223 237
				},
@ -251,7 +265,11 @@ mui.plusReady(function() {
251 265
			}, false);
252 266
253 267
		} else {
254
			goLoginFun();
268
			mui.openWindow({
269
				url: '../html/login.html',
270
				id: 'login.html'
271
			})
272
255 273
		}
256 274
	};
257 275
	oconsult.addEventListener('tap', function() {
@ -266,23 +284,18 @@ mui.plusReady(function() {
266 284
	ifCollection();
267 285
268 286
	yesExpert.addEventListener('tap', function() {
269
		var userid = plus.storage.getItem('userid');
270 287
		var $this = this;
271
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
288
		if(userid && userid != null && userid != "null") {
272 289
			collectionExpert($this);
273 290
		} else {
274
			goLoginFun();
291
			//			plus.nativeUI.toast("请先登录");
292
			isLogin();
275 293
		}
276 294
	});
277 295
278 296
	noExpert.addEventListener('tap', function() {
279
		var userid = plus.storage.getItem('userid');
280 297
		var $this = this;
281
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
282
			cancelCollectionExpert($this);
283
		} else {
284
			goLoginFun();
285
		}
298
		cancelCollectionExpert($this);
286 299
	});
287 300
288 301
	/*判断是否收藏资源*/