Browse Source

加上进入查看发布需求着浏览页面

jack 8 years ago
parent
commit
b0b0964e8a
3 changed files with 52 additions and 6 deletions
  1. 2 2
      app/html/needSure.html
  2. 4 0
      app/js/needIssue.js
  3. 46 4
      app/js/needSure.js

+ 2 - 2
app/html/needSure.html

@ -31,11 +31,11 @@
31 31
					</h5>
32 32
				</div>
33 33
				<ul class="mui-table-view mui-table-view-chevron" id="proInfor">
34
					<li class="contentInner mui-table-view-cell mui-media" style="padding:8px 20px 8px 10px;">		
34
					<li class="contentInner mui-table-view-cell mui-media" style="padding:8px 20px 8px 10px;" id="person">		
35 35
						<a class="proinfor">
36 36
							<div><img id="proHead" class="mui-media-object mui-pull-left headimg headRadius" src="../images/default-photo.jpg"></div>
37 37
							<div class="mui-media-body">
38
								<span class="listtit" ><span id="proName"></span><em class="mui-icon iconfont icon-vip authicon-cu"> </em></span>
38
								<span class="listtit" ><span id="proName"></span><em class="mui-icon iconfont" id="aClass"> </em></span>
39 39
								<div class="listtit2"><span id="proTitle"></span><span id="proOffice"></span><span id="proOrg"></span><span id="proAddress"></span></div>
40 40
								<div class="mui-ellipsis listtit3" id="proRlist"></div>
41 41
								<div class="mui-ellipsis listtit3" id="proZlist"></div>

+ 4 - 0
app/js/needIssue.js

@ -76,6 +76,10 @@ mui.ready(function() {
76 76
				}
77 77
				var addContent = document.getElementsByClassName('lineInput')[0].value;
78 78
				var content = trim(addContent);
79
				if(content.length>10){
80
					plus.nativeUI.toast("添加内容不能超过10个字", toastStyle);
81
					return;
82
				}
79 83
				if(content) {
80 84
					var node = document.createElement("li");
81 85
					node.innerHTML = content + '<em class="mui-icon mui-icon-closeempty"></em>';

+ 46 - 4
app/js/needSure.js

@ -2,7 +2,7 @@ mui.ready(function() {
2 2
	mui.plusReady(function() {
3 3
		var ws = plus.webview.currentWebview();
4 4
		var userid = plus.storage.getItem('userid');
5
		var conId, denmandTitle, demandContent, demandType;
5
		var conId, denmandTitle, demandContent, demandType,authType,authentication;
6 6
		console.log(ws.deman);
7 7
		/*单个需求查询*/
8 8
		function demandAngle() {
@ -29,16 +29,35 @@ mui.ready(function() {
29 29
						var proOffice = document.getElementById("proOffice");
30 30
						var proOrg = document.getElementById("proOrg");
31 31
						var proAddress = document.getElementById("proAddress");
32
						var nameli=document.getElementById("aClass");
33
						if($info.professor.authType) {
34
							nameli.classList.add('icon-vip');
35
							nameli.classList.add('authicon-cu');
36
						} else {
37
							if($info.professor.authStatus==3) {
38
								if($info.authentication == 1) {
39
									nameli.classList.add('icon-renzheng');
40
									nameli.classList.add('authicon-mana');
41
								} else if($info.professor.authentication == 2) {
42
									nameli.classList.add('icon-renzheng');
43
									nameli.classList.add('authicon-staff');
44
								} else {
45
									nameli.classList.add('icon-renzheng');
46
									nameli.classList.add('authicon-stu');
47
								}
48
							}
49
						}
32 50
						conId = $info.professor.id;
51
						authType=$info.professor.authType;
52
						authentication=$info.professor.authentication;
33 53
						denmandTitle = $info.demandTitle;
34 54
						demandContent = $info.demandContent;
35
						demandType = $info.demandAim
36 55
						proName.innerText = $info.professor.name;
37 56
						oCreateTime.innerText = $info.createTime.substr(0, 4) + "-" + $info.createTime.substr(4, 2) + "-" + $info.createTime.substr(6, 2) + " " + $info.createTime.substr(8, 2) + ":" + $info.createTime.substr(10, 2);
38 57
						oDemandTitle.innerText = $info.demandTitle;
39 58
						oDemandContent.innerText = $info.demandContent;
40 59
						($info.demandType == 1) ? oDemandType.innerText = "个人需求": oDemandType.innerText = "企业需求";
41
						($info.demandAim == 1) ? oDemandAim.innerText = "技术咨询": ($info.demandAim == 2) ? oDemandAim.innerText = "资源合作" : oDemandAim.innerText = "其他事务";
60
						($info.demandAim == 1) ? (oDemandAim.innerText = "技术咨询",demandType="技术咨询" ): ($info.demandAim == 2) ? (oDemandAim.innerText = "资源合作", demandType="资源合作"): (oDemandAim.innerText = "其他事务", demandType="其他事务");
42 61
						if($info.professor.title && $info.professor.office && $info.professor.orgName && $info.professor.address) {
43 62
							proTitle.innerText = $info.professor.title + ",";
44 63
							proOffice.innerText = $info.professor.office + ",";
@ -145,6 +164,29 @@ mui.ready(function() {
145 164
				}
146 165
			})
147 166
		}
148

167
		document.getElementById("person").addEventListener("tap",function(){
168
			plus.nativeUI.showWaiting();
169
				if(authType == 1) {
170
			//plus.webview.close("proinforbrow.html");
171
			plus.webview.create("../html/proinforbrow.html", 'proinforbrow.html', {}, {
172
				proid: conId
173
			});
174
		} else {
175
			if(authentication == 1) {
176
				plus.webview.create("../html/researcherProw.html", 'researcherProw.html', {}, {
177
					proid: professId
178
				});
179
			} else if(authentication == 2) {
180
				plus.webview.create("../html/companybrowse.html", 'companybrowse.html', {}, {
181
					proid: conId
182
				});
183
			} else if(authentication == 3) {
184
				plus.webview.create("../html/studentbrowse.html", 'studentbrowse.html', {}, {
185
					proid: conId
186
				});
187
			}
188
		}	
189
		})
190
		
149 191
	})
150 192
})