jack 8 anos atrás
pai
commit
f6f348cf29
1 arquivos alterados com 26 adições e 1 exclusões
  1. 26 1
      app/js/needIssue.js

+ 26 - 1
app/js/needIssue.js

8
		var oNavsub = document.getElementById("navsub");
8
		var oNavsub = document.getElementById("navsub");
9
		var consun;
9
		var consun;
10
		var demandType;
10
		var demandType;
11
		var orgId;
11
		if(ws.flag==0){
12
		if(ws.flag==0){
12
			demanTy(); 
13
			demanTy(); 
13
		}else if(ws.flag==1){
14
		}else if(ws.flag==1){
155
		}
156
		}
156
		industry("INDUSTRY");
157
		industry("INDUSTRY");
157
		industry("SUBJECT");
158
		industry("SUBJECT");
159
		getOrgId();
160
		function getOrgId(){
161
			mui.ajax(baseUrl + "/ajax/professor/baseInfo/"+userid, {
162
				dataType: 'json', //数据格式类型
163
				type: 'GET', //http请求类型
164
				timeout: 10000, //超时设置
165
				success: function(data) {
166
					if(data.success) {
167
					var $rta = data.data;
168
					orgId = $rta.orgId
169
					}
170
				},
171
				error: function() {
172
					plus.nativeUI.toast("服务器链接超时", toastStyle);
173
					return;
174
				}
175
			});
176
		}
158
		/*发布新需求*/
177
		/*发布新需求*/
159
		document.getElementsByClassName("topsave")[0].addEventListener("tap", function() {
178
		document.getElementsByClassName("topsave")[0].addEventListener("tap", function() {
160
				var dd = oNavsub.getElementsByClassName("set");
179
				var dd = oNavsub.getElementsByClassName("set");
180
				var cc=document.getElementById("navsubTo").getElementsByClassName("checkNow")
161
				if(dd.length == 0) {
181
				if(dd.length == 0) {
162
					plus.nativeUI.toast("请选择您发布需求的目的", toastStyle);
182
					plus.nativeUI.toast("请选择您发布需求的目的", toastStyle);
163
					return;
183
					return;
164
				}
184
				}
185
				if(cc.length == 0) {
186
					plus.nativeUI.toast("请选择您的需求类型", toastStyle);
187
					return;
188
				}
165
				if(!trim(demandContent.value)) {
189
				if(!trim(demandContent.value)) {
166
					plus.nativeUI.toast("请填写需求主题", toastStyle);
190
					plus.nativeUI.toast("请填写需求主题", toastStyle);
167
					return;
191
					return;
195
					"demandType": demandType,
219
					"demandType": demandType,
196
					"demandTitle": demandContent.value,
220
					"demandTitle": demandContent.value,
197
					"demandContent": oconsultcon.innerText,
221
					"demandContent": oconsultcon.innerText,
198
					"args": arr
222
					"args": arr,
223
					"orgId": (demandType == 2) ? orgId : "",
199
				},
224
				},
200
				success: function(data) {
225
				success: function(data) {
201
					console.log(JSON.stringify(data))
226
					console.log(JSON.stringify(data))