LIPENGTAO1313 6 ans auparavant
Parent
commit
38eb92c418

+ 1 - 30
app/html/needList.html

@ -36,20 +36,6 @@
36 36
			/*点击按钮*/
37 37
			mui.plusReady(function(){
38 38
				document.getElementById("needIssue").addEventListener('tap', function() {
39
					var $status=["0","1"];
40
					mui.ajax(baseUrl+"/ajax/demand/qc",{//查询是否有发布中和已过期的需求
41
						type:"get",
42
						data:{
43
							state:$status,
44
							uid:plus.storage.getItem('userid')
45
						},
46
						async:true,
47
						datatype:"json",
48
						traditional: true,
49
						success:function(data){
50
							console.log(JSON.stringify(data))
51
							var statusN=data.data;
52
							if(statusN!=0){
53 39
								mui.openWindow({
54 40
									url: '../html/demandPublish.html',
55 41
									id: '../html/demandPublish.html',
@ -57,22 +43,7 @@
57 43
										aniShow: "slide-in-right"
58 44
									}
59 45
								});
60
							}else{
61
								mui.openWindow({
62
									url: '../html/sureOrg.html',
63
									id: 'sureOrg.html',
64
									show: {
65
										aniShow: "slide-in-right"
66
									}
67
								});
68
							}
69
						},
70
						error: function() {
71
							plus.nativeUI.toast("服务器链接超时", toastStyle);
72
							return;
73
						}
74
					})
75
				});
46
				})
76 47
			})
77 48
		</script>
78 49
	</body>

+ 5 - 2
app/js/backBindOn.js

@ -75,7 +75,7 @@ mui.plusReady(function() {
75 75
					console.log(data.data)
76 76
					if(data.data != "null" && data.data != null) {
77 77
						var userId = data.data.id;
78
						buildingWeiChat(userId,data.data.name);
78
						buildingWeiChat(userId,data.data.name,data.data);
79 79
					} else {
80 80
						plus.nativeUI.toast("帐号和密码不匹配,请检查后重试", toastStyle);
81 81
						return;
@ -87,7 +87,7 @@ mui.plusReady(function() {
87 87
				}
88 88
			});
89 89
		}
90
		function buildingWeiChat(id,name){
90
		function buildingWeiChat(id,name,lil){
91 91
			console.log(ws.openid);
92 92
			console.log(id);
93 93
			mui.ajax(baseUrl + '/ajax/oauth/associate', {
@ -104,6 +104,9 @@ mui.plusReady(function() {
104 104
					if(data.success) {
105 105
						plus.storage.setItem('userid', id);
106 106
						plus.storage.setItem('name',name);
107
						if(lil.mobilePhone) {
108
							plus.storage.setItem('mobilePhone', lil.mobilePhone);
109
						}
107 110
						var proAiticle =plus.webview.getWebviewById('professorArticle.html')
108 111
							mui.fire(proAiticle, "newId");
109 112
						var consultPage = plus.webview.getWebviewById('consultlist.html');

+ 1 - 0
app/js/backBindUn.js

@ -236,6 +236,7 @@ phone.addEventListener("keyup",function(){
236 236
						var userId = data.data;
237 237
						plus.storage.setItem('userid', userId);
238 238
						plus.storage.setItem('name', weiChatName.value);
239
						plus.storage.setItem('mobilePhone', phone.value);
239 240
						plus.nativeUI.toast("已完成注册,请填写个人信息", toastStyle);
240 241
						mui.openWindow({
241 242
							url: 'fill-select.html',

+ 6 - 6
app/js/cmpInforShow.js

@ -19,11 +19,11 @@ mui.ready(function() {
19 19
					}
20 20
				});
21 21
			},
22
			demandListVal = function() {
22
			demandListVal = function(oname) {
23 23
				var aimId = "demandShow"
24 24
				oAjax("/ajax/demand/pq", {
25
					"state": '1',
26
					"oid": orgId,
25
					"state": [1],
26
					"oname": oname,
27 27
					"pageSize": 5
28 28
				}, "get", function(res) {
29 29
					console.log(JSON.stringify(res));
@ -279,7 +279,7 @@ mui.ready(function() {
279 279
		companyMessage(orgId);
280 280
		relevantarticalList(); //相关文章
281 281
		likeExperts(); //感兴趣企业	
282
		demandListVal()
282
		
283 283
		articalListVal()
284 284
		bindClickFun()
285 285
		queryPubCount();
@ -300,14 +300,14 @@ mui.ready(function() {
300 300
							serviceListVal();
301 301
							document.getElementsByClassName("establishments")[0].style.display="block"
302 302
						}
303
						if($data.forShort) {
303
						if(demandListVal()) {
304 304
							document.getElementById("companyNameT").innerText = $data.forShort;
305 305
							document.getElementById("companyName").innerText = $data.forShort;
306 306
						} else {
307 307
							document.getElementById("companyNameT").innerText = $data.name;
308 308
							document.getElementById("companyName").innerHTML = $data.name;
309 309
						}
310

310
						demandListVal($data.name);
311 311
						if($data.hasOrgLogo) {
312 312
							document.getElementById("oimg").src = baseUrl + "/images/org/" + $data.id + ".jpg";
313 313
						} else {

+ 2 - 0
app/js/demondModify.js

@ -170,6 +170,8 @@
170 170
 			async: true,
171 171
 			success: function(data) {
172 172
 				if(data.success) {
173
 					console.log(1111111111111)
174
 					console.log(JSON.stringify(data))
173 175
 					var $data=data.data;
174 176
 					document.querySelector("#cityResult").innerHTML=$data.province + "-" + $data.city ;
175 177
					document.querySelector("#showCityPicker").setAttribute('city', data.data.city );

+ 5 - 1
app/js/demondPublish.js

@ -141,7 +141,7 @@
141 141
 	queryPerson()
142 142
 	/*个人信息*/
143 143
 	function queryPerson() {
144
 		$.ajax(baseUrl + '/ajax/professor/baseInfo/' + userid, {
144
 		$.ajax(baseUrl + '/ajax/professor/editBaseInfo/' + userid, {
145 145
 			dataType: 'json', //数据格式类型
146 146
 			type: 'GET', //http请求类型
147 147
 			timeout: 10000,
@ -159,6 +159,10 @@
159 159
 					}
160 160
 					if( data.data.phone ) {
161 161
 						document.querySelector("#phone").value = data.data.phone ;
162
 					}else {
163
 						if(plus.storage.getItem('mobilePhone')) {
164
 							document.querySelector("#phone").value = plus.storage.getItem('mobilePhone');
165
 						}
162 166
 					}
163 167
 					
164 168
 				}

+ 3 - 0
app/js/login.js

@ -112,6 +112,9 @@ mui.ready(function() {
112 112
						var userId = data.data.id;
113 113
						plus.storage.setItem('userid', userId);
114 114
						plus.storage.setItem('name', data.data.name);
115
						if(data.data.mobilePhone) {
116
							plus.storage.setItem('mobilePhone', data.data.mobilePhone);
117
						}
115 118
						plus.nativeUI.toast("登录成功", toastStyle);
116 119
						var article = plus.webview.currentWebview();
117 120
						if(article.ourl) {

+ 4 - 0
app/js/loginTelNew.js

@ -143,6 +143,10 @@ mui.ready(function() {
143 143
						var userId = data.data.id;
144 144
						plus.storage.setItem('userid', userId);
145 145
						plus.nativeUI.toast("登录成功", toastStyle)
146
						plus.storage.setItem('name', data.data.name);
147
						if(data.data.mobilePhone) {
148
							plus.storage.setItem('mobilePhone', data.data.mobilePhone);
149
						}
146 150
						var article = plus.webview.currentWebview();
147 151
						if(article.flag==1){
148 152
							var proAiticle =plus.webview.getWebviewById('professorArticle.html')

+ 2 - 0
app/js/needList.js

@ -43,7 +43,9 @@
43 43
				dataType: 'json', //数据格式类型
44 44
				type: 'GET', //http请求类型
45 45
				timeout: 10000, //超时设置
46
				traditional:true,
46 47
				data: {
48
					'status': [0,1,2,3],
47 49
					"uid": plus.storage.getItem('userid'),
48 50
					"pageNo": pageNo,
49 51
					"pageSize": pageSize

+ 1 - 1
app/js/needSearch.js

@ -49,7 +49,7 @@ function demandList(pageSize, pageNo) {
49 49
			dataType: "json",
50 50
			traditional:true,
51 51
			data: {
52
				"state":"1",
52
				"state":[1],
53 53
				"pageNo": pageNo,
54 54
				"pageSize":pageSize
55 55
			},

+ 2 - 2
app/js/needShow.js

@ -242,8 +242,8 @@ mui.ready(function() {
242 242
				},
243 243
				"async": true,
244 244
				"success": function(data) {
245
					if(data.success && data.data) {
246
						if(data.data.name) {
245
					if(data.success) {
246
						if(data.data != null) {
247 247
							tiaoFlag = true;
248 248
							document.getElementById('attBtn').style.display = 'block';
249 249
							if(data.data.forShort) {

+ 1 - 1
app/js/public/base.js

@ -2,7 +2,7 @@
2 2
//mui.init();
3 3
//var baseUrl = "http://www.ekexiu.com"; 
4 4
//var wlogurl="http://www.ekexiu.com:8082";
5
var baseUrl = "http://192.168.3.233:81";
5
var baseUrl = "http://192.168.3.233";
6 6
var wlogurl = "http://192.168.3.233:8080";
7 7

8 8
toastStyle = {

+ 1 - 0
app/js/setup.js

@ -53,6 +53,7 @@ mui.ready(function() {
53 53
			if(e.index == 0) {
54 54
				plus.storage.removeItem("userid");
55 55
				plus.storage.removeItem("name");
56
				plus.storage.removeItem('mobilePhone');
56 57
				console.log('点击退出时id=='+plus.storage.getItem('userid'));
57 58
				//plus.cache.clear();
58 59
				//plus.storage.clear();