Browse Source

修改退出登录,在登录后,点击收藏功能

xuchunyang 8 years ago
parent
commit
2587e77754
2 changed files with 20 additions and 18 deletions
  1. 10 9
      app/js/proinfobrow.js
  2. 10 9
      app/js/resinforbrow.js

+ 10 - 9
app/js/proinfobrow.js

33
			}, false);
33
			}, false);
34
34
35
		} else {
35
		} else {
36
			mui.openWindow({
37
				url: '../html/login.html',
38
				id: 'login.html'
39
			})
40
36
			goLoginFun();
41
		}
37
		}
42
	}
38
	}
43
39
441
	ifCollection();
437
	ifCollection();
442
438
443
	yesExpert.addEventListener('tap', function() {
439
	yesExpert.addEventListener('tap', function() {
440
		var userid = plus.storage.getItem('userid');
444
		var $this = this;
441
		var $this = this;
445
		if(userid && userid != null && userid != "null") {
442
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
446
			collectionExpert($this);
443
			collectionExpert($this);
447
		} else {
444
		} else {
448
			//			plus.nativeUI.toast("请先登录");
449
			isLogin();
445
			goLoginFun();
450
		}
446
		}
451
	});
447
	});
452
448
453
	noExpert.addEventListener('tap', function() {
449
	noExpert.addEventListener('tap', function() {
450
		var userid = plus.storage.getItem('userid');
454
		var $this = this;
451
		var $this = this;
455
		cancelCollectionExpert($this);
452
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
453
			cancelCollectionExpert($this);
454
		} else {
455
			goLoginFun();
456
		}
456
	});
457
	});
457
458
458
	/*判断是非收藏专家*/
459
	/*判断是非收藏专家*/

+ 10 - 9
app/js/resinforbrow.js

251
			}, false);
251
			}, false);
252
252
253
		} else {
253
		} else {
254
			mui.openWindow({
255
				url: '../html/login.html',
256
				id: 'login.html'
257
			})
258
254
			goLoginFun();
259
		}
255
		}
260
	};
256
	};
261
	oconsult.addEventListener('tap', function() {
257
	oconsult.addEventListener('tap', function() {
270
	ifCollection();
266
	ifCollection();
271
267
272
	yesExpert.addEventListener('tap', function() {
268
	yesExpert.addEventListener('tap', function() {
269
		var userid = plus.storage.getItem('userid');
273
		var $this = this;
270
		var $this = this;
274
		if(userid && userid != null && userid != "null") {
271
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
275
			collectionExpert($this);
272
			collectionExpert($this);
276
		} else {
273
		} else {
277
			//			plus.nativeUI.toast("请先登录");
278
			isLogin();
274
			goLoginFun();
279
		}
275
		}
280
	});
276
	});
281
277
282
	noExpert.addEventListener('tap', function() {
278
	noExpert.addEventListener('tap', function() {
279
		var userid = plus.storage.getItem('userid');
283
		var $this = this;
280
		var $this = this;
284
		cancelCollectionExpert($this);
281
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
282
			cancelCollectionExpert($this);
283
		} else {
284
			goLoginFun();
285
		}
285
	});
286
	});
286
287
287
	/*判断是否收藏资源*/
288
	/*判断是否收藏资源*/