Pārlūkot izejas kodu

【我】、【需求搜索】、【我发布的需求】

luyanan 7 gadi atpakaļ
vecāks
revīzija
6b9bce884e

+ 24 - 16
app/css/app.css

@ -420,13 +420,13 @@ ul.boxnav li.set span:before{font-family:"iconfont";content: "\e733";font-size:1
420 420
.verified{ color: #FF9900;}
421 421

422 422
/*我的关注*/
423
.fixbox{ background: #FFFFFF; position:fixed;top:45px;left:0;width:100%; z-index:1;}
423
/*.fixbox{ background: #FFFFFF; position:fixed;top:45px;left:0;width:100%; z-index:1;}
424 424
.fixbox .fixbtn{ padding:0; margin: 0; overflow: hidden;}
425
.fixbox .fixbtn li{ list-style: none; float: left;height:40px;line-height:40px; padding:0 10px;border-top:1px solid #F0F0F0; border-bottom:1px solid #F0F0F0;text-align: center;font-size: 14px;}
425
.fixbox .fixbtn li{ list-style: none; float: left;height:40px;line-height:40px; padding:0 10px;border-top:1px solid #F0F0F0; border-bottom:1px solid #F0F0F0;text-align: center;font-size: 14px;}*/
426 426
/*.fixbox .fixbtn li:first-child{ border-right:1px solid #F0F0F0;}*/
427
.fixbox .fixbtn li.liactive{ color: #FF9900; border-bottom:2px solid #FF9900;}
427
/*.fixbox .fixbtn li.liactive{ color: #FF9900; border-bottom:2px solid #FF9900;}
428 428
.childlist{ display: none;}
429
.alllist{ margin-top: 45px;}
429
.alllist{ margin-top: 45px;}*/
430 430
/*合作历史及评价*/
431 431
.lefthead{ margin-right: 10px; text-align:center;}
432 432
.contit{ position:relative;}
@ -558,10 +558,10 @@ ul.boxnav li.set span:before{font-family:"iconfont";content: "\e733";font-size:1
558 558
.consultinfo tr td.sendbox{text-align: right;position: relative;}
559 559
.consultinfo tr td .sendbtn{width: 20%;font-size: 13px; padding: 4px 10px;margin:0;position:absolute;right:0; top:0; }
560 560

561
.tableList .mui-table-view-cell:after{right: 0;bottom: 0;left:0;background: none;}
561
/*.tableList .mui-table-view-cell:after{right: 0;bottom: 0;left:0;background: none;}
562 562
.tableList {background: #EFEFEF;}	
563 563
.tableList li .proinfor{background:#FFFFFF;}	
564
.tableList li:first-child{margin-top:0;}
564
.tableList li:first-child{margin-top:0;}*/
565 565

566 566
.operatebox{ width:100%;background: #FFFFFF;overflow: hidden;min-height: 60px;padding:10px;position: relative;}
567 567
.themespan{ width: 54%;}
@ -937,19 +937,23 @@ footer.chatFooter .mui-icon-paperplane {font-size: 16px;word-break: keep-all;lin
937 937
.commonBtn .mui-col-xs-6 .h3Font{color:#333333;line-height: 30px;margin:0;}
938 938
.setItemblock{padding-top:44px;padding-bottom:20px;}
939 939
.setItemblock .rightword{position: absolute;right: 32px;font-size: 13px;color: #999999;}
940
.setItem{width:96%;font-size:14px;color:#333;margin:6px auto;background-repeat: no-repeat;background-position:0 0;background-size: 100%;}
940
.setItem{font-size:14px;color:#333;margin:6px auto;}
941 941
.setItem .mui-navigate-right:after{right:10px;font-size:18px;}
942
.setItem .mui-table-view{border-radius: 10px;overflow: hidden;padding-top: 2px;padding-bottom: 3px;}
943
.setItem .mui-table-view .mui-table-view-cell{width: 90%;margin: auto;padding:4% 0 4% 8px;border-top: 2px dashed #E5E5E5;}
944
.setItem .mui-table-view .mui-table-view-cell:first-child{border-color:transparent;}
945
.setItem .mui-table-view .mui-table-view-cell:after{height: 0;}
942
.setItem .mui-table-view{border-radius: 10px;overflow: hidden;padding-top: 2px;padding-bottom: 3px;width:96%;margin: auto;}
943

944
.setItem .mui-table-view .mui-table-view-cell:after{background:transparent}
946 945
.setItem .mui-table-view .mui-table-view-cell>a:not(.mui-btn).mui-active{background: none;}
947
.setItem.itemOne{background-image: url(../images/me_bg_img_1_nor@3x.png);}
948
.setItem.itemTwo{background-image: url(../images/me_bg_img_2_nor@3x.png);}
949
.setItem.itemThree{background-image: url(../images/me_bg_img_3_nor@3x.png);}
946
.setItem .mui-table-view .mui-table-view-cell:before{content:"";background:url(../images/me_bg_img_line_nor@3x_03.png) no-repeat center center transparent;background-size:auto 100%;display: block;width:92%;height:2px;position:absolute;top:0;}
947
.setItem .mui-table-view .mui-table-view-cell:first-child:before{background: transparent;}
948
.setItem .mui-table-view .mui-table-view-cell:first-child{background-image: url(../images/me_bg_img_3_nor@3x_01.png);}
949
.setItem .mui-table-view .mui-table-view-cell + .mui-table-view-cell:last-child{background-image: url(../images/me_bg_img_3_nor@3x_03.png);}
950
.setItem .mui-table-view .mui-table-view-cell{background-image: url(../images/me_bg_img_3_nor@3x_02.png);background-repeat: no-repeat;background-position:0 0;background-size:100% 100%; padding:4.5% 16px 4.5%;width:100%;}
951
.setItem.itemOne .mui-table-view .mui-table-view-cell{background-image: url(../images/me_bg_img_1_nor@3x.png);}
952

950 953
.itemIcon{display:inline-block;float:left;margin-right:8px;width:20px;height: 20px;background-repeat:no-repeat;background-position:0 0;background-size:100%;}
951 954
.itemIcon.iconFocus{background-image: url(../images/me_button_guanzhushoucang_nor@3x.png);}
952 955
.itemIcon.iconDemand{background-image: url(../images/me_button_xuqiu_nor@3x.png);}
956
.itemIcon.iconDemandS{background-image: url(../images/me_button_xuqiusearch_nor@3x.png);}
953 957
.itemIcon.iconReward{background-image: url(../images/me_button_jifen_nor@3x.png);}
954 958
.itemIcon.iconInvite{background-image: url(../images/me_button_yaoqing_nor@3x.png);}
955 959
.itemIcon.iconAuth{background-image: url(../images/me_button_renzheng_nor@3x.png);}
@ -1204,6 +1208,10 @@ ul.tagList>li .h2Font{color: #666; -webkit-user-select:text;}
1204 1208
.needList .madiaInfo .h2Font{font-size: 14px;line-height:24px;margin: 4px 0;color: #666;}
1205 1209
.needList .madiaInfo .h3Font{font-size: 12px;color:#999;}
1206 1210
.needList>ul>li{padding:15px;}
1207
.needList ul .showli{overflow: hidden;}
1208
.needList ul .showli>span{display:inline-block;margin-top: 6px;padding-right:10px;float:left;}
1211
.showli{overflow: hidden;margin-top:10px;}
1212
.showli>span{padding-right:10px;font-size: 12px;color:#999;}
1213
.showli>span.draftLable{color:#FF0000;}
1214
.showli>span.overLable{color:#14b521;}
1209 1215

1216
.myAllneeds>li{min-height: 97px;}
1217
.right-span{position: absolute;right: 15px;top:50%;margin-top:-25px;border: 1px solid #999;color:#999;padding:1px 2px;font-size: 12px;line-height:normal;border-radius: 2px;}

+ 152 - 192
app/html/myaccount.html

@ -1,5 +1,6 @@
1 1
<!doctype html>
2 2
<html>
3
3 4
	<head>
4 5
		<meta charset="UTF-8">
5 6
		<title>我</title>
@ -8,215 +9,174 @@
8 9
		<link href="../css/iconfont.css" rel="stylesheet" />
9 10
		<link href="../css/app.css" rel="stylesheet" />
10 11
	</head>
12
11 13
	<body>
12
        <!--登陆状态-->
13
		<div class="mui-content bodyBg displayNone" id="loginNo">
14
		<!--登陆状态-->
15
		<div class="mui-content bodyBg mui-scroll-wrapper" id="pullrefresh">
14 16
			<!-- 主界面具体展示内容 -->
15
			<div class="inviteBoxNew">
16
				<div class="userLogin">
17
					<ul class="mui-table-view loginStatus">
18
						<li class="mui-table-view-cell">
19
							<div class="flexCenter">
20
								<div class="userImg userRadius">
21
					        		<img src="../images/default-photo.jpg"/>
22
					        	</div>
23
								<div class="userInfo">
24
									<p class="h1Font positionR">未登录 / 立即登录</p>
17
			<div class="mui-scroll">
18
				<div class="inviteBoxNew displayNone" id="loginYes">
19
					<div class="userLogin" id="setUser">
20
						<ul class="mui-table-view loginStatus">
21
							<!--登录状态-->
22
							<li class="mui-table-view-cell">
23
								<div class="flexCenter">
24
									<div class="userImg userRadius">
25
										<img src="../images/default-photo.jpg" id="userImg" />
26
									</div>
27
									<div class="userInfo">
28
										<p class="h1Font positionR"><span id="userName"></span><em class="authicon" id="authicon"></em></p>
29
										<p class="h2Font" id="orgName"></p>
30
										<span class="exitSpan" id="exitSpan"></span>
31
									</div>
25 32
								</div>
33
							</li>
34
						</ul>
35
					</div>
36
					<div class="mui-row commonBtn">
37
						<div class="mui-col-xs-6" id="myCard">
38
							<div class="commonBtnitem">
39
								<img src="../images/me_button_mingpian_nor@3x.png" />
40
								<p class="h3Font">我的名片</p>
26 41
							</div>
27
						</li>
28
					</ul>
29
				</div>
30
				<div class="mui-row commonBtn">
31
					<div class="mui-col-xs-6" >
32
						<div class="commonBtnitem">
33
							<img src="../images/me_button_mingpian_nor@3x.png" />
34
							<p class="h3Font">我的名片</p>
35 42
						</div>
36
					</div>
37
					<div class="mui-col-xs-6" >
38
						<div class="commonBtnitem">
39
							<img src="../images/me_button_qiandao_nor@3x.png" />
40
							<p class="h3Font">立即签到</p>
43
						<div class="mui-col-xs-6">
44
							<div class="commonBtnitem displayNone" id="nosign">
45
								<img src="../images/me_button_qiandao_nor@3x.png" />
46
								<p class="h3Font">立即签到</p>
47
							</div>
48
							<div class="commonBtnitem displayNone" id="yessign">
49
								<img src="../images/me_button_qiandao_nor@3x.png" />
50
								<p class="h3Font">今日已签到</p>
51
							</div>
41 52
						</div>
42 53
					</div>
43 54
				</div>
44
			</div>
45
			<div class="maincontent setItemblock">
46
				<div class="setItem itemTwo">
47
					<ul class="mui-table-view">
48
						<li class="mui-table-view-cell">
49
							<a class="mui-navigate-right">
50
					        	<em class="itemIcon iconFocus"></em>
51
					        	<span class="mui-pull-left">关注与收藏</span>
52
					        </a>
53
						</li>
54
						<li class="mui-table-view-cell">
55
							<a class="mui-navigate-right">
56
					        	<em class="itemIcon iconDemand"></em>
57
					        	<span class="mui-pull-left">我发布的需求</span>
58
					        </a>
59
						</li>
60
						<!--身份为专家时显示,并且将父级模块类改为itemThree-->
61
						<li class="mui-table-view-cell displayNone">
62
							<a class="mui-navigate-right">
63
					        	<em class="itemIcon iconAssess"></em>
64
					        	<span class="mui-pull-left">我收到的评价</span>
65
					        </a>
66
						</li>
67
					</ul>
68
				</div>
69
				<div class="setItem itemTwo">
70
					<ul class="mui-table-view">
71
						<li class="mui-table-view-cell">
72
							<a class="mui-navigate-right">
73
					        	<em class="itemIcon iconReward"></em>
74
					        	<span class="mui-pull-left">我的积分</span>
75
					        </a>
76
						</li>
77
						<li class="mui-table-view-cell">
78
							<a class="mui-navigate-right">
79
					        	<em class="itemIcon iconInvite"></em>
80
					        	<span class="mui-pull-left">邀请好友</span>
81
					        </a>
82
						</li>
83
					</ul>
84
				</div>
85
				<div class="setItem itemOne">
86
					<ul class="mui-table-view">
87
						<li class="mui-table-view-cell">
88
							<a class="mui-navigate-right">
89
					        	<em class="itemIcon iconAuth"></em>
90
					        	<span class="mui-pull-left">专家认证</span>
91
					        	<span class="rightword"></span>
92
					        </a>
93
						</li>
94
					</ul>
95
				</div>
96
				<div class="setItem itemOne">
97
					<ul class="mui-table-view">
98
						<li class="mui-table-view-cell">
99
							<a class="mui-navigate-right">
100
					        	<em class="itemIcon iconSet"></em>
101
					        	<span class="mui-pull-left">设置</span>
102
					        </a>
103
						</li>
104
					</ul>
105
				</div>
106
			</div>
107
    	
108
		</div>	
109
		
110
		<!--登陆状态-->
111
		<div class="mui-content bodyBg displayNone mui-scroll-wrapper" id="loginYes" >
112
			<!-- 主界面具体展示内容 -->
113
			<div class="mui-scroll">
114
			<ul class="mui-table-view mui-table-view-chevron">
115
			<div class="inviteBoxNew">
116
				
117
				<div class="userLogin" id="setUser">
118
					<ul class="mui-table-view loginStatus">
119
						<!--登录状态-->
120
						<li class="mui-table-view-cell">
121
							<div class="flexCenter">
122
								<div class="userImg userRadius">
123
					        		<img src="../images/default-photo.jpg" id="userImg"/>
124
					        	</div>
125
								<div class="userInfo">
126
									<p class="h1Font positionR"><span id="userName"></span><em class="authicon" id="authicon"></em></p>
127
									<p class="h2Font" id="orgName"></p>
128
									<span class="exitSpan" id="exitSpan"></span>
55
				<div class="inviteBoxNew displayNone" id="loginNo">
56
					<div class="userLogin">
57
						<ul class="mui-table-view loginStatus">
58
							<li class="mui-table-view-cell">
59
								<div class="flexCenter">
60
									<div class="userImg userRadius">
61
										<img src="../images/default-photo.jpg" />
62
									</div>
63
									<div class="userInfo">
64
										<p class="h1Font positionR">未登录 / 立即登录</p>
65
									</div>
129 66
								</div>
130
							</div>
131
						</li>
132
					</ul>
133
				</div>
134
				<div class="mui-row commonBtn">
135
					<div class="mui-col-xs-6" id="myCard">
136
						<div class="commonBtnitem">
137
							<img src="../images/me_button_mingpian_nor@3x.png" />
138
							<p class="h3Font">我的名片</p>
139
						</div>
67
							</li>
68
						</ul>
140 69
					</div>
141
					<div class="mui-col-xs-6">
142
						<div class="commonBtnitem displayNone" id="nosign">
143
							<img src="../images/me_button_qiandao_nor@3x.png" />
144
							<p class="h3Font">立即签到</p>
70
					<div class="mui-row commonBtn">
71
						<div class="mui-col-xs-6">
72
							<div class="commonBtnitem">
73
								<img src="../images/me_button_mingpian_nor@3x.png" />
74
								<p class="h3Font">我的名片</p>
75
							</div>
145 76
						</div>
146
						<div class="commonBtnitem displayNone" id="yessign">
147
							<img src="../images/me_button_qiandao_nor@3x.png" />
148
							<p class="h3Font">今日已签到</p>
77
						<div class="mui-col-xs-6">
78
							<div class="commonBtnitem">
79
								<img src="../images/me_button_qiandao_nor@3x.png" />
80
								<p class="h3Font">立即签到</p>
81
							</div>
149 82
						</div>
150 83
					</div>
151 84
				</div>
152
			</div>
153
			<div class="maincontent setItemblock">
154
				<div class="setItem itemTwo" id="setItem">
155
					<ul class="mui-table-view">
156
						<li class="mui-table-view-cell" id="goFollow">
157
							<a class="mui-navigate-right">
158
					        	<em class="itemIcon iconFocus"></em>
159
					        	<span class="mui-pull-left">关注与收藏</span>
160
					        </a>
161
						</li>
162
						<li class="mui-table-view-cell" id="demand">
163
							<a class="mui-navigate-right">
164
					        	<em class="itemIcon iconDemand"></em>
165
					        	<span class="mui-pull-left">我发布的需求</span>
166
					        </a>
167
						</li>
168
						<!--身份为专家时显示,并且将父级模块类改为itemThree-->
169
						<li class="mui-table-view-cell displayNone" id="goZixun">
170
							<a class="mui-navigate-right">
171
					        	<em class="itemIcon iconAssess"></em>
172
					        	<span class="mui-pull-left">我收到的评价</span>
173
					        </a>
174
						</li>
175
					</ul>
176
				</div>
177
				<div class="setItem itemTwo">
178
					<ul class="mui-table-view">
179
						<li class="mui-table-view-cell"  id="myIntegral">
180
							<a class="mui-navigate-right">
181
					        	<em class="itemIcon iconReward"></em>
182
					        	<span class="mui-pull-left">我的积分</span>
183
					        </a>
184
						</li>
185
						<li class="mui-table-view-cell" id="goNewuser">
186
							<a class="mui-navigate-right">
187
					        	<em class="itemIcon iconInvite"></em>
188
					        	<span class="mui-pull-left">邀请好友</span>
189
					        </a>
190
						</li>
191
					</ul>
192
				</div>
193
				<div class="setItem itemOne">
194
					<ul class="mui-table-view">
195
						<li class="mui-table-view-cell" id="goBecomeExpert">
196
							<a class="mui-navigate-right">
197
					        	<em class="itemIcon iconAuth"></em>
198
					        	<span class="mui-pull-left">专家认证</span>
199
					        	<span class="rightword" id="expertAuth"></span>
200
					        </a>
201
						</li>
202
					</ul>
203
				</div>
204
				<div class="setItem itemOne">
205
					<ul class="mui-table-view">
206
						<li class="mui-table-view-cell" id="goSetup">
207
							<a class="mui-navigate-right">
208
					        	<em class="itemIcon iconSet"></em>
209
					        	<span class="mui-pull-left">设置</span>
210
					        </a>
211
						</li>
212
					</ul>
85
86
				<div class="maincontent setItemblock">
87
					<div class="setItem" id="noExpert">
88
						<ul class="mui-table-view">
89
							<li class="mui-table-view-cell goFollow">
90
								<a class="mui-navigate-right">
91
									<em class="itemIcon iconFocus"></em>
92
									<span class="mui-pull-left">关注与收藏</span>
93
								</a>
94
							</li>
95
							<li class="mui-table-view-cell mydemand">
96
								<a class="mui-navigate-right">
97
									<em class="itemIcon iconDemand"></em>
98
									<span class="mui-pull-left">我发布的需求</span>
99
								</a>
100
							</li>
101
							<li class="mui-table-view-cell demandSearch">
102
								<a class="mui-navigate-right">
103
									<em class="itemIcon iconDemandS"></em>
104
									<span class="mui-pull-left">需求搜索</span>
105
								</a>
106
							</li>
107
						</ul>
108
					</div>
109
					<div class="setItem displayNone" id="isExpert">
110
						<ul class="mui-table-view">
111
							<li class="mui-table-view-cell goFollow">
112
								<a class="mui-navigate-right">
113
									<em class="itemIcon iconFocus"></em>
114
									<span class="mui-pull-left">关注与收藏</span>
115
								</a>
116
							</li>
117
							<li class="mui-table-view-cell mydemand">
118
								<a class="mui-navigate-right">
119
									<em class="itemIcon iconDemand"></em>
120
									<span class="mui-pull-left">我发布的需求</span>
121
								</a>
122
							</li>
123
							<li class="mui-table-view-cell demandSearch">
124
								<a class="mui-navigate-right">
125
									<em class="itemIcon iconDemandS"></em>
126
									<span class="mui-pull-left">需求搜索</span>
127
								</a>
128
							</li>
129
							<li class="mui-table-view-cell" id="goZixun">
130
								<a class="mui-navigate-right">
131
									<em class="itemIcon iconAssess"></em>
132
									<span class="mui-pull-left">我收到的评价</span>
133
								</a>
134
							</li>
135
						</ul>
136
					</div>
137
					<div class="setItem">
138
						<ul class="mui-table-view">
139
							<li class="mui-table-view-cell" id="myIntegral">
140
								<a class="mui-navigate-right">
141
									<em class="itemIcon iconReward"></em>
142
									<span class="mui-pull-left">我的积分</span>
143
								</a>
144
							</li>
145
							<li class="mui-table-view-cell" id="goNewuser">
146
								<a class="mui-navigate-right">
147
									<em class="itemIcon iconInvite"></em>
148
									<span class="mui-pull-left">邀请好友</span>
149
								</a>
150
							</li>
151
						</ul>
152
					</div>
153
					<div class="setItem itemOne">
154
						<ul class="mui-table-view">
155
							<li class="mui-table-view-cell" id="goBecomeExpert">
156
								<a class="mui-navigate-right">
157
									<em class="itemIcon iconAuth"></em>
158
									<span class="mui-pull-left">专家认证</span>
159
									<span class="rightword" id="expertAuth"></span>
160
								</a>
161
							</li>
162
						</ul>
163
					</div>
164
					<div class="setItem itemOne">
165
						<ul class="mui-table-view">
166
							<li class="mui-table-view-cell" id="goSetup">
167
								<a class="mui-navigate-right">
168
									<em class="itemIcon iconSet"></em>
169
									<span class="mui-pull-left">设置</span>
170
								</a>
171
							</li>
172
						</ul>
173
					</div>
213 174
				</div>
214 175
			</div>
215
    		</ul>
216
    		</div>
217
		</div>	
176
		</div>
218 177
		<script src="../js/public/mui.min.js"></script>
219 178
		<script src="../js/public/base.js"></script>
220 179
		<script src="../js/myaccount.js"></script>
221 180
	</body>
222
</html>
181
182
</html>

+ 21 - 36
app/html/needList.html

@ -4,51 +4,36 @@
4 4
		<meta charset="UTF-8">
5 5
		<title>我的需求</title>
6 6
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
		<meta name="apple-mobile-web-app-capable" content="yes">
8
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
7 9
		<link href="../css/mui.min.css" rel="stylesheet" />
8 10
		<link href="../css/iconfont.css" rel="stylesheet" />
9 11
		<link href="../css/app.css" rel="stylesheet" />
10
		<style type="text/css">
11
			.mui-table-view .mui-media-object.btnLinkIcon{width:36px; height:36px;line-height:36px;}
12
			.mui-table-view .mui-media-object.btnLinkIcon .iconfont{color:#FFFFFF;line-height:24px;}
13
		    .mui-scroll-wrapper{overflow:auto;}
14
		    .tableList li.mui-table-view-cell .coutopicbox{padding-left:20px}
15
		    .tableList li.mui-table-view-cell .proinfor{padding-left:24px;}
16
		</style>
17 12
	</head>
18 13
19 14
	<body>
20
		<header class="mui-bar mui-bar-nav toptitbox">
21
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
22
		    <h1 class="mui-title toptit">我的需求</h1>
15
		<header class="mui-bar mui-bar-nav toptitbox">
16
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
17
		    <h1 class="mui-title toptit">我发布的需求</h1>
18
		    <span class="mui-pull-right topsave">发需求</span>
23 19
		</header>
24
		<div class="mui-content">
25
			<div class="filterdiv btnLinkBox" id="btnLinkBox">
26
				<ul class="mui-table-view">
27
					<li class="mui-table-view-cell mui-media">
28
						<a href="javascript:;">
29
							<div class="mui-media-object mui-pull-left btnLinkIcon fabuBtn">
30
								<em class="mui-icon iconfont icon-fabu"></em>
31
							</div>
32
							<div class="mui-media-body btnLink">
33
								<h4 style="line-height:24px;font-size:20px">发布新需求</h4>
34
							</div>
35
						</a>
36
					</li>
37
				</ul>
38
			</div>
39
			<div class="contentInner">
40
				<div id="zixunpullrefresh" class="mui-content mui-scroll-wrapper" style="top:100px">
41
		  			<div class="mui-scroll">
42
					    <ul class="mui-table-view protable tableList">
43
					    </ul>
44
					</div>
45
				</div>
46
			</div>
47
		</div>
48
20
		<div class="mui-content"></div>
21
		
49 22
		<script src="../js/public/mui.min.js"></script>
50 23
		<script src="../js/public/base.js"></script>
51
		<script src="../js/needList.js"></script>
24
		<script type="text/javascript">
25
			//启用双击监听
26
			mui.init({
27
				subpages:[{
28
					url:'needList_sub.html',
29
					id:'needList_sub.html',
30
					styles:{
31
						top: '44px',
32
						bottom: '0px',
33
					}
34
				}]
35
			});
36
		</script>
52 37
	</body>
53 38
54 39
</html>

+ 36 - 0
app/html/needList_sub.html

@ -0,0 +1,36 @@
1
<!doctype html>
2
<html>
3
	<head>
4
		<meta charset="UTF-8">
5
		<title>我的需求</title>
6
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
		<meta name="apple-mobile-web-app-capable" content="yes">
8
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9
		<link href="../css/mui.min.css" rel="stylesheet" />
10
		<link href="../css/iconfont.css" rel="stylesheet" />
11
		<link href="../css/app.css" rel="stylesheet" />
12
	</head>
13
14
	<body>
15
		<div class="mui-content mui-scroll-wrapper" id="pullrefresh">
16
		 	<div class="mui-scroll">
17
			    <ul class="mui-table-view myAllneeds" id="myneedList">
18
					<!--<li class="mui-table-view-cell flexCenter">
19
						<div class="madiaInfo">
20
							<p class="h1Font mui-ellipsis-2">需求主题寻求一名斯特林热机顾问</p>
21
							<div class="showli mui-ellipsis">
22
								<span>发布于 8月17日 18:00</span>
23
								<span class="redTip">已于 8月17日 18:00 过期</span>
24
							</div>
25
						</div>
26
					</li>-->
27
			    </ul>
28
			</div>
29
		</div>
30
31
		<script src="../js/public/mui.min.js"></script>
32
		<script src="../js/public/base.js"></script>
33
		<script src="../js/needList.js"></script>
34
	</body>
35
36
</html>

+ 13 - 73
app/html/needSearch.html

@ -7,12 +7,6 @@
7 7
		<link href="../css/mui.min.css" rel="stylesheet" />
8 8
		<link href="../css/iconfont.css" rel="stylesheet" />
9 9
		<link href="../css/app.css" rel="stylesheet" />
10
		<style type="text/css">
11
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;}
12
			.mui-content{height:100%;overflow: auto;}
13
			.icon-renzheng{top: 14px;}
14
			
15
		</style>
16 10
	</head>
17 11
18 12
	<body>
@ -20,77 +14,23 @@
20 14
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
21 15
		    <h1 class="mui-title toptit">需求搜索</h1>
22 16
		</header>
23
		<div class="mui-content">
24
			<div class="filterbox2 filterdiv">
25
				<ul class="filterblock2">
26
					<li style="width:22%;">
27
						<a href="#middlePopover1"  class="mui-btn mui-btn-block mui-btn-outlined filterlist2"><span id="headck1" headck='0'>需求目的</span><em class="mui-icon mui-icon-arrowdown"></em></a>
28
					</li>
29
					<li style="width:22%;">
30
						<a href="#middlePopoveracad"  class="mui-btn mui-btn-block mui-btn-outlined filterlist2"><span id="headck2" headck='0'>热门行业</span><em class="mui-icon mui-icon-arrowdown"></em></a>
31
					</li>
32
					<li style="width:22%;">
33
						<a href="#middlePopoveruse"  class="mui-btn mui-btn-block mui-btn-outlined filterlist2"><span id="headck3" headck='0'>热门领域</span><em class="mui-icon mui-icon-arrowdown"></em></a>
34
					</li>
35
					<li style="width:34%;">
36
						<a href="#middlePopover4"  class="mui-btn mui-btn-block mui-btn-outlined filterlist2" ><span id="headck4" headck='1'>按最新发布时间排序</span><em class="mui-icon mui-icon-arrowdown"></em></a>
37
					</li>
38
				</ul>
39
			</div>
40
			
41
				<div id="pullrefresht" class="mui-content mui-scroll-wrapper"style="padding-top:40px">
42
		  			<div class="mui-scroll">
43
					    <ul class="mui-table-view protable tableList">
44
					   		
45
					    </ul>
46
					</div>
47
				</div>
48
		</div>
49
		<!--下拉菜单-->
50
		<!--需求目的-->
51
		<div id="middlePopover1" class="mui-popover popoverbox">
52
			<div class="mui-popover-arrow"></div>
53
			<div class="mui-scroll-wrapper">
54
				<div class="mui-scroll">
55
					<ul class="mui-table-view mui-table-view-radio">
56
						<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#" ck2="0">不限</a></li>
57
						<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#" ck2="1">技术咨询</a></li>
58
						<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#" ck2="2">资源咨询</a></li>
59
						<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#" ck2="3">其他事务</a></li>
60
					</ul>
61
				</div>
62
			</div>
63
		</div>
64
		<!--应用行业-->
65
		<div id="middlePopoveracad" class="mui-popover popoverbox2" >
66
			<ul class="mui-table-view yyhy" id="yyhy">
67
			</ul>
68
		</div>
69
		<!--学术领域-->
70
		<div id="middlePopoveruse" class="mui-popover popoverbox2">
71
			<ul class="mui-table-view xsly" id="xsly">
72
			</ul>
73
		</div>
74
		<!--排序-->
75
		<div id="middlePopover4" class="mui-popover popoverbox" style="height:80px;width:160px;">
76
			<div class="mui-popover-arrow"></div>
77
			<div class="mui-scroll-wrapper">
78
				<div class="mui-scroll">
79
					<ul class="mui-table-view mui-table-view-radio">
80
						<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#" ck4="0">按最新发布时间排序</a></li>
81
						<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#" ck4="1">按最早发布时间排序</a></li>
82
					</ul>
83
				</div>
84
			</div>
85
		</div>
17
		<div class="mui-content"></div>
86 18
		
87 19
		<script src="../js/public/mui.min.js"></script>
88 20
		<script src="../js/public/base.js"></script>
89
		<script type="text/javascript"> 
90
			//处理iOS下弹出软键盘后头部会随页面的滚动条消失问题
91
		    iosheader();
21
		<script type="text/javascript">
22
			//启用双击监听
23
			mui.init({
24
				subpages:[{
25
					url:'needSearch_sub.html',
26
					id:'needSearch_sub.html',
27
					styles:{
28
						top: '44px',
29
						bottom: '0px',
30
					}
31
				}]
32
			});
92 33
		</script>
93
		<script src="../js/needSearch.js"></script>
94 34
	</body>
95 35
96 36
</html>

+ 41 - 0
app/html/needSearch_sub.html

@ -0,0 +1,41 @@
1
<!doctype html>
2
<html>
3
	<head>
4
		<meta charset="UTF-8">
5
		<title>需求搜索</title>
6
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
		<link href="../css/mui.min.css" rel="stylesheet" />
8
		<link href="../css/iconfont.css" rel="stylesheet" />
9
		<link href="../css/app.css" rel="stylesheet" />
10
	</head>
11
12
	<body>
13
		<div class="mui-content mui-scroll-wrapper" id="pullrefresh">
14
		 	<div class="mui-scroll">
15
				<div class="infocon madiaBlock needList">
16
					<ul class="mui-table-view" id="demandList">
17
						<!--<li class="mui-table-view-cell">
18
							<div class="madiaInfo">
19
								<p class="h1Font mui-ellipsis-2">需求主题寻求一名斯特林热机技术顾问需求主题寻求一名斯特林热机技术顾问需求主题寻求一名斯特林热机技术顾问</p>
20
								<p class="h2Font mui-ellipsis-5">需求内容:我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进,
21
									想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出产品的三维模型,用于展示以及为后续生产做准备我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进,
22
									想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出</p>
23
								<div class="showli mui-ellipsis">
24
									<span>北京市</span>
25
									<span>预期 1个月内</span>
26
									<span>预算 1万元以内</span>
27
									<span>有效期至 8月17日</span>
28
								</div>
29
							</div>
30
						</li>-->
31
					</ul>
32
				</div>
33
			</div>
34
		</div>
35
		
36
		<script src="../js/public/mui.min.js"></script>
37
		<script src="../js/public/base.js"></script>
38
		<script src="../js/needSearch.js"></script>
39
	</body>
40
41
</html>

+ 2 - 2
app/html/userInforShow.html

@ -58,7 +58,7 @@
58 58
								<p class="h2Font mui-ellipsis-5">需求内容:我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进,
59 59
									想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出产品的三维模型,用于展示以及为后续生产做准备我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进,
60 60
									想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出</p>
61
								<div class="showli mui-ellipsis h3Font">
61
								<div class="showli mui-ellipsis">
62 62
									<span>北京市</span>
63 63
									<span>预期 1个月内</span>
64 64
									<span>预算 1万元以内</span>
@ -72,7 +72,7 @@
72 72
								<p class="h2Font mui-ellipsis-5">需求内容:我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进,
73 73
									想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出产品的三维模型,用于展示以及为后续生产做准备我们是一家医疗器械公司,主要生产健康理疗类的电子产品,目前希望对护膝、护腰类的产品进行改进,
74 74
									想先找一位有资深设计经验的三维工业设计专家,通过三维建模的方式先设计出</p>
75
								<div class="showli mui-ellipsis h3Font">
75
								<div class="showli mui-ellipsis">
76 76
									<span>北京市</span>
77 77
									<span>预期 1个月内</span>
78 78
									<span>预算 1万元以内</span>

BIN
app/images/me_bg_img_3_nor@3x_01.png


BIN
app/images/me_bg_img_3_nor@3x_02.png


BIN
app/images/me_bg_img_3_nor@3x_03.png


BIN
app/images/me_bg_img_line_nor@3x_03.png


BIN
app/images/me_button_xuqiusearch_nor@3x.png


BIN
app/images/yqbg.jpg


+ 310 - 273
app/js/myaccount.js

@ -1,12 +1,13 @@
1 1
//我的账号
2
	mui.init({
2
mui.init({
3 3
	pullRefresh: {
4
		container: '#loginYes',
4
		container: '#pullrefresh',
5 5
		down: {
6 6
			callback: pulldownRefresh
7 7
		}
8 8
	}
9 9
});
10

10 11
function pulldownRefresh() {
11 12
	setTimeout(function() {
12 13
		userInformation();
@ -14,10 +15,10 @@ function pulldownRefresh() {
14 15
		signFun();
15 16
		/*专家认证*/
16 17
		//isexpert();
17
		
18

18 19
		/*初始化签到状态*/
19 20
		//signFun();
20
		mui('#loginYes').pullRefresh().endPulldownToRefresh();
21
		mui('#pullrefresh').pullRefresh().endPulldownToRefresh();
21 22
	}, 1000);
22 23
}
23 24
mui.ready(function() {
@ -27,9 +28,6 @@ mui.ready(function() {
27 28
	var goLogin = document.getElementById("gologin");
28 29
	var goReg = document.getElementById("goreg");
29 30
	var goSetup = document.getElementById("goSetup");
30
	var gonXuqiu=document.getElementById("demand");
31
	var goZixun = document.getElementById("goZixun")
32
	var goFollow = document.getElementById("goFollow");
33 31
	var userImg = document.getElementById("userImg");
34 32
	var userImg2 = document.getElementById("userImg2");
35 33
	var nameli = document.getElementById("nameli");
@ -37,25 +35,25 @@ mui.ready(function() {
37 35
	var infobasic = document.getElementById("setUser");
38 36
	var myIntegral = document.getElementById("myIntegral");
39 37
	var nosign = document.getElementById("nosign");
40
	var yessign =document.getElementById("yessign");
41
	var professorName,scorePercent;
38
	var yessign = document.getElementById("yessign");
39
	var professorName, scorePercent;
40
	
42 41
	mui.plusReady(function() {
43
		
44 42
		var userId = plus.storage.getItem('userid');
45 43
		console.log(userId);
46
		
44
		var iflogin=0;
47 45
		/*判断登录是否成功*/
48 46
		loginStatus();
49

47
		
50 48
		/*用户信息初始化*/
51 49
		userInformation();
52
		
50

53 51
		/*专家认证*/
54 52
		isexpert();
55
		
53

56 54
		/*初始化签到状态*/
57 55
		signFun();
58
		
56

59 57
		/*登录按钮*/
60 58
		loginNo.addEventListener('tap', function() {
61 59
			goLoginFun();
@ -68,17 +66,19 @@ mui.ready(function() {
68 66

69 67
		/*退出我的积分*/
70 68
		window.addEventListener('rewards', function(event) {
71
			plus.navigator.setStatusBarBackground( "#FF9900" );
69
			plus.navigator.setStatusBarBackground("#FF9900");
72 70
		});
73
		
71

74 72
		/*退出登录刷新页面*/
75 73
		window.addEventListener('closeUser', function(event) {
76 74
			userId = event.detail.id;
77 75
			console.log(userId);
78 76
			loginStatus();
79 77
			userInformation();
78
			document.getElementById("noExpert").classList.remove("displayNone");
79
			document.getElementById("isExpert").classList.add("displayNone");
80 80
		});
81
		
81

82 82
		//在修改上传图片触发的事件
83 83
		window.addEventListener('photoUser', function(event) {
84 84
			/*nameli.classList.remove(nameli.classList[2])
@ -86,15 +86,15 @@ mui.ready(function() {
86 86
			nameli.innerHTML = ""*/
87 87
			userInformation();
88 88
		});
89
		
89

90 90
		//点击签到
91
		var signed=document.getElementById("nosign");
91
		var signed = document.getElementById("nosign");
92 92
		signed.addEventListener("tap", function() {
93 93
			signyesFun();
94 94
		})
95
		
95

96 96
		//点击我的名片
97
		var myCard=document.getElementById("myCard");
97
		var myCard = document.getElementById("myCard");
98 98
		myCard.addEventListener("tap", function() {
99 99
			mui.openWindow({
100 100
				url: '../html/mycard.html',
@ -107,278 +107,315 @@ mui.ready(function() {
107 107
				}
108 108
			});
109 109
		})
110
		/*设置*/
111
		goSetup.addEventListener('tap', function() {
112
			if(userId && userId != "null" && userId != null){
113
				mui.openWindow({
114
					url: '../html/setup.html',
115
					id: '../html/setup.html',
116
					show: {
117
						//autoShow: false,
118
						aniShow: "slide-in-right"
119
					}
120
				});
121
			}else{
122
				goLoginFun();
123
			}
124
		})
125
		/*我的需求*/
126
		mui(".mydemand")[iflogin].addEventListener('tap', function() {
127
			if(userId && userId != "null" && userId != null){
128
				mui.openWindow({
129
					url: '../html/needList.html',
130
					id: '../html/needList.html',
131
					show: {
132
						autoShow: false,
133
						aniShow: "slide-in-right"
134
					}
135
				});
136
			}else{
137
				goLoginFun();
138
			}
139
		})
140
		/*需求搜索*/
141
		mui(".demandSearch")[iflogin].addEventListener('tap', function() {
142
			mui.openWindow({
143
				url: '../html/needSearch.html',
144
				id: '../html/needSearch.html',
145
				show: {
146
					autoShow: false,
147
					aniShow: "slide-in-right"
148
				}
149
			});
150
		})
151
		/*我的关注*/
152
		mui(".goFollow")[iflogin].addEventListener('tap', function() {
153
			if(userId && userId != "null" && userId != null){
154
				mui.openWindow({
155
					url: '../html/attentedList.html',
156
					id: '../html/attentedList.html',
157
					show: {
158
						autoShow: false,
159
						aniShow: "slide-in-right"
160
					}
161
				});
162
			}else{
163
				goLoginFun();
164
			}
165
		})
110 166

111
	
167
		/*我的修改专家*/
168
		infobasic.addEventListener('tap', function() {
169
			if(userId && userId != "null" && userId != null){
170
				mui.openWindow({
171
					url: '../html/userInforUpdate.html',
172
					id: 'userInforUpdate.html',
173
					show: {
174
						autoShow: false,
175
						aniShow: "slide-in-left"
176
					}
177
				});
178
			}else{
179
				goLoginFun();
180
			}
181
		})
182

183
		/*我的历史和评价*/
184
		document.getElementById("goZixun").addEventListener('tap', function() {
185
			if(userId && userId != "null" && userId != null){
186
				mui.openWindow({
187
					url: '../html/coophistory.html',
188
					id: 'html/coophistory.html',
189
					show: {
190
						autoShow: false,
191
						aniShow: "slide-in-left"
192
					},
193
				});
194
			}else{
195
				goLoginFun();
196
			}
197
		})
198

199
		/*邀请好友*/
200
		document.getElementById("goNewuser").addEventListener("tap", function() {
201
			if(userId && userId != "null" && userId != null){
202
				mui.openWindow({
203
					url: '../html/inviteFriends.html',
204
					id: 'inviteFriends.html',
205
					show: {
206
						autoShow: false,
207
						aniShow: "slide-in-left"
208
					},
209
					extras: {
210
						proName: professorName
211
					}
212
				});
213
			}else{
214
				goLoginFun();
215
			}
216
		})
217

218
		/*我的积分*/
219
		myIntegral.addEventListener('tap', function() {
220
			if(userId && userId != "null" && userId != null){
221
				mui.openWindow({
222
					url: '../html/rewards-list.html',
223
					id: 'html/rewards-list.html',
224
					show: {
225
						autoShow: false,
226
						aniShow: "slide-in-left"
227
					},
228
					extras: {
229
						score: scorePercent
230
					}
231
				});
232
			}else{
233
				goLoginFun();
234
			}
235
		})
112 236

113 237
		function loginStatus() {
114
			//alert(userId);
115 238
			if(userId && userId != "null" && userId != null) {
239
				iflogin=1;
116 240
				loginYes.classList.remove("displayNone");
117 241
				loginNo.classList.add("displayNone");
118
				/*设置*/
119
				goSetup.addEventListener('tap', function() {
120
					mui.openWindow({
121
						url: '../html/setup.html',
122
						id: '../html/setup.html',
123
						show: {
124
							//autoShow: false,
125
							aniShow: "slide-in-right"
126
						}
127
					});
128
				})
129
				/*我的需求*/
130
				gonXuqiu.addEventListener('tap', function() {
131
					mui.openWindow({
132
						url: '../html/needList.html',
133
						id: '../html/needList.html',
134
						show: {
135
							autoShow: false,
136
							aniShow: "slide-in-right"
137
						}
138
					});
139
				})
140
				/*我的关注*/
141
				goFollow.addEventListener('tap', function() {
142
					mui.openWindow({
143
						url: '../html/attentedList.html',
144
						id: '../html/attentedList.html',
145
						show: {
146
							autoShow: false,
147
							aniShow: "slide-in-right"
148
						}
149
					});
150
				})
151
				
152
				/*我的修改专家*/
153
				infobasic.addEventListener('tap', function() {
154
							mui.openWindow({
155
								url: '../html/userInforUpdate.html',
156
								id: 'userInforUpdate.html',
157
								show: {
158
									autoShow: false,
159
									aniShow: "slide-in-left"
160
								}
161
							});
162
					})
163
				
164
					/*我的历史和评价*/
165
					goZixun.addEventListener('tap', function() {
166
						mui.openWindow({
167
							url: '../html/coophistory.html',
168
							id: 'html/coophistory.html',
169
							show: {
170
								autoShow: false,
171
								aniShow: "slide-in-left"
172
							},
173
						});
174
					})
175
					
176
					/*邀请好友*/
177
					document.getElementById("goNewuser").addEventListener("tap", function() {
178
						mui.openWindow({
179
							url: '../html/inviteFriends.html',
180
							id: 'inviteFriends.html',
181
							show: {
182
								autoShow: false,
183
								aniShow: "slide-in-left"
184
							},
185
							extras: {
186
								proName: professorName
187
							}
188
						});
189
					})
190
					
191
					/*我的积分*/
192
					myIntegral.addEventListener('tap', function() {
193
						mui.openWindow({
194
							url: '../html/rewards-list.html',
195
							id: 'html/rewards-list.html',
196
							show: {
197
								autoShow: false,
198
								aniShow: "slide-in-left"
199
							},
200
							extras: {
201
								score: scorePercent
202
							}
203
						});
204
					})
205

206 242
			} else {
243
				iflogin=0;
207 244
				loginNo.classList.remove("displayNone");
208 245
				loginYes.classList.add("displayNone");
209
				mui("#loginNo").on("tap", "li", function() {
210
					goLoginFun();
211
				})
212 246
			}
213 247
		}
214 248

215
		
216

217
		
218
	
219
		
220 249
	});
221 250

222 251
});
252

223 253
function userInformation() {
224
			mui.plusReady(function(){
225
			mui.ajax(baseUrl + "/ajax/professor/baseInfo/" + plus.storage.getItem('userid'), {
226
				dataType: 'json', //数据格式类型
227
				type: 'GET', //http请求类型
228
				timeout: 10000, //超时设置
229
				//async: false,
230
				success: function(data) {
231
					if(data.success && data.data) {
232
						var $info = data.data || {};
233
						professorName = $info.name;
234
						scorePercent = $info.scorePercent;
235
						document.getElementById("userName").innerText = $info.name;
236
						document.getElementById("orgName").innerText = $info.orgName || "";
237
						if($info.hasHeadImage == 1) {
238
							var mun = Math.round(Math.random() * 99 + 1);
239
							userImg.setAttribute("src", baseUrl + "/images/head/" + $info.id + "_l.jpg?" + mun);
240
						} else {
241
							userImg.setAttribute("src", baseUrl + "/images/default-photo.jpg");
242
						}
243
						var userType = autho($info.authType, $info.orgAuth, $info.authStatus);
244
						document.getElementById("authicon").classList.add(userType.sty);
245
                        if($info.authType==1){
246
                        	goZixun.classList.remove("displayNone");
247
                        	document.getElementById("setItem").classList.add("itemThree");
248
                        }
249
					}
250
				},
251
				error: function() {
252
					plus.nativeUI.toast("服务器链接超时", toastStyle);
253
					return;
254
				}
255
			});
256
			})
257
		}
258
function signFun(){
259
			mui.plusReady(function(){
260
			mui.ajax(baseUrl + "/ajax/growth/isSignIn", {
261
				dataType: 'json', //数据格式类型
262
				type: 'GET', //http请求类型
263
				timeout: 10000, //超时设置
264
				data:{"professorId":plus.storage.getItem('userid')},
265
				//async: false,
266
				success: function(data) {
267
					console.log(JSON.stringify(data))
268
					if(data.success) {
269
						if(data.data){
270
							nosign.classList.remove("displayNone");
271
						}else{
272
							yessign.classList.remove("displayNone");
273
						}
254
	mui.plusReady(function() {
255
		mui.ajax(baseUrl + "/ajax/professor/baseInfo/" + plus.storage.getItem('userid'), {
256
			dataType: 'json', //数据格式类型
257
			type: 'GET', //http请求类型
258
			timeout: 10000, //超时设置
259
			//async: false,
260
			success: function(data) {
261
				if(data.success && data.data) {
262
					var $info = data.data || {ar $info = data.data || {};
263
					document.getElementById("noExpert").classList.remove("displayNone");
264
					document.getElementById("isExpert").classList.add("displayNone");
265
					professorName = $info.name;
266
					scorePercent = $info.scorePercent;
267
					document.getElementById("userName").innerText = $info.name;
268
					document.getElementById("orgName").innerText = $info.orgName || "";
269
					if($info.hasHeadImage == 1) {
270
						var mun = Math.round(Math.random() * 99 + 1);
271
						userImg.setAttribute("src", baseUrl + "/images/head/" + $info.id + "_l.jpg?" + mun);
272
					} else {
273
						userImg.setAttribute("src", baseUrl + "/images/default-photo.jpg");
274 274
					}
275
				},
276
				error: function() {
277
					plus.nativeUI.toast("服务器链接超时", toastStyle);
278
					return;
275
					var userType = autho($info.authType, $info.orgAuth, $info.authStatus);
276
					document.getElementById("authicon").classList.add(userType.sty);
277
					if($info.authType == 1) {
278
						document.getElementById("noExpert").classList.add("displayNone");
279
						document.getElementById("isExpert").classList.remove("displayNone");
280
					} 
279 281
				}
280
			});
281
			})
282
		}
283
		
284
		function signyesFun(){
285
			mui.plusReady(function(){
286
			mui.ajax(baseUrl + "/ajax/growth/signIn", {
287
				dataType: 'json', //数据格式类型
288
				type: 'POST', //http请求类型
289
				timeout: 10000, //超时设置
290
				data:{"professorId":plus.storage.getItem('userid')},
291
				//async: false,
292
				success: function(data) {
293
					console.log(JSON.stringify(data))
294
					if(data.success && data.data) {
295
						nosign.classList.add("displayNone");
282
			},
283
			error: function() {
284
				plus.nativeUI.toast("服务器链接超时", toastStyle);
285
				return;
286
			}
287
		});
288
	})
289
}
290

291
function signFun() {
292
	mui.plusReady(function() {
293
		mui.ajax(baseUrl + "/ajax/growth/isSignIn", {
294
			dataType: 'json', //数据格式类型
295
			type: 'GET', //http请求类型
296
			timeout: 10000, //超时设置
297
			data: {
298
				"professorId": plus.storage.getItem('userid')
299
			},
300
			//async: false,
301
			success: function(data) {
302
				console.log(JSON.stringify(data))
303
				if(data.success) {
304
					if(data.data) {
305
						nosign.classList.remove("displayNone");
306
					} else {
296 307
						yessign.classList.remove("displayNone");
297
						mui.openWindow({
298
							url: '../html/mycard.html',
299
							id: 'mycard.html',
300
							show: {
301
								autoShow: false,
302
							},
303
							extras: {
304
								num: 1,
305
								todayScore: data.data.todayScore,
306
								lastDayScore: data.data.lastDayScore
307
							}
308
						});
309 308
					}
310
				},
311
				error: function() {
312
					plus.nativeUI.toast("服务器链接超时", toastStyle);
313
					return;
314 309
				}
315
			});
316
			})
317
		}
318
			/*专家认证*/
319
		function isexpert() {
320
			mui.plusReady(function(){
321
			var userId = plus.storage.getItem('userid');
322
			var expertAuth = document.getElementById("expertAuth");
323
			mui.ajax(baseUrl + "/ajax/professor/auth", {
324
				data: {
325
					"id": userId
326
				},
327
				dataType: 'json', //数据格式类型
328
				type: 'GET', //http请求类型
329
				timeout: 10000, //超时设置
330
				async: false,
331
				success: function(data) {
332
					console.log(JSON.stringify(data));
333
					var $info = data.data || {};
334
					if(data.success && data.data) {
335
						authStatusExpert = $info.authStatusExpert;
336
						authStatus = $info.authStatus;
337
						console.log(authStatusExpert)
338
						if(authStatusExpert == -1) {
339
							expertAuth.innerHTML = "认证失败";
340
						} else if(authStatusExpert == 0) {
341
							expertAuth.innerHTML = "未认证";
342
						} else if(authStatusExpert == 1) {
343
							expertAuth.innerHTML = "待认证";
344
						} else if(authStatusExpert == 2) {
345
							expertAuth.innerHTML = "认证中";
346
						} else if(authStatusExpert == 3) {
347
							expertAuth.innerHTML = "已认证";
310
			},
311
			error: function() {
312
				plus.nativeUI.toast("服务器链接超时", toastStyle);
313
				return;
314
			}
315
		});
316
	})
317
}
318

319
function signyesFun() {
320
	mui.plusReady(function() {
321
		mui.ajax(baseUrl + "/ajax/growth/signIn", {
322
			dataType: 'json', //数据格式类型
323
			type: 'POST', //http请求类型
324
			timeout: 10000, //超时设置
325
			data: {
326
				"professorId": plus.storage.getItem('userid')
327
			},
328
			//async: false,
329
			success: function(data) {
330
				console.log(JSON.stringify(data))
331
				if(data.success && data.data) {
332
					nosign.classList.add("displayNone");
333
					yessign.classList.remove("displayNone");
334
					mui.openWindow({
335
						url: '../html/mycard.html',
336
						id: 'mycard.html',
337
						show: {
338
							autoShow: false,
339
						},
340
						extras: {
341
							num: 1,
342
							todayScore: data.data.todayScore,
343
							lastDayScore: data.data.lastDayScore
348 344
						}
349
						goBecomeExpert.addEventListener('tap', function() {
350
							if(authStatus == 3){
351
								if(authStatusExpert == -1 || authStatusExpert == 0) {
352
									mui.openWindow({
353
										url: '../html/expert-authentication.html',
354
										id: 'expert-authentication.html',
355
										show: {
356
											autoShow: false,
357
											aniShow: "slide-in-right"
358
										}
359
									});
360
								}
361
							}else if(authStatus == -1 || authStatus == 0){
362
								if(authStatusExpert == -1 || authStatusExpert == 0) {
363
									mui.openWindow({
364
										url: '../html/realname-authentication2.html',
365
										id: 'realname-authentication2.html',
366
										show: {
367
											autoShow: false,
368
											aniShow: "slide-in-right"
369
										}
370
									});
371
								}
372
							}else if(authStatus == 1 || authStatus == 2){
373
								plus.nativeUI.toast("正在进行实名认证,请稍等片刻。", toastStyle);
374
							}
375
						})
345
					});
346
				}
347
			},
348
			error: function() {
349
				plus.nativeUI.toast("服务器链接超时", toastStyle);
350
				return;
351
			}
352
		});
353
	})
354
}
355
/*专家认证*/
356
function isexpert() {
357
	mui.plusReady(function() {
358
		var userId = plus.storage.getItem('userid');
359
		var expertAuth = document.getElementById("expertAuth");
360
		mui.ajax(baseUrl + "/ajax/professor/auth", {
361
			data: {
362
				"id": userId
363
			},
364
			dataType: 'json', //数据格式类型
365
			type: 'GET', //http请求类型
366
			timeout: 10000, //超时设置
367
			async: false,
368
			success: function(data) {
369
				console.log(JSON.stringify(data));
370
				var $info = data.data || {};
371
				if(data.success && data.data) {
372
					authStatusExpert = $info.authStatusExpert;
373
					authStatus = $info.authStatus;
374
					console.log(JSON.stringify(authStatusExpert))
375
					if(authStatusExpert == -1) {
376
						expertAuth.innerHTML = "认证失败";
377
					} else if(authStatusExpert == 0) {
378
						expertAuth.innerHTML = "未认证";
379
					} else if(authStatusExpert == 1) {
380
						expertAuth.innerHTML = "待认证";
381
					} else if(authStatusExpert == 2) {
382
						expertAuth.innerHTML = "认证中";
383
					} else if(authStatusExpert == 3) {
384
						expertAuth.innerHTML = "已认证";
376 385
					}
377
				},
378
				error: function() {
379
					plus.nativeUI.toast("服务器链接超时", toastStyle);
380
					return;
386
					goBecomeExpert.addEventListener('tap', function() {
387
						if(authStatus == 3) {
388
							if(authStatusExpert == -1 || authStatusExpert == 0) {
389
								mui.openWindow({
390
									url: '../html/expert-authentication.html',
391
									id: 'expert-authentication.html',
392
									show: {
393
										autoShow: false,
394
										aniShow: "slide-in-right"
395
									}
396
								});
397
							}
398
						} else if(authStatus == -1 || authStatus == 0) {
399
							if(authStatusExpert == -1 || authStatusExpert == 0) {
400
								mui.openWindow({
401
									url: '../html/realname-authentication2.html',
402
									id: 'realname-authentication2.html',
403
									show: {
404
										autoShow: false,
405
										aniShow: "slide-in-right"
406
									}
407
								});
408
							}
409
						} else if(authStatus == 1 || authStatus == 2) {
410
							plus.nativeUI.toast("正在进行实名认证,请稍等片刻。", toastStyle);
411
						}
412
					})
381 413
				}
382
			});
383
			})
384
		}
414
			},
415
			error: function() {
416
				plus.nativeUI.toast("服务器链接超时", toastStyle);
417
				return;
418
			}
419
		});
420
	})
421
}

+ 191 - 126
app/js/needList.js

@ -1,142 +1,207 @@
1
mui.ready(function() {
2
	mui.plusReady(function() {
3
		var userid = plus.storage.getItem('userid');
4
		var ws = plus.webview.currentWebview();
5
		var oUlist = document.getElementsByClassName("tableList")[0];
6
		window.addEventListener("newId", function(event) {
7
			demandList();
8
		})
9

10
		function demandHtml(data) {
11
			for(var i = 0; i < data.length; i++) {
12
				var oDemandStatus, oDemandType, oDemandAim, oCreateTime, stColor;
13
				(data[i].demandStatus == 1) ? (oDemandStatus = "发布中", stColor = "status-1") : (oDemandStatus = "已关闭", stColor = "status-5");
14
				(data[i].demandType == 1) ? oDemandType = "个人": oDemandType = "企业";
15
				(data[i].demandAim == 1) ? oDemandAim = "技术": (data[i].demandAim == 2) ? oDemandAim = "资源" : oDemandAim = "其他";
16
				oCreateTime = data[i].createTime.substr(0, 4) + "-" + data[i].createTime.substr(4, 2) + "-" + data[i].createTime.substr(6, 2) + " " + data[i].createTime.substr(8, 2) + ":" + data[i].createTime.substr(10, 2);
17
				var li = document.createElement('li');
18
				li.className = 'mui-table-view-cell mui-media';
19
				li.setAttribute("demandId", data[i].demandId);
20
				li.setAttribute("demandStatus", data[i].demandStatus);
21
				var oString = '<div class="coutopicbox"><span class="coutheme mui-ellipsis mui-pull-left">' + data[i].demandTitle + '</span>'
22
				oString += '<div class="coustatus mui-pull-right">'
23
				oString += '<span class="aimlabel">' + oDemandType + '</span>'
24
				oString += '<span class="aimlabel">' + oDemandAim + '</span>'
25
				oString += '<span class="' + stColor + '">' + oDemandStatus + '</span>'
26
				oString += '</div></div>'
27
				oString += '<a class="proinfor itemBtn">'
28
				oString += '<div class="mui-media-body">'
29
				oString += '<span class="listtit">'
30
				oString += '<span class="thistime" style="top:20px">' + oCreateTime + '</span>'
31
				oString += '</span>'
32
				oString += '<p class="listtit3 mui-ellipsis-2 rightChevron" style="width:90%;">' + data[i].demandContent + '</p></div></a>'
33
				li.innerHTML = oString;
34
				oUlist.appendChild(li);
1
	mui.init({
2
		pullRefresh: {
3
			container: '#pullrefresh',
4
			up: {
5
				height: 50,
6
				contentrefresh: '正在加载...',
7
				callback: pullupRefresh
8
			},
9
			down: {
10
				auto:true,
11
				callback: pulldownRefresh
35 12
			}
36 13
		}
37

38
		function demandList() {
39
			mui.ajax(baseUrl + '/ajax/demand/byDemander', {
14
	});
15
	var Num=1;
16
	function pullupRefresh() {
17
		setTimeout(function() {
18
			Num = ++Num;
19
			myDemandList(10,Num);
20
			mui('#pullrefresh').pullRefresh().endPullupToRefresh((Num>2));
21
		}, 1500);
22
	
23
	}
24
	function pulldownRefresh() {
25
		setTimeout(function() {
26
			myDemandList(10,1);
27
			mui('#pullrefresh').pullRefresh().endPulldownToRefresh();
28
		}, 1500);
29
	}
30
	
31
	mui.plusReady(function() {
32
		mui("#myneedList").on("tap", "li>.madiaInfo", function() {
33
			var oDemandId = this.getAttribute("data-id");
34
			plus.nativeUI.showWaiting();
35
			plus.webview.create("../html/needShow.html", 'needShow.html', {}, {
36
				demanid: oDemandId
37
			});
38
		})
39
	})
40
	function myDemandList(pageSize, pageNo) {
41
		mui.plusReady(function() {
42
			mui.ajax(baseUrl + '/ajax/demand/pq', {
40 43
				dataType: 'json', //数据格式类型
41 44
				type: 'GET', //http请求类型
42 45
				timeout: 10000, //超时设置
43 46
				data: {
44
					"demander": userid
47
					"uid": plus.storage.getItem('userid'),
48
					"pageNo": pageNo,
49
					"pageSize": pageSize
45 50
				},
46 51
				success: function(data) {
47 52
					if(data.success) {
48
						console.log(JSON.stringify(data));
49
						oUlist.innerHTML = "";
50
						demandHtml(data.data);
51
						plus.nativeUI.closeWaiting();; //新webview的载入完毕后关闭等待框
53
						var ws=plus.webview.getWebviewById("../html/needList.html");
54
						plus.nativeUI.closeWaiting();
52 55
						ws.show("slide-in-right", 150);
53
					}
54

55
				}
56
			});
57
		}
58
		demandList();
59
		/*查询单个需求*/
60
		mui('.tableList').on('tap', 'li', function(e) {
61
			var oDemandId = this.getAttribute('demandId');
62
			var demandStatus = this.getAttribute('demandStatus');
63
			mui.openWindow({
64
				url: '../html/needShow.html',
65
				id: '../html/needShow.html',
66
				show: {
67
					autoShow: false,
68
					aniShow: "slide-in-right"
69
				},
70
				extras: {
71
					demanid: oDemandId,
72
					demandStatus1: demandStatus
73
				}
74

75
			});
76
		});
77
		/*发布新需求*/
78
		document.getElementById("btnLinkBox").addEventListener("tap", function() {
79
			mui.ajax(baseUrl + "/ajax/professor/auth", {
80
		dataType: 'json', //数据格式类型
81
		type: 'GET', //http请求类型
82
		timeout: 10000, //超时设置
83
		data: {
84
			"id": userid
85
		},
86
		success: function(data) {
87
			if(data.success) {
88
				var $data = data.data;
89
				if($data.authStatus == 3) {
90
					var oDa = {};
91
					oDa.flag = ($data.orgAuth == 0) ? 1 : 0;
92
					mui.openWindow({
93
						url: '../html/needIssue.html',
94
						id: '../html/needIssue.html',
95
						show: {
96
							autoShow: false,
97
							aniShow: "slide-in-right",
98
						},
99
						extras: oDa
100
					});
101
				} else {
102
					if($data.orgAuth == 1) {
103
						mui.openWindow({
104
							url: '../html/needIssue.html',
105
							id: '../html/needIssue.html',
106
							show: {
107
								autoShow: false,
108
								aniShow: "slide-in-right",
56
						if(pageNo == 1){
57
							document.getElementById("myneedList").innerHTML="";
58
						}
59
						if(pageNo!=data.data.pageNo) {
60
							data.data.data=[];
61
						}
62
						var $info = data.data.data;
63
						console.log(JSON.stringify(data))
64
						if($info.length > 0){
65
							for(var i = 0; i < $info.length; i++) {
66
								var liStr=document.createElement("li");
67
								liStr.className="mui-table-view-cell flexCenter";
68
								document.getElementById("myneedList").appendChild(liStr);
69
								demandHtml($info[i],liStr);
109 70
							}
110
						});
111
					} else {
112
						if($data.authStatus == 2) {
113
							plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
114
								'verticalAlign': 'center'
115
							});
116
						} else if($data.authStatus == 1) {
117
							plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
118
								'verticalAlign': 'center'
119
							});
120
						} else if($data.authStatus <= 0) {
121
							mui.openWindow({
122
								url: '../html/realname-authentication.html',
123
								id: 'realname-authentication.html',
124
								show: {
125
									autoShow: false,
126
									aniShow: "slide-in-right",
127
								}
128
							});
71
						}
72
						if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
73
							mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
74
						} else {
75
							mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
129 76
						}
130 77
					}
78
				},
79
				error: function() {
80
					plus.nativeUI.toast("服务器链接超时", toastStyle);
81
					mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
82
					return;
131 83
				}
132
			}
133
		},
134
		error: function() {
135
			plus.nativeUI.toast("服务器链接超时", toastStyle);
136
			return;
137
		}
138
	});
84
			});
139 85
		})
86
	}
87
	function demandHtml($data,liStr) {
88
		var statusU="";
89
		var dateGap = delayDay($data.invalidDay);
90
		if($data.state==1 && dateGap=="1"){
91
			statusU='<span class="draftLable">即将于 '+TimeTr($data.invalidDay)+' 过期</span>'
92
		}
93
		if($data.state==0){
94
			statusU='<span class="draftLable">已于 '+TimeTr($data.invalidDay)+' 过期</span>'
95
		}else if($data.state==2){
96
			statusU='<span class="overLable">已于 '+TimeTr($data.modifyTime)+' 完成</span>'
97
		}else if($data.state==3){
98
			statusU='<span>已于 '+TimeTr($data.modifyTime)+' 关闭</span>'
99
		}
100
		var strCon='';
101
			strCon+='<div class="madiaInfo" data-id="'+$data.id+'">'
102
			strCon+='<p class="h1Font mui-ellipsis-2">'+ $data.title +'</p>'
103
			strCon+='<div class="showli mui-ellipsis">'
104
			strCon+='<span>发布于 '+TimeTr($data.createTime)+'</span>'
105
			strCon+= statusU
106
			strCon+='</div>'
107
		liStr.innerHTML=strCon;
108
	}
109
	function delayDay(startTime){
110
		var dateToday = new Date();
111
		var dateInvalid = new Date();
112
		dateInvalid.setFullYear(parseInt(startTime.substring(0, 4)));
113
		dateInvalid.setMonth(parseInt(startTime.substring(4, 6)) - 1);
114
		dateInvalid.setDate(parseInt(startTime.substring(6, 8)));
115
		
116
		var dateGap = Math.abs(dateToday.getTime() - dateInvalid.getTime());
117
		var ifDelay="0";
118
		if(dateGap < 604800000){
119
			ifDelay="1";
120
		}
121
		return ifDelay;
122
	}
140 123

141
	});
142
})
124
		/*查询单个需求*/
125
//		mui('.tableList').on('tap', 'li', function(e) {
126
//			var oDemandId = this.getAttribute('demandId');
127
//			var demandStatus = this.getAttribute('demandStatus');
128
//			mui.openWindow({
129
//				url: '../html/needShow.html',
130
//				id: '../html/needShow.html',
131
//				show: {
132
//					autoShow: false,
133
//					aniShow: "slide-in-right"
134
//				},
135
//				extras: {
136
//					demanid: oDemandId,
137
//					demandStatus1: demandStatus
138
//				}
139
//
140
//			});
141
//		});
142
		/*发布新需求*/
143
//		document.getElementById("btnLinkBox").addEventListener("tap", function() {
144
//			mui.ajax(baseUrl + "/ajax/professor/auth", {
145
//		dataType: 'json', //数据格式类型
146
//		type: 'GET', //http请求类型
147
//		timeout: 10000, //超时设置
148
//		data: {
149
//			"id": userid
150
//		},
151
//		success: function(data) {
152
//			if(data.success) {
153
//				var $data = data.data;
154
//				if($data.authStatus == 3) {
155
//					var oDa = {};
156
//					oDa.flag = ($data.orgAuth == 0) ? 1 : 0;
157
//					mui.openWindow({
158
//						url: '../html/needIssue.html',
159
//						id: '../html/needIssue.html',
160
//						show: {
161
//							autoShow: false,
162
//							aniShow: "slide-in-right",
163
//						},
164
//						extras: oDa
165
//					});
166
//				} else {
167
//					if($data.orgAuth == 1) {
168
//						mui.openWindow({
169
//							url: '../html/needIssue.html',
170
//							id: '../html/needIssue.html',
171
//							show: {
172
//								autoShow: false,
173
//								aniShow: "slide-in-right",
174
//							}
175
//						});
176
//					} else {
177
//						if($data.authStatus == 2) {
178
//							plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
179
//								'verticalAlign': 'center'
180
//							});
181
//						} else if($data.authStatus == 1) {
182
//							plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
183
//								'verticalAlign': 'center'
184
//							});
185
//						} else if($data.authStatus <= 0) {
186
//							mui.openWindow({
187
//								url: '../html/realname-authentication.html',
188
//								id: 'realname-authentication.html',
189
//								show: {
190
//									autoShow: false,
191
//									aniShow: "slide-in-right",
192
//								}
193
//							});
194
//						}
195
//					}
196
//				}
197
//			}
198
//		},
199
//		error: function() {
200
//			plus.nativeUI.toast("服务器链接超时", toastStyle);
201
//			return;
202
//		}
203
//	});
204
//		})
205
//
206
//	});
207
//})

+ 158 - 269
app/js/needSearch.js

@ -1,308 +1,197 @@
1
var orderKey, subject = "",
2
	industry = "",
3
	demandAim = "",
4
	sortType = "";
5 1
mui.init({
6 2
	pullRefresh: {
7
		container: '#pullrefresht',
3
		container: '#pullrefresh',
8 4
		up: {
9 5
			height: 50,
10 6
			contentrefresh: '正在加载...',
11 7
			callback: pullupRefresh
8
		},
9
		down: {
10
			auto:true,
11
			callback: pulldownRefresh
12 12
		}
13 13
	}
14 14
});
15

15
var Num=1;
16 16
function pullupRefresh() {
17 17
	setTimeout(function() {
18
		personalMessage(orderKey)
18
		Num = ++Num;
19
		demandList(5,Num);
20
		mui('#pullrefresh').pullRefresh().endPullupToRefresh((Num>2));
19 21
	}, 1000);
22

23
}
24
function pulldownRefresh() {
25
	setTimeout(function() {
26
		demandList(5,1);
27
		mui('#pullrefresh').pullRefresh().endPulldownToRefresh();
28
	}, 1500);
20 29
}
21 30
mui.plusReady(function() {
22
	var userid = plus.storage.getItem('userid');
23
	var industryid = document.getElementById("headck2");
24
	var subjectid = document.getElementById("headck3");
25
	personalMessage();
26
	/*需求目的*/
27
	mui("#middlePopover1").on('tap', '.mui-navigate-right', function(e) {
28
		plus.nativeUI.showWaiting(); //显示等待框
29
		if(this.innerHTML == "不限") {
30
			document.getElementById("headck1").innerHTML = "需求目的"
31
		} else {
32
			document.getElementById("headck1").innerHTML = this.innerHTML;
33
		}
34
		document.querySelector('.mui-backdrop').style.display = 'none';
35
		document.getElementById("middlePopover1").style.display = 'none';
36
		//去掉样式类mui-active,要不然会多点击一次
37
		document.getElementById("middlePopover1").classList.remove('mui-active');
38
		if(this.innerText == "技术咨询") {
39
			demandAim = 1;
40
		} else if(this.innerText == "资源咨询") {
41
			demandAim = 2;
42
		} else if(this.innerText == "其他事务") {
43
			demandAim = 3;
44
		} else {
45
			demandAim = "";
46
		}
47

48
		mui('#pullrefresht').pullRefresh().refresh(true);
49
		personalMessage(0);
50
		plus.nativeUI.closeWaiting(); //关闭等待框
51
	});
52
	/*时间排序*/
53
	mui("#middlePopover4").on('tap', '.mui-navigate-right', function(e) {
54
		plus.nativeUI.showWaiting(); //显示等待框
55
		document.getElementById("headck4").innerHTML = this.innerHTML;
56
		document.querySelector('.mui-backdrop').style.display = 'none';
57
		document.getElementById("middlePopover4").style.display = 'none';
58
		//去掉样式类mui-active,要不然会多点击一次
59
		document.getElementById("middlePopover4").classList.remove('mui-active');
60
		if(this.innerText == "按最新发布时间排序") {
61
			sortType = 0;
62
		} else if(this.innerText == "按最早发布时间排序") {
63
			sortType = 1;
64
		}
65
		mui('#pullrefresht').pullRefresh().refresh(true);
66
		personalMessage(0);
67
		plus.nativeUI.closeWaiting(); //关闭等待框
68
	});
69
	/*热门行业*/
70
	mui(".yyhy").on('tap', 'a', function() {
71
		industry = this.innerText;
72
		industryid.innerText = industry;
73
		document.querySelector('#yyhy li a.active').classList.remove('active');
74
		this.classList.add("active");
75
		if(industry == "不限") {
76
			industry = "";
77
			industryid.innerText = "热门行业";
78
		}
31
	mui("#demandList").on("tap", "li>.madiaInfo", function() {
32
		var oDemandId = this.getAttribute("data-id");
79 33
		plus.nativeUI.showWaiting();
80
		mui('.mui-popover').popover('hide');
81
		mui('#pullrefresht').pullRefresh().refresh(true);
82
		console.log(industry);
83
		personalMessage(0);
84
	});
85
	/*热门领域*/
86
	mui(".xsly").on('tap', 'a', function() {
87
		subject = this.innerText;
88
		subjectid.innerText = subject;
89
		document.querySelector('#xsly li a.active').classList.remove('active');
90
		this.classList.add("active");
91
		if(subject == "不限") {
92
			subject = "";
93
			subjectid.innerText = "热门领域";
94
		}
95
		plus.nativeUI.showWaiting();
96
		mui('.mui-popover').popover('hide');
97
		mui('#pullrefresht').pullRefresh().refresh(true);
98
		personalMessage(0);
99
	});
100
	/*进入needSure.html*/
101
	mui(".tableList").on('tap', 'li', function() {
102
		var oDemandId = this.getAttribute("demandId");
103
		mui.openWindow({
104
			url: '../html/needSure.html',
105
			id: '../html/needSure.html',
106
			show: {
107
				autoShow: false,
108
				aniShow: "slide-in-right",
109
			},
110
			extras: {
111
					deman:oDemandId
112
			},
34
		plus.webview.create("../html/needShow.html", 'needShow.html', {}, {
35
			demanid: oDemandId
113 36
		});
114
	});
115
});
37
	})
38
})
116 39

117
function personalMessage(a) {
118 40

41
/*需求列表*/
42
function demandList(pageSize, pageNo) {
119 43
	mui.plusReady(function() {
120
		var ws = plus.webview.currentWebview();
121
		var c = new Object();
122
		c.sortType = sortType;
123
		c.demandAim = demandAim;
124
		c.industry = industry;
125
		c.rows = 10;
126
		if(a) {
127
			c.orderKey = a
128
		}
129
		mui.ajax(baseUrl + "/ajax/demand/ql", {
130
			dataType: 'json', //数据格式类型
131
			type: 'GET', //http请求类型
132
			timeout: 10000, //超时设置
133
			data: c,
44
		mui.ajax(baseUrl+"/ajax/demand/search",{
45
			type: "GET",
46
			timeout: 10000,
47
			dataType: "json",
48
			traditional:true,
49
			data: {
50
				"state":"1",
51
				"pageNo": pageNo,
52
				"pageSize":pageSize
53
			},
134 54
			success: function(data) {
135 55
				if(data.success) {
136
					console.log(JSON.stringify(data));
56
					var ws=plus.webview.getWebviewById("../html/needSearch.html");
137 57
					plus.nativeUI.closeWaiting();
138 58
					ws.show("slide-in-right", 150);
139
					if(!a) {
140
						document.getElementsByClassName("tableList")[0].innerHTML = ""
59
					if(pageNo==1){
60
						document.getElementById("demandList").innerHTML="";
141 61
					}
142
					if(data.data.length == 0) {
143
						mui('#pullrefresht').pullRefresh().disablePullupToRefresh(true);
144
						return;
62
					if(pageNo!=data.data.pageNo) {
63
						data.data.data=[];
145 64
					}
146

147
					var datalist = data.data;
148
					datalistEach(datalist);
149
					orderKey = data.data[data.data.length - 1].orderKey;
150
					if(data.data.length == 10) {
151
						mui('#pullrefresht').pullRefresh().endPullupToRefresh(false); /*能上拉*/
65
					var $info = data.data.data;
66
					console.log(JSON.stringify(data))
67
					if($info.length > 0){
68
						for(var i = 0; i < $info.length; i++) {
69
							var liStr=document.createElement("li");
70
							liStr.className="mui-table-view-cell";
71
							document.getElementById("demandList").appendChild(liStr);
72
							demandHtml($info[i],liStr);
73
						}
74
					}
75
					if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
76
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
152 77
					} else {
153
						mui('#pullrefresht').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
78
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
154 79
					}
155 80
				}
156 81
			},
157 82
			error: function() {
158 83
				plus.nativeUI.toast("服务器链接超时", toastStyle);
159
				mui('#pullrefresht').pullRefresh().endPullupToRefresh(true);
84
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
160 85
				return;
161 86
			}
162
		});
87
		})
163 88
	})
164 89
}
165

166
function datalistEach(datalist) {
167
	mui.each(datalist, function(index, ite) {
168
		item = ite.professor;
169
		/*获取头像*/
170
		if(item.hasHeadImage == 1) {
171
			var img = baseUrl + "/images/head/" + item.id + "_l.jpg";
172
		} else {
173
			var img = "../images/default-photo.jpg";
174
		}
175

176
		var title = "";
177
		var office = "";
178
		var orgName = "";
179
		var address = "";
180
		if(item.title && item.office && item.orgName && item.address) {
181
			title = item.title + ",";
182
			office = item.office + ",";
183
			orgName = item.orgName + " | ";
184
			address = item.address;
185
		} else if(!item.title && item.office && item.orgName && item.address) {
186
			office = item.office + ",";
187
			orgName = item.orgName + " | ";
188
			address = item.address;
189
		} else if(item.title && !item.office && item.orgName && item.address) {
190
			title = item.title + ",";
191
			orgName = item.orgName + " | ";
192
			address = item.address;
193
		} else if(item.title && item.office && !item.orgName && item.address) {
194
			title = item.title + ",";
195
			office = item.office + " | ";
196
			address = item.address;
197
		} else if(item.title && item.office && item.orgName && !item.address) {
198
			title = item.title + ",";
199
			office = item.office + ",";
200
			orgName = item.orgName;
201
		} else if(!item.title && !item.office && item.orgName && item.address) {
202
			orgName = item.orgName + " | ";
203
			address = item.address;
204
		} else if(!item.title && item.office && !item.orgName && item.address) {
205
			office = item.office + " | ";
206
			address = item.address;
207
		} else if(!item.title && item.office && item.orgName && !item.address) {
208
			office = item.office + ",";
209
			orgName = item.orgName;
210
		} else if(item.title && !item.office && !item.orgName && item.address) {
211
			title = item.title + " | ";
212
			address = item.address;
213
		} else if(item.title && !item.office && item.orgName && !item.address) {
214
			office = item.title + ",";
215
			address = item.orgName;
216
		} else if(item.title && item.office && !item.orgName && !item.address) {
217
			title = item.title + ",";
218
			office = item.office;
219
		} else if(!item.title && !item.office && !item.orgName && item.address) {
220
			address = item.address;
221
		} else if(!item.title && !item.office && item.orgName && !item.address) {
222
			orgName = item.orgName;
223
		} else if(!item.title && item.office && !item.orgName && !item.address) {
224
			office = item.office;
225
		} else if(item.title && !item.office && !item.orgName && !item.address) {
226
			title = item.title;
227
		}
228
		var typeTname = '';
229
		var oSty = autho(item.authType, item.orgAuth, item.authStatus);
230
		typeTname='<em class="authicon ' + oSty.sty + '"></em>'
90
function demandHtml($data,liStr) {
91
	var strCon='';
92
		strCon+='<div class="madiaInfo" data-id="'+$data.id+'">'
93
		strCon+='<p class="h1Font mui-ellipsis-2">'+ $data.title +'</p>'
94
		strCon+='<p class="h2Font mui-ellipsis-5">'+ $data.descp +'</p>'
95
		strCon+='<div class="showli mui-ellipsis">'
231 96
		
232
		var li = document.createElement('li');
233
		li.className = 'mui-table-view-cell mui-media';
234
		li.setAttribute("demandId", ite.demandId);
235
		var oCreateTime = ite.createTime.substr(0, 4) + "-" + ite.createTime.substr(4, 2) + "-" + ite.createTime.substr(6, 2) + " " + ite.createTime.substr(8, 2) + ":" + ite.createTime.substr(10, 2);
236
		var odemand, odemandAim;
237
		(ite.demandType == 1) ? odemand = "个人": odemand = "企业";
238
		(ite.demandAim == 1) ? odemandAim = "技术": (ite.demandAim == 2) ? odemandAim = "资源" : odemandAim = "其他";
239
		var oString = '<div class="coutopicbox"><span class="coutheme mui-ellipsis mui-pull-left">' + ite.demandTitle + '</span>'
240
		oString += '<div class="coustatus mui-pull-right">'
241
		oString += '<span class="aimlabel">' + odemand + '</span>'
242
		oString += '<span class="aimlabel">' + odemandAim + '</span></div></div>'
243
		oString += '<a class="proinfor itemBtn">' <!-- displayNone-->
244
		oString += '<img class="mui-media-object mui-pull-left headimg headRadius" src="' + img + '">'
245
		oString += '<div class="mui-media-body">'
246
		oString += '<p class="listtit">' + item.name + ' ' + typeTname + ''
247
		oString += '<span class="thistime">' + oCreateTime + '</span></p>'
248
		oString += '<p class="listtit2">'
249
		oString += '<span>' + title + '</span><span>' + office + '</span><span>' + orgName + '</span><span>' + address + '</span></p>'
250
		oString += '<p class="listtit3 mui-ellipsis">' + ite.demandContent + '</p></div></a>'
251
		li.innerHTML = oString;
252
		document.getElementsByClassName("tableList")[0].appendChild(li);
253

254
	});
97
		if($data.city){ strCon+='<span>'+$data.city+'</span>' }
98
		if($data.duration!=0){ strCon+='<span>预期:'+demandDuration[$data.duration]+'</span>' }
99
		if($data.cost!=0){ strCon+='<span>预算:'+demandCost[$data.cost]+'</span>' }
100
		if($data.invalidDay){ strCon+='<span>有效期至:'+TimeTr($data.invalidDay)+'</span>' }
101
		
102
		strCon+='</div></div>'
103
	liStr.innerHTML=strCon;
255 104
}
256 105

257
mui.plusReady(function() {
258
	//应用行业
259
	var yyhy = document.getElementById("yyhy");
260
	var xsly = document.getElementById("xsly");
261
	mui.ajax(baseUrl + '/ajax/dataDict/qaDictCode', {
262
		data: {
263
			"dictCode": "INDUSTRY"
264
		},
265
		dataType: 'json', //数据格式类型
266
		type: 'GET', //http请求类型
267
		timeout: 10000,
268
		success: function(data) {
269
			var finallist = '<li class="mui-table-view-cell mui-col-xs-5"><a class="active">不限</a></li>';
270
			//			console.log(data.success)
271
			//			console.log(JSON.stringify(data.data))
272
			if(data.success && data.data != "") {
273
				mui.each(data.data, function(i, n) {
274
					finallist += '<li class="mui-table-view-cell mui-col-xs-5"><a >' + n.caption + '</a></li>';
275
				});
276
				yyhy.innerHTML = finallist;
277
			}
278

279
		},
280
		error: function() {
281
			plus.nativeUI.toast("服务器链接超时", toastStyle);
282
		}
283
	});
284
	//学术领域
285
	mui.ajax(baseUrl + '/ajax/dataDict/qaDictCode', {
286
		data: {
287
			"dictCode": "SUBJECT"
288
		},
289
		dataType: 'json', //数据格式类型
290
		type: 'GET', //http请求类型
291
		timeout: 10000,
292
		success: function(data) {
293
			var finallist = '<li class="mui-table-view-cell mui-col-xs-5"><a class="active" >不限</a></li>';
294
			//console.log(data.success)
295
			//console.log(JSON.stringify(data.data))
296
			if(data.success && data.data != "") {
297
				mui.each(data.data, function(i, n) {
298
					finallist += '<li class="mui-table-view-cell mui-col-xs-5"><a >' + n.caption + '</a></li>';
299
				});
300
				xsly.innerHTML = finallist;
301
			}
302
		},
303
		error: function() {
304
			plus.nativeUI.toast("服务器链接超时", toastStyle);
305
		}
306
	});
106
//
107
//function datalistEach(datalist) {
108
//	mui.each(datalist, function(index, ite) {
109
//		item = ite.professor;
110
//		/*获取头像*/
111
//		if(item.hasHeadImage == 1) {
112
//			var img = baseUrl + "/images/head/" + item.id + "_l.jpg";
113
//		} else {
114
//			var img = "../images/default-photo.jpg";
115
//		}
116
//
117
//		var title = "";
118
//		var office = "";
119
//		var orgName = "";
120
//		var address = "";
121
//		if(item.title && item.office && item.orgName && item.address) {
122
//			title = item.title + ",";
123
//			office = item.office + ",";
124
//			orgName = item.orgName + " | ";
125
//			address = item.address;
126
//		} else if(!item.title && item.office && item.orgName && item.address) {
127
//			office = item.office + "";
128
//			orgName = item.orgName + " | ";
129
//			address = item.address;
130
//		} else if(item.title && !item.office && item.orgName && item.address) {
131
//			title = item.title + ",";
132
//			orgName = item.orgName + " | ";
133
//			address = item.address;
134
//		} else if(item.title && item.office && !item.orgName && item.address) {
135
//			title = item.title + ",";
136
//			office = item.office + " | ";
137
//			address = item.address;
138
//		} else if(item.title && item.office && item.orgName && !item.address) {
139
//			title = item.title + ",";
140
//			office = item.office + ",";
141
//			orgName = item.orgName;
142
//		} else if(!item.title && !item.office && item.orgName && item.address) {
143
//			orgName = item.orgName + " | ";
144
//			address = item.address;
145
//		} else if(!item.title && item.office && !item.orgName && item.address) {
146
//			office = item.office + " | ";
147
//			address = item.address;
148
//		} else if(!item.title && item.office && item.orgName && !item.address) {
149
//			office = item.office + ",";
150
//			orgName = item.orgName;
151
//		} else if(item.title && !item.office && !item.orgName && item.address) {
152
//			title = item.title + " | ";
153
//			address = item.address;
154
//		} else if(item.title && !item.office && item.orgName && !item.address) {
155
//			office = item.title + ",";
156
//			address = item.orgName;
157
//		} else if(item.title && item.office && !item.orgName && !item.address) {
158
//			title = item.title + ",";
159
//			office = item.office;
160
//		} else if(!item.title && !item.office && !item.orgName && item.address) {
161
//			address = item.address;
162
//		} else if(!item.title && !item.office && item.orgName && !item.address) {
163
//			orgName = item.orgName;
164
//		} else if(!item.title && item.office && !item.orgName && !item.address) {
165
//			office = item.office;
166
//		} else if(item.title && !item.office && !item.orgName && !item.address) {
167
//			title = item.title;
168
//		}
169
//		var typeTname = '';
170
//		var oSty = autho(item.authType, item.orgAuth, item.authStatus);
171
//		typeTname='<em class="authicon ' + oSty.sty + '"></em>'
172
//		
173
//		var li = document.createElement('li');
174
//		li.className = 'mui-table-view-cell mui-media';
175
//		li.setAttribute("demandId", ite.demandId);
176
//		var oCreateTime = ite.createTime.substr(0, 4) + "-" + ite.createTime.substr(4, 2) + "-" + ite.createTime.substr(6, 2) + " " + ite.createTime.substr(8, 2) + ":" + ite.createTime.substr(10, 2);
177
//		var odemand, odemandAim;
178
//		(ite.demandType == 1) ? odemand = "个人": odemand = "企业";
179
//		(ite.demandAim == 1) ? odemandAim = "技术": (ite.demandAim == 2) ? odemandAim = "资源" : odemandAim = "其他";
180
//		var oString = '<div class="coutopicbox"><span class="coutheme mui-ellipsis mui-pull-left">' + ite.demandTitle + '</span>'
181
//		oString += '<div class="coustatus mui-pull-right">'
182
//		oString += '<span class="aimlabel">' + odemand + '</span>'
183
//		oString += '<span class="aimlabel">' + odemandAim + '</span></div></div>'
184
//		oString += '<a class="proinfor itemBtn">' <!-- displayNone-->
185
//		oString += '<img class="mui-media-object mui-pull-left headimg headRadius" src="' + img + '">'
186
//		oString += '<div class="mui-media-body">'
187
//		oString += '<p class="listtit">' + item.name + ' ' + typeTname + ''
188
//		oString += '<span class="thistime">' + oCreateTime + '</span></p>'
189
//		oString += '<p class="listtit2">'
190
//		oString += '<span>' + title + '</span><span>' + office + '</span><span>' + orgName + '</span><span>' + address + '</span></p>'
191
//		oString += '<p class="listtit3 mui-ellipsis">' + ite.demandContent + '</p></div></a>'
192
//		li.innerHTML = oString;
193
//		document.getElementsByClassName("tableList")[0].appendChild(li);
194
//
195
//	});
196
//}
307 197

308
})

+ 23 - 4
app/js/public/base.js

@ -1,8 +1,8 @@
1 1
//公共文件
2 2
mui.init();
3
var baseUrl = "http://www.ekexiu.com", 
3
//var baseUrl = "http://www.ekexiu.com", 
4 4
//var baseUrl = "http://192.168.3.233",
5
//var baseUrl = "http:192.168.3.233:81",    
5
var baseUrl = "http:192.168.3.233:81",    
6 6
	toastStyle = {
7 7
		'verticalAlign': 'top',
8 8
	}
@ -206,7 +206,10 @@ function TimeTr(dealtime) {
206 206
	if(s.length <= 6) {
207 207
		formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月";
208 208
	} else if(s.length > 6 && s.length <= 8) {
209
		formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 ";
209
		formatTime = m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 ";
210
		if(y != myDate.getFullYear()) {
211
			formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 ";
212
		}
210 213
	} else {
211 214
		formatTime = m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 " + h + ":" + minute;
212 215
		if(y != myDate.getFullYear()) {
@ -246,7 +249,23 @@ var eduDegree = {
246 249
	"4": "大专",
247 250
	"5": "其他"
248 251
}
249

252
//需求的费用预算
253
var demandCost = {
254
	'1': '1万元以内',
255
	'2': '1-5万元',
256
	'3': '5-10万元',
257
	'4': '10-20万元',
258
	'5': '20-50万元',
259
	'6': '50万元以上'
260
}
261
//需求的预期时长
262
var demandDuration = {
263
	'1': '1个月内',
264
	'2': '1-3个月',
265
	'3': '3-6个月',
266
	'4': '6-12个月',
267
	'5': '1年以上'
268
}
250 269
/*判断是否收藏资源文章或者是否关注专家*/
251 270
function ifcollectionAbout(watchObject,sel, num,flag) {
252 271
	var that=sel;