Browse Source

邀请好友

jack 8 years ago
parent
commit
9346da811b
1 changed files with 62 additions and 1 deletions
  1. 62 1
      app/js/inviteFriends.js

+ 62 - 1
app/js/inviteFriends.js

40
				success: function(data) {
40
				success: function(data) {
41
					if(data.success) {
41
					if(data.success) {
42
						var $info = data.data;
42
						var $info = data.data;
43
						document.getElementById("inviteFraction").innerHTML = $info.inviteScore + $info.myScore + "分";
43
						document.getElementById("inviteFraction").innerHTML = $info.inviteScore + "分";
44
					}
44
					}
45
				},
45
				},
46
				error: function() {
46
				error: function() {
163
									}
163
									}
164
									($info.hasHeadImage == 1) ? img = baseUrl + "/images/head/" + $info.id + "_l.jpg": img = "../images/default-photo.jpg";
164
									($info.hasHeadImage == 1) ? img = baseUrl + "/images/head/" + $info.id + "_l.jpg": img = "../images/default-photo.jpg";
165
									var li = document.createElement("li");
165
									var li = document.createElement("li");
166
									li.setAttribute("id",$info.id);
167
									li.setAttribute("authType",$info.authType);
168
									li.setAttribute("authentication",$info.authentication);
166
									li.className = "mui-table-view-cell";
169
									li.className = "mui-table-view-cell";
167
									var oString = '<div class="flexCenter">'
170
									var oString = '<div class="flexCenter">'
168
									oString += '<div class="userImg userRadius">';
171
									oString += '<div class="userImg userRadius">';
235
		promptBtn[0].addEventListener("tap", function() {
238
		promptBtn[0].addEventListener("tap", function() {
236
			model.close(); //关闭遮罩
239
			model.close(); //关闭遮罩
237
		})
240
		})
241
		/*点击进入浏览页面*/
242
		mui("#friendsList").on("tap","li",function(){
243
			var oProfessorId=this.getAttribute("id");
244
			var  oAuthType=this.getAttribute("authType");
245
			var oAuthentication=this.getAttribute("authentication");
246
			if(oAuthType==1) {
247
						mui.openWindow({
248
								url: '../html/proinforbrow.html',
249
								id: 'proinforbrow.html',
250
								show: {
251
									autoShow: false,
252
									aniShow: "slide-in-left"
253
								},
254
								extras: {
255
									proid: oProfessorId
256
								},
257
							});
258
			
259
			}else {
260
				if(oAuthentication==1){
261
					mui.openWindow({
262
								url: '../html/researcherProw.html',
263
								id: 'researcherProw.html',
264
								show: {
265
									autoShow: false,
266
									aniShow: "slide-in-left"
267
								},
268
								extras: {
269
									proid: oProfessorId
270
								},
271
							});
272
				}else if(oAuthentication==2||oAuthentication==0){
273
					mui.openWindow({
274
								url: '../html/companybrowse.html',
275
								id: 'html/companybrowse.html',
276
								show: {
277
									autoShow: false,
278
									aniShow: "slide-in-left"
279
								},
280
								extras: {
281
									proid: oProfessorId
282
								},
283
							});
284
				}else if(oAuthentication==3) {
285
					mui.openWindow({
286
								url: '../html/studentbrowse.html',
287
								id: 'html/studentbrowse.html',
288
								show: {
289
									autoShow: false,
290
									aniShow: "slide-in-left"
291
								},
292
								extras: {
293
									proid: oProfessorId
294
								},
295
							});
296
				}
297
			}
298
		})
238
		var invite = document.getElementById("invite");
299
		var invite = document.getElementById("invite");
239
		/*微信及微信朋友圈分享专家*/
300
		/*微信及微信朋友圈分享专家*/
240
		var auths, shares;
301
		var auths, shares;