Selaa lähdekoodia

Merge branch 'dev' of http://121.42.53.174:3000/bulomakaka/ekexiu.app.git into dev

luyanan 7 vuotta sitten
vanhempi
commit
4c98485b51

+ 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;}

+ 82 - 0
app/html/demandModify.html

@ -0,0 +1,82 @@
1
<!doctype html>
2
<html>
3

4
	<head>
5
		<meta charset="UTF-8">
6
		<title>编辑教育背景</title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link href="../css/mui.min.css" rel="stylesheet" />
9
		<link href="../css/mui.picker.min.css" rel="stylesheet" />
10
		<link href="../css/app.css" rel="stylesheet" />
11
		<style>
12
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;}
13
			.mui-content{height:100%;overflow: auto;}
14
			.simulation{
15
				padding:2px;
16
				height:24px;
17
				overflow:hidden;
18
				width:100%;
19
				font-size:14px;
20
			}
21
		</style>
22
		<script>
23
			function autoGrow(oField) {
24
				document.getElementById("tt").style.width=oField.scrollWidth+"px";
25
				document.getElementById("tt").value=oField.value;
26
				oField.style.height=document.getElementById("tt").scrollHeight+"px";
27
			}
28
		</script>
29
	</head>
30

31
	<body>
32
		<header class="mui-bar mui-bar-nav toptitbox">
33
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
34
		    <h1 class="mui-title toptit">修改</h1>
35
		</header>
36
		<div class="mui-content" style="padding-top:34px;">
37
		    <div class="mui-input-group mainbox">
38
	 		    <div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="showCityPicker">
39
					<span class="mui-pull-left">所在城市</span><span class="requiredThis"> *</span>
40
				    <span class="rightword" id="cityResult">请选择所在城市</span>
41
				</div>
42
			</div>
43
		    <div class="mui-input-group mainbox">
44
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="showDegreePicker">
45
    				<span class="mui-pull-left">费用预算</span>
46
				    <span class="rightword" id="degreeResult">请选择预算范围</span>
47
    			</div>
48
		    </div>
49
		     <div class="mui-input-group mainbox">
50
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="ExpecteDuration">
51
    				<span class="mui-pull-left">预期时长</span>
52
				    <span class="rightword" id="ExpecteResult">请选择预期时长</span>
53
    			</div>
54
		    </div>
55
		    <div class="mui-input-group mainbox">
56
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id='showYearPicker' data-options='{"type":"date"}'>
57
    				<span class="mui-pull-left">需求有效期</span><span class="requiredThis"> *</span>
58
				    <span class="rightword" id="yearResult">请选择需求的截止日期</span>
59
    			</div>
60
		    </div>
61
		   <div class="mui-input-group mainbox">
62
		   		<div class="infocontit infocontitM">联系电话<span class="requiredThis"> *</span></div>
63
				<div class="infocon">
64
					<textarea class="textareabox simulation" id="phone" oninput="autoGrow(this)" maxlength="50" placeholder="请填写您的联系电话"></textarea>
65
					<textarea class="textareabox simulation" id="tt" style="position:absolute;top:0;left:-999px;"></textarea>
66
				</div>
67
		    </div>
68
		    <div class="mui-content-padded frmboxNew">
69
				<button id="login" class="mui-btn mui-btn-block frmbtn frmactive">保存</button>
70
			</div>
71
		</div>
72
		<script src="../js/public/mui.min.js"></script>
73
		<script src="../js/public/zepto.min.js"></script>
74
		<script src="../js/public/mui.picker.min.js"></script>
75
		<script src="../js/public/mui.picker.js"></script>
76
		<script src="../js/public/mui.dtpicker.js"></script>
77
		<script src="../js/public/city.data.js"></script>
78
		<script src="../js/public/base.js"></script>
79
		<script type="text/javascript" src="../js/demondModify.js"></script>
80
	</body>
81

82
</html>

+ 112 - 0
app/html/demandPublish.html

@ -0,0 +1,112 @@
1
<!doctype html>
2
<html>
3

4
	<head>
5
		<meta charset="UTF-8">
6
		<title>编辑教育背景</title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link href="../css/mui.min.css" rel="stylesheet" />
9
		<link href="../css/mui.picker.min.css" rel="stylesheet" />
10
		<link href="../css/app.css" rel="stylesheet" />
11
		<style>
12
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;}
13
			.mui-content{height:100%;overflow: auto;}
14
			.simulation{
15
				padding:2px;
16
				height:24px;
17
				overflow:hidden;
18
				width:100%;
19
				font-size:14px;
20
			}
21
		</style>
22
		<script>
23
			function autoGrow(oField) {
24
				document.getElementById("tt").style.width=oField.scrollWidth+"px";
25
				document.getElementById("tt").value=oField.value;
26
				oField.style.height=document.getElementById("tt").scrollHeight+"px";
27
			}
28
		</script>
29
	</head>
30

31
	<body>
32
		<header class="mui-bar mui-bar-nav toptitbox">
33
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
34
		    <h1 class="mui-title toptit">需求发布</h1>
35
		</header>
36
		<div class="mui-content" style="padding-top:34px;">
37
			<div class="mui-input-group mainbox">
38
				<div class="infocontit infocontitM OnetitM  mui-clearfix" style="line-height:19px;background-color: rgba(0,0,0,.8);">
39
    				<p style="color:white;padding-top:10px;">只能发布你所在机构的需求</p>
40
    				<p style="color:white;">您可以使用【修改资料】功能,变更您的所在机构</p>
41
    			</div>
42
		    </div>
43
			<div class="mui-input-group mainbox">
44
				<div class="infocontit infocontitM OnetitM  mui-clearfix" id="publish">
45
    				<span class="mui-pull-left">发布者</span>
46
				    <span class="rightword" id="publisher" style="right:19px;color:#333;"></span>
47
    			</div>
48
		    </div>
49
			<div class="mui-input-group mainbox">
50
				<div class="infocontit infocontitM">需求主题<span class="requiredThis"> *</span></div>
51
				<div class="infocon">
52
					<textarea class="textareabox simulation textareaboxEmp" id="demandTitle" oninput="autoGrow(this)" maxlength="50" placeholder="请用一句话概括您的需求,50字以内"></textarea>
53
					<textarea class="textareabox simulation" id="tt" style="position:absolute;top:0;left:-999px;"></textarea>
54
					<!--<div class="textareabox textareaboxEmp" contenteditable="true" placeholder="请填写就读的学校(50个字以内)" id="project"></div>-->  
55
				</div>
56
		    </div>
57
		    <div class="mui-input-group mainbox">
58
				<div class="infocontit infocontitM">需求内容<span class="requiredThis"> *</span></div>
59
				<div class="infocon">
60
					<textarea class="textareabox simulation textareaboxEmp" id="demandContent" oninput="autoGrow(this)" maxlength="50" placeholder="请描述您的需求背景、具体问题、对专家的要求等等,1000字以内"style="min-height:46px;"></textarea>
61
					<!--<div class="textareabox textareaboxEmp" contenteditable="true" placeholder="请填写就读的院系(20个字以内)" id="college"></div>-->   
62
				</div>
63
		    </div>
64
		    <div class="mui-input-group mainbox">
65
	 		    <div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="showCityPicker">
66
					<span class="mui-pull-left">所在城市</span><span class="requiredThis"> *</span>
67
				    <span class="rightword" id="cityResult">请选择所在城市</span>
68
				</div>
69
			</div>
70
		    <div class="mui-input-group mainbox">
71
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="showDegreePicker">
72
    				<span class="mui-pull-left">费用预算</span>
73
				    <span class="rightword" id="degreeResult" flag="">请选择预算范围</span>
74
    			</div>
75
		    </div>
76
		     <div class="mui-input-group mainbox">
77
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="ExpecteDuration">
78
    				<span class="mui-pull-left">预期时长</span>
79
				    <span class="rightword" id="ExpecteResult" flag="">请选择预期时长</span>
80
    			</div>
81
		    </div>
82
		    <div class="mui-input-group mainbox">
83
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id='showYearPicker' data-options='{"type":"date"}'>
84
    				<span class="mui-pull-left">需求有效期</span><span class="requiredThis"> *</span>
85
				    <span class="rightword" id="yearResult">请选择需求的截止日期</span>
86
    			</div>
87
		    </div>
88
		   <div class="mui-input-group mainbox">
89
		   		<div class="infocontit infocontitM">联系电话<span class="requiredThis"> *</span></div>
90
				<div class="infocon">
91
					<textarea class="textareabox simulation" id="phone" oninput="autoGrow(this)" maxlength="50" placeholder="请填写您的联系电话"></textarea>
92
				</div>
93
		    </div>
94
		    <div class="mui-content-padded frmboxNew">
95
				<button id="publishDemand" class="mui-btn mui-btn-block frmbtn frmactive">发布</button>
96
			</div>
97
		</div>
98
		<script src="../js/public/mui.min.js"></script>
99
		<script src="../js/public/zepto.min.js"></script>
100
		<script src="../js/public/mui.picker.min.js"></script>
101
		<script src="../js/public/mui.picker.js"></script>
102
		<script src="../js/public/mui.dtpicker.js"></script>
103
		<script src="../js/public/city.data.js"></script>
104
		<script src="../js/public/base.js"></script>
105
		<script type="text/javascript" src="../js/demondPublish.js"></script>
106
		<script type="text/javascript"> 
107
			//处理iOS下弹出软键盘后头部会随页面的滚动条消失问题
108
		    iosheader();
109
		</script>
110
	</body>
111

112
</html>

+ 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>

+ 67 - 36
app/html/needList.html

@ -4,51 +4,82 @@
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" id="needIssue">发需求</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
			/*点击按钮*/
37
			mui.plusReady(function(){
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
							var statusN=data.data;
51
							if(statusN!=0){
52
								mui.openWindow({
53
									url: '../html/demandPublish.html',
54
									id: '../html/demandPublish.html',
55
									show: {
56
										aniShow: "slide-in-right"
57
									},
58
									extras: {
59
										ourl: plus.webview.currentWebview().id
60
									}
61
								});
62
							}else{
63
								mui.openWindow({
64
									url: '../html/updateBasic-org.html',
65
									id: '../html/updateBasic-org.html',
66
									show: {
67
										aniShow: "slide-in-right"
68
									},
69
									extras: {
70
										ourl: plus.storage.getItem('userid')
71
									}
72
								});
73
							}
74
						},
75
						error: function() {
76
							plus.nativeUI.toast("服务器链接超时", toastStyle);
77
							return;
78
						}
79
					})
80
				});
81
			})
82
		</script>
52 83
	</body>
53 84
54 85
</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>

+ 0 - 96
app/html/needSearch.html

@ -1,96 +0,0 @@
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
		<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
	</head>
17
18
	<body>
19
		<header class="mui-bar mui-bar-nav toptitbox">
20
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
21
		    <h1 class="mui-title toptit">需求搜索</h1>
22
		</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>
86
		
87
		<script src="../js/public/mui.min.js"></script>
88
		<script src="../js/public/base.js"></script>
89
		<script type="text/javascript"> 
90
			//处理iOS下弹出软键盘后头部会随页面的滚动条消失问题
91
		    iosheader();
92
		</script>
93
		<script src="../js/needSearch.js"></script>
94
	</body>
95
96
</html>

+ 61 - 0
app/html/updataName.html

@ -0,0 +1,61 @@
1
<!doctype html>
2
<html>
3

4
	<head>
5
		<meta charset="UTF-8">
6
		<title>编辑个人资料-所在机构</title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link href="../css/mui.min.css" rel="stylesheet" />
9
		<link href="../css/mui.picker.min.css" rel="stylesheet" />
10
		<link href="../css/app.css" rel="stylesheet" />
11
		<style>
12
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;}
13
			.mui-content{height:100%;overflow: auto;}
14
			.simulation{
15
				padding:2px;
16
				height:24px;
17
				overflow:hidden;
18
				width:100%;
19
			}
20
		</style>
21
		<script>
22
			function autoGrow(oField) {
23
				document.getElementById("tt").style.width=oField.scrollWidth+"px";
24
				document.getElementById("tt").value=oField.value;
25
				oField.style.height=document.getElementById("tt").scrollHeight+"px";
26
			}
27
		</script>
28
	</head>
29

30
	<body>
31
		<header class="mui-bar mui-bar-nav toptitbox">
32
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
33
		    <h1 class="mui-title toptit">所在机构</h1>
34
		</header>
35
		<div class="mui-content">
36
			<div class="mui-input-group mainbox">
37
				<div class="infocon">
38
					<textarea class="textareabox simulation" id="title" oninput="autoGrow(this)" maxlength="10" placeholder="请填写您的姓名"></textarea>
39
					<textarea class="textareabox simulation" id="tt" style="position:absolute;top:0;left:-999px;"></textarea>
40
				</div>
41
		    </div>
42
			<div class="limitBox">
43
				<p class="limitNum"><span id="fontAdd">0</span>/50</p>
44
			</div>
45
			<div class="mui-content-padded frmboxNew">
46
				<button id="login" class="mui-btn mui-btn-block frmbtn frmactive">保存</button>
47
			</div>
48
		</div>
49
		<script src="../js/public/mui.min.js"></script>
50
		<script src="../js/public/zepto.min.js"></script>
51
		<script src="../js/public/mui.picker.min.js"></script>
52
		<script src="../js/public/city.data.js"></script>
53
		<script src="../js/public/base.js"></script>
54
		<script type="text/javascript" src="../js/updateName.js"></script>		
55
		<script type="text/javascript"> 
56
			//处理iOS下弹出软键盘后头部会随页面的滚动条消失问题
57
		    iosheader();
58
		</script>
59
	</body>
60

61
</html>

+ 6 - 2
app/html/updateBasic.html

@ -36,8 +36,12 @@
36 36
				        	</div>
37 37
				    </li>
38 38
				    <li class="mui-table-view-cell">
39
			        	<span class="mui-pull-left">姓名</span>
40
			        	<div class="mui-pull-right" id="exName"></div>
39
			        	<span class="mui-pull-left" class="exName">姓名</span>
40
			        	<div class="mui-pull-right" class="exName"></div>
41
			        	 <a class="mui-navigate-right" style="display:none" class="exName">
42
				        	<span class="mui-pull-left">姓名</span>
43
				        	<div class="rightword" class="exName" id="name"></div>
44
				        </a>
41 45
				    </li>
42 46
				    <li class="mui-table-view-cell">
43 47
				        <a class="mui-navigate-right">

+ 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


+ 265 - 0
app/js/demondModify.js

@ -0,0 +1,265 @@
1
 (function($, doc) {
2
 $.ready(function() {
3
 	$.plusReady(function() {
4

5
 		var userid = plus.storage.getItem('userid');
6
 		var currWindow = plus.webview.currentWebview();
7
 		var demandId= currWindow.demandId;
8
 		var oCost={
9
			'1' : '1万元以内',
10
			'2' : '1-5万元' ,
11
			'3' : '5-10万元' ,
12
			'4' : '10-20万元' ,
13
			'5' : '20-50万元' ,
14
			'6' : '50万元以上'
15
		};
16
		var oSpend= {
17
			'1' : '1个月内',
18
			'2' : '1-3个月' ,
19
			'3' : '3-6个月' ,
20
			'4' : '6-12个月' ,
21
			'5' : '1年以上' 
22
		};
23
 		/**
24
 		 * 获取对象属性的值
25
 		 * 主要用于过滤三级联动中,可能出现的最低级的数据不存在的情况,实际开发中需要注意这一点;
26
 		 * @param {Object} obj 对象
27
 		 * @param {String} param 属性名
28
 		 */
29
 		var _getParam = function(obj, param) {
30
 			return obj[param] || '';
31
 		};
32
 		//普通示例
33
 		var userPicker = new $.PopPicker();
34
 		userPicker.setData([{
35
 			value: '1',
36
 			text: '1万元以内'
37
 		}, {
38
 			value: '2',
39
 			text: '1-5万元'
40
 		}, {
41
 			value: '3',
42
 			text: '5-10万元'
43
 		}, {
44
 			value: '4',
45
 			text: '10-20万元'
46
 		}, {
47
 			value: '5',
48
 			text: '20-50万元'
49
 		}, {
50
 			value: '6',
51
 			text: '50万元以上'
52
 		}]);
53
 		var showUserPickerButton = doc.getElementById('showDegreePicker');
54
 		var degreeResult = doc.getElementById('degreeResult');
55
 		showUserPickerButton.addEventListener('tap', function(event) {
56
 			userPicker.show(function(items) {
57
 				degreeResult.innerText = items[0].text;
58
 				showUserPickerButton.setAttribute('flag',items[0].value);
59
 				//返回 false 可以阻止选择框的关闭
60
 				//return false;
61
 			});
62
 		}, false);
63
 	
64
 	var userPicker1 = new $.PopPicker();
65
 	userPicker1.setData([{
66
 		value: '1',
67
 		text: '1个月内'
68
 	}, {
69
 		value: '2',
70
 		text: '1-3个月'
71
 	}, {
72
 		value: '3',
73
 		text: '3-6个月'
74
 	}, {
75
 		value: '4',
76
 		text: '6-12个月'
77
 	}, {
78
 		value: '5',
79
 		text: '1年以上'
80
 	}]);
81
 	var ExpecteDuration = doc.getElementById('ExpecteDuration');
82
 	var ExpecteResult = doc.getElementById('ExpecteResult');
83
 	ExpecteDuration.addEventListener('tap', function(event) {
84
 		userPicker1.show(function(items) {
85
 			ExpecteResult.innerText = items[0].text;
86
 			ExpecteDuration.setAttribute("flag",items[0].value) 
87
 			//返回 false 可以阻止选择框的关闭
88
 			//return false;
89
 		});
90
 	}, false);
91

92
 	//==========年份选择==========
93
 	var result = doc.getElementById('yearResult');
94
 	var btns = doc.getElementById('showYearPicker');
95
 	btns.addEventListener('tap', function() {
96
 		var optionsJson = this.getAttribute('data-options') || '{}';
97
 		var options = JSON.parse(optionsJson);
98
 		options.beginDate = new Date('2017-06-11'); //设置开始日期 
99
 		var id = this.getAttribute('id');
100
 		/*
101
 		 * 首次显示时实例化组件
102
 		 * 示例为了简洁,将 options 放在了按钮的 dom 上
103
 		 * 也可以直接通过代码声明 optinos 用于实例化 DtPicker
104
 		 */
105
 		var oD = new Date();
106
 		oDy = oD.getFullYear();
107
 		oDm = parseInt(oD.getMonth()) + 1;
108
 		oDd = parseInt(oD.getDate()) + 1;
109
 		var oc = oDy + "-" + oDm + "-" + oDd
110
 		options.beginDate = new Date(oc); //设置开始日期 
111
 		options.endYear = new Date().getFullYear() + 100;
112
 		var picker = new $.DtPicker(options);
113
 		picker.show(function(rs) {
114
 			/*
115
 			 * rs.value 拼合后的 value
116
 			 * rs.text 拼合后的 text
117
 			 * rs.y 年,可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
118
 			 * rs.m 月,用法同年
119
 			 * rs.d 日,用法同年
120
 			 * rs.h 时,用法同年
121
 			 * rs.i 分(minutes 的第二个字母),用法同年
122
 			 */
123
 			if(rs.y.text == "至今") {
124
 				result.innerText = "至今"
125
 			} else {
126
 				result.innerText = rs.y.text + "年" + rs.m.text + "月" + rs.d.text + "日";
127
 				btns.setAttribute("flag",rs.y.text+ rs.m.text + rs.d.text)
128
 			}
129

130
 			/* 
131
 			 * 返回 false 可以阻止选择框的关闭
132
 			 * return false;
133
 			 */
134
 			/*
135
 			 * 释放组件资源,释放后将将不能再操作组件
136
 			 * 通常情况下,不需要示放组件,new DtPicker(options) 后,可以一直使用。
137
 			 * 当前示例,因为内容较多,如不进行资原释放,在某些设备上会较慢。
138
 			 * 所以每次用完便立即调用 dispose 进行释放,下次用时再创建新实例。
139
 			 */
140
 			picker.dispose();
141
 		});
142
 	}, false);
143
 	var cityPicker = new $.PopPicker({
144
 		layer: 2
145
 	});
146
 	cityPicker.setData(cityData);
147
 	var showCityPickerButton = doc.getElementById('showCityPicker');
148
	var cityResult=document.querySelector("#cityResult")
149
 	showCityPickerButton.addEventListener('tap', function(event) {
150
 		cityPicker.show(function(items) {
151
 			cityResult.innerText = items[0].text + "-" + items[1].text;
152
 			cityResult.setAttribute('city',items[1].text);
153
 			cityResult.setAttribute('province',items[0].text)
154
 		});
155
 	}, false);
156
 	queryDemand();
157
 	/*个人信息*/
158
 	function queryDemand() {
159
 		$.ajax(baseUrl + '/ajax/demand/qo' , {
160
 			dataType: 'json', //数据格式类型
161
 			type: 'GET', //http请求类型
162
 			data: {
163
 				"id" : demandId
164
 			},
165
 			timeout: 10000,
166
 			async: true,
167
 			success: function(data) {
168
 				if(data.success) {
169
 					var $data=data.data;
170
 					document.querySelector("#cityResult").innerHTML=$data.province + "-" + $data.city ;
171
					document.querySelector("#showCityPicker").setAttribute('city', data.data.city );
172
 					document.querySelector("#showCityPicker").setAttribute('province', data.data.province );
173
 					document.querySelector("#yearResult").innerHTML=$data.invalidDay.substr(0,4) +"年"+ $data.invalidDay.substr(4,2) +"月"+ $data.invalidDay.substr(6,2)+"日";
174
					document.querySelector("#showYearPicker").setAttribute('flag', $data.invalidDay );
175
					document.querySelector("#phone").value= $data.contactNum ;
176
					if($data.cost) {
177
						document.querySelector("#degreeResult").innerHTML=oCost[ $data.cost ] ;
178
						document.querySelector("#showDegreePicker").setAttribute('flag', $data.cost );
179
					}
180
					if($data.duration) {
181
						document.querySelector("#ExpecteResult").innerHTML=oCost[ $data.duration ] ;
182
						document.querySelector("#ExpecteDuration").setAttribute('flag', $data.duration );
183
					}
184
 				}
185
 			},
186
 			error: function() {
187
 				plus.nativeUI.toast("服务器链接超时", toastStyle);
188
 			}
189
 		});
190
 	}
191
 	/*检查格式是否合格*/
192
 	function  checkout() {
193
 		var arr=[];
194
 			arr[0] = {
195
 				demand : document.querySelector("#cityResult"),
196
 				alertTitle : "所在城市" ,
197
 				txt : "请选择所在城市" ,
198
 				length : 2
199
 			},
200
 			arr[1] = {
201
 				demand : document.querySelector("#yearResult"),
202
 				alertTitle : "需求有效期" ,
203
 				txt : "请选择需求的截止日期" ,
204
 				length : 2
205
 			},
206
 			arr[2] = {
207
 				demand : document.querySelector("#phone"),
208
 				fontNum : 50,
209
 				alertTitle : "联系电话" ,
210
 				length : 3
211
 			};
212
 			for(var i in arr) {
213
 				if( arr[i].length ==3) {
214
 					if( arr[i].demand.value.replace(/(^\s*)|(\s*$)/g,"")=="") {
215
		 				plus.nativeUI.toast("请填写" + arr[i].alertTitle , "toastStyle");
216
		 				return;
217
		 			}else if( arr[i].demand.value.length >50 ) {
218
		 				plus.nativeUI.toast( arr[i].alertTitle +"不可超过"+ arr[i].fontNum +"个字", "toastStyle");
219
		 				return;
220
		 			}
221
 				} else {
222
 					if( arr[i].demand.innerHTML== arr[i].txt) {
223
		 				plus.nativeUI.toast("请填写" + arr[i].alertTitle , "toastStyle");
224
		 				return;
225
		 			}
226
 				}
227
 			}
228
 			return 1;
229
 	}
230
 	/*发布需求*/
231
 	document.querySelector("#publishDemand").addEventListener( "tap", function() {
232
 		if(checkout()) {
233
 			pubDemand();
234
 		}
235
 	},false);
236
 	/*发布需求的函数*/
237
 	function pubDemand() {
238
 		$.ajax(baseUrl + '/ajax/demand/modify' , {
239
 			dataType: 'json', //数据格式类型
240
 			type: 'post', //http请求类型
241
 			data: { 
242
 				"id":demandId ,
243
				"province": cityResult.getAttribute('province'),
244
				"city": cityResult.getAttribute('city'),
245
				"cost": document.querySelector("#showDegreePicker").getAttribute('flag')==null?'':document.querySelector("#showDegreePicker").getAttribute('flag'),
246
				"duration": document.querySelector("#ExpecteDuration").getAttribute('flag')==null?'':document.querySelector("#ExpecteDuration").getAttribute('flag'),
247
				"invalidDay": result.getAttribute('flag'),
248
				"contactNum": document.querySelector("#phone").value,
249
				"modifier" : userid
250
 			},
251
 			timeout: 10000,
252
 			async: true,
253
 			success: function(data) {
254
 				if(data.success) {
255
 					$.back();
256
 				}
257
 			},
258
 			error: function() {
259
 				plus.nativeUI.toast("服务器链接超时", toastStyle);
260
 			}
261
 		});
262
 	}
263
 })
264
 })
265
 })(mui, document);

+ 274 - 0
app/js/demondPublish.js

@ -0,0 +1,274 @@
1
 (function($, doc) {
2
 $.ready(function() {
3
 	$.plusReady(function() {
4

5
 		var userid = plus.storage.getItem('userid');
6
 		var oRd="";
7
 		/**
8
 		 * 获取对象属性的值
9
 		 * 主要用于过滤三级联动中,可能出现的最低级的数据不存在的情况,实际开发中需要注意这一点;
10
 		 * @param {Object} obj 对象
11
 		 * @param {String} param 属性名
12
 		 */
13
 		var _getParam = function(obj, param) {
14
 			return obj[param] || '';
15
 		};
16
 		//普通示例
17

18
 		var userPicker = new $.PopPicker();
19
 		userPicker.setData([{
20
 			value: '1',
21
 			text: '1万元以内'
22
 		}, {
23
 			value: '2',
24
 			text: '1-5万元'
25
 		}, {
26
 			value: '3',
27
 			text: '5-10万元'
28
 		}, {
29
 			value: '4',
30
 			text: '10-20万元'
31
 		}, {
32
 			value: '5',
33
 			text: '20-50万元'
34
 		}, {
35
 			value: '6',
36
 			text: '50万元以上'
37
 		}]);
38
 		var showUserPickerButton = doc.getElementById('showDegreePicker');
39
 		var degreeResult = doc.getElementById('degreeResult');
40
 		showUserPickerButton.addEventListener('tap', function(event) {
41
 			userPicker.show(function(items) {
42
 				degreeResult.innerText = items[0].text;
43
 				showUserPickerButton.setAttribute('flag',items[0].value);
44
 				//返回 false 可以阻止选择框的关闭
45
 				//return false;
46
 			});
47
 		}, false);
48
 	
49

50
 	var userPicker1 = new $.PopPicker();
51
 	userPicker1.setData([{
52
 		value: '1',
53
 		text: '1个月内'
54
 	}, {
55
 		value: '2',
56
 		text: '1-3个月'
57
 	}, {
58
 		value: '3',
59
 		text: '3-6个月'
60
 	}, {
61
 		value: '4',
62
 		text: '6-12个月'
63
 	}, {
64
 		value: '5',
65
 		text: '1年以上'
66
 	}]);
67
 	var ExpecteDuration = doc.getElementById('ExpecteDuration');
68
 	var ExpecteResult = doc.getElementById('ExpecteResult');
69
 	ExpecteDuration.addEventListener('tap', function(event) {
70
 		userPicker1.show(function(items) {
71
 			ExpecteResult.innerText = items[0].text;
72
 			ExpecteDuration.setAttribute("flag",items[0].value) 
73
 			//返回 false 可以阻止选择框的关闭
74
 			//return false;
75
 		});
76
 	}, false);
77

78
 	//==========年份选择==========
79
 	var result = doc.getElementById('yearResult');
80
 	var btns = doc.getElementById('showYearPicker');
81
 	btns.addEventListener('tap', function() {
82
 		var optionsJson = this.getAttribute('data-options') || '{}';
83
 		var options = JSON.parse(optionsJson);
84
 		options.beginDate = new Date('2017-06-11'); //设置开始日期 
85
 		var id = this.getAttribute('id');
86
 		/*
87
 		 * 首次显示时实例化组件
88
 		 * 示例为了简洁,将 options 放在了按钮的 dom 上
89
 		 * 也可以直接通过代码声明 optinos 用于实例化 DtPicker
90
 		 */
91
 		var oD = new Date();
92
 		oDy = oD.getFullYear();
93
 		oDm = parseInt(oD.getMonth()) + 1;
94
 		oDd = parseInt(oD.getDate()) + 1;
95
 		var oc = oDy + "-" + oDm + "-" + oDd
96
 		options.beginDate = new Date(oc); //设置开始日期 
97
 		options.endYear = new Date().getFullYear() + 100;
98
 		var picker = new $.DtPicker(options);
99
 		picker.show(function(rs) {
100
 			/*
101
 			 * rs.value 拼合后的 value
102
 			 * rs.text 拼合后的 text
103
 			 * rs.y 年,可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
104
 			 * rs.m 月,用法同年
105
 			 * rs.d 日,用法同年
106
 			 * rs.h 时,用法同年
107
 			 * rs.i 分(minutes 的第二个字母),用法同年
108
 			 */
109
 			if(rs.y.text == "至今") {
110
 				result.innerText = "至今"
111
 			} else {
112
 				result.innerText = rs.y.text + "年" + rs.m.text + "月" + rs.d.text + "日";
113
 				btns.setAttribute("flag",rs.y.text+ rs.m.text + rs.d.text)
114
 			}
115

116
 			/* 
117
 			 * 返回 false 可以阻止选择框的关闭
118
 			 * return false;
119
 			 */
120
 			/*
121
 			 * 释放组件资源,释放后将将不能再操作组件
122
 			 * 通常情况下,不需要示放组件,new DtPicker(options) 后,可以一直使用。
123
 			 * 当前示例,因为内容较多,如不进行资原释放,在某些设备上会较慢。
124
 			 * 所以每次用完便立即调用 dispose 进行释放,下次用时再创建新实例。
125
 			 */
126
 			picker.dispose();
127
 		});
128
 	}, false);
129
 	var cityPicker = new $.PopPicker({
130
 		layer: 2
131
 	});
132
 	cityPicker.setData(cityData);
133
 	var showCityPickerButton = doc.getElementById('showCityPicker');
134
	var cityResult=document.querySelector("#cityResult")
135
 	showCityPickerButton.addEventListener('tap', function(event) {
136
 		cityPicker.show(function(items) {
137
 			cityResult.innerText = items[0].text + "-" + items[1].text;
138
 			cityResult.setAttribute('city',items[1].text);
139
 			cityResult.setAttribute('province',items[0].text)
140
 		});
141
 	}, false);
142
 	queryPerson()
143
 	/*个人信息*/
144
 	function queryPerson() {
145
 		$.ajax(baseUrl + '/ajax/professor/baseInfo/' + userid, {
146
 			dataType: 'json', //数据格式类型
147
 			type: 'GET', //http请求类型
148
 			timeout: 10000,
149
 			async: true,
150
 			success: function(data) {
151
 				if(data.success) {
152
 					if( data.data.province ) {
153
 						document.querySelector("#cityResult").innerHTML = data.data.province + "-" + data.data.address ;
154
 						cityResult.setAttribute('city', data.data.address );
155
 						cityResult.setAttribute('province', data.data.province )
156
 					}
157
 					if( data.data.phone ) {
158
 						document.querySelector("#phone").value = data.data.phone ;
159
 					}
160
 					oRd = data.data.orgId ;
161
 					queryCompany( data.data.orgId );
162
 				}
163
 			},
164
 			error: function() {
165
 				plus.nativeUI.toast("服务器链接超时", toastStyle);
166
 			}
167
 		});
168
 	}
169
 	/*企业信息*/
170
 	function queryCompany(orgId) {
171
 		$.ajax(baseUrl + '/ajax/org/' + orgId, {
172
 			dataType: 'json', //数据格式类型
173
 			type: 'GET', //http请求类型
174
 			timeout: 10000,
175
 			async: true,
176
 			success: function(data) {
177
 				if(data.success) {
178
 					document.querySelector("#publisher").innerHTML = data.data.forShort ? data.data.forShort : data.data.name;
179
 				}
180
 			},
181
 			error: function() {
182
 				plus.nativeUI.toast("服务器链接超时", toastStyle);
183
 			}
184
 		});
185
 	}
186
 	/*检查格式是否合格*/
187
 	function  checkout() {
188
 		var arr=[];
189
 			arr[0] = { 
190
 				demand : document.querySelector("#demandTitle"),
191
 				fontNum : 50,
192
 				alertTitle : "需求主题",
193
 				length : 3
194
 			},
195
 			arr[1] = {
196
 				demand : document.querySelector("#demandContent"),
197
 				fontNum : 1000 ,
198
 				alertTitle : "需求内容" ,
199
 				length : 3
200
 			},
201
 			arr[2] = {
202
 				demand : document.querySelector("#cityResult"),
203
 				alertTitle : "所在城市" ,
204
 				txt : "请选择所在城市" ,
205
 				length : 2
206
 			},
207
 			arr[3] = {
208
 				demand : document.querySelector("#yearResult"),
209
 				alertTitle : "需求有效期" ,
210
 				txt : "请选择需求的截止日期" ,
211
 				length : 2
212
 			},
213
 			arr[4] = {
214
 				demand : document.querySelector("#phone"),
215
 				fontNum : 50,
216
 				alertTitle : "联系电话" ,
217
 				length : 3
218
 			};
219
 			for(var i in arr) {
220
 				if( arr[i].length ==3) {
221
 					if( arr[i].demand.value.replace(/(^\s*)|(\s*$)/g,"")=="") {
222
		 				plus.nativeUI.toast("请填写" + arr[i].alertTitle , "toastStyle");
223
		 				return;
224
		 			}else if( arr[i].demand.value.length >50 ) {
225
		 				plus.nativeUI.toast( arr[i].alertTitle +"不可超过"+ arr[i].fontNum +"个字", "toastStyle");
226
		 				return;
227
		 			}
228
 				} else {
229
 					if( arr[i].demand.innerHTML== arr[i].txt) {
230
		 				plus.nativeUI.toast("请填写" + arr[i].alertTitle , "toastStyle");
231
		 				return;
232
		 			}
233
 				}
234
 			}
235
 			return 1;
236
 	}
237
 	/*发布需求*/
238
 	document.querySelector("#publishDemand").addEventListener( "tap", function() {
239
 		if(checkout()) {
240
 			pubDemand();
241
 		}
242
 	},false);
243
 	/*发布需求的函数*/
244
 	function pubDemand() {
245
 		$.ajax(baseUrl + '/ajax/demand' , {
246
 			dataType: 'json', //数据格式类型
247
 			type: 'post', //http请求类型
248
 			data: {
249
 				"title": document.querySelector("#demandTitle").value,
250
				"descp": document.querySelector("#demandContent").value,
251
				"province": cityResult.getAttribute('province'),
252
				"city": cityResult.getAttribute('city'),
253
				"cost": document.querySelector("#showDegreePicker").getAttribute('flag')==null?'':document.querySelector("#showDegreePicker").getAttribute('flag'),
254
				"duration": document.querySelector("#ExpecteDuration").getAttribute('flag')==null?'':document.querySelector("#ExpecteDuration").getAttribute('flag'),
255
				"invalidDay": result.getAttribute('flag'),
256
				"contactNum": document.querySelector("#phone").value,
257
				"creator": userid,
258
				"orgId": oRd
259
 			},
260
 			timeout: 10000,
261
 			async: true,
262
 			success: function(data) {
263
 				if(data.success) {
264
 					$.back();
265
 				}
266
 			},
267
 			error: function() {
268
 				plus.nativeUI.toast("服务器链接超时", toastStyle);
269
 			}
270
 		});
271
 	}
272
 })
273
 })
274
 })(mui, document);

+ 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
}

+ 227 - 122
app/js/needList.js

@ -1,142 +1,247 @@
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 pulldownRefresh() {
17
		setTimeout(function() {
18
			demandOnePase();
19
			mui('#pullrefresh').pullRefresh().endPulldownToRefresh();
20
		}, 1500);
21
	}
22
	function pullupRefresh() {
23
		setTimeout(function() {
24
			Num = ++Num;
25
			myDemandList(10,Num);
26
			mui('#pullrefresh').pullRefresh().endPullupToRefresh();
27
		}, 1500);
28
	
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);
56
						if(pageNo!=data.data.pageNo) {
57
							data.data.data=[];
58
						}
59
						var $info = data.data.data;
60
						console.log(JSON.stringify(data))
61
						if($info.length > 0){
62
							for(var i = 0; i < $info.length; i++) {
63
								var liStr=document.createElement("li");
64
								liStr.className="mui-table-view-cell flexCenter";
65
								document.getElementById("myneedList").appendChild(liStr);
66
								demandHtml($info[i],liStr);
67
							}
68
						}
69
						if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
70
							mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
71
						} else {
72
							mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
73
						}
53 74
					}
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 75
				},
70
				extras: {
71
					demanid: oDemandId,
72
					demandStatus1: demandStatus
76
				error: function() {
77
					plus.nativeUI.toast("服务器链接超时", toastStyle);
78
					mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
79
					return;
73 80
				}
74

75 81
			});
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",
82
		})
83
	}
84
	function demandOnePase() {
85
		mui.plusReady(function() {
86
			Num=1;
87
			mui.ajax(baseUrl + '/ajax/demand/pq', {
88
				dataType: 'json', //数据格式类型
89
				type: 'GET', //http请求类型
90
				timeout: 10000, //超时设置
91
				data: {
92
					"uid": plus.storage.getItem('userid'),
93
					"pageNo": 1,
94
					"pageSize": 10
95
				},
96
				success: function(data) {
97
					if(data.success) {
98
						mui('#pullrefresh').pullRefresh().refresh(true);
99
						var ws=plus.webview.getWebviewById("../html/needList.html");
100
						plus.nativeUI.closeWaiting();
101
						ws.show("slide-in-right", 150);
102
						document.getElementById("myneedList").innerHTML="";
103
						var $info = data.data.data;
104
						console.log(JSON.stringify(data))
105
						if($info.length > 0){
106
							for(var i = 0; i < $info.length; i++) {
107
								var liStr=document.createElement("li");
108
								liStr.className="mui-table-view-cell flexCenter";
109
								document.getElementById("myneedList").appendChild(liStr);
110
								demandHtml($info[i],liStr);
109 111
							}
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
							});
112
						}
113
						if(1 < Math.ceil(data.data.total / data.data.pageSize)) {
114
							mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
115
						} else {
116
							mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
129 117
						}
130 118
					}
119
				},
120
				error: function() {
121
					plus.nativeUI.toast("服务器链接超时", toastStyle);
122
					return;
131 123
				}
132
			}
133
		},
134
		error: function() {
135
			plus.nativeUI.toast("服务器链接超时", toastStyle);
136
			return;
137
		}
138
	});
124
			});
139 125
		})
126
	}
127
	function demandHtml($data,liStr) {
128
		var statusU="";
129
		var dateGap = delayDay($data.invalidDay);
130
		if($data.state==1 && dateGap=="1"){
131
			statusU='<span class="draftLable">即将于 '+TimeTr($data.invalidDay)+' 过期</span>'
132
		}
133
		if($data.state==0){
134
			statusU='<span class="draftLable">已于 '+TimeTr($data.invalidDay)+' 过期</span>'
135
		}else if($data.state==2){
136
			statusU='<span class="overLable">已于 '+TimeTr($data.modifyTime)+' 完成</span>'
137
		}else if($data.state==3){
138
			statusU='<span>已于 '+TimeTr($data.modifyTime)+' 关闭</span>'
139
		}
140
		var strCon='';
141
			strCon+='<div class="madiaInfo" data-id="'+$data.id+'">'
142
			strCon+='<p class="h1Font mui-ellipsis-2">'+ $data.title +'</p>'
143
			strCon+='<div class="showli mui-ellipsis">'
144
			strCon+='<span>发布于 '+TimeTr($data.createTime)+'</span>'
145
			strCon+= statusU
146
			strCon+='</div>'
147
		liStr.innerHTML=strCon;
148
	}
149
	function delayDay(startTime){
150
		var dateToday = new Date();
151
		var dateInvalid = new Date();
152
		dateInvalid.setFullYear(parseInt(startTime.substring(0, 4)));
153
		dateInvalid.setMonth(parseInt(startTime.substring(4, 6)) - 1);
154
		dateInvalid.setDate(parseInt(startTime.substring(6, 8)));
155
		
156
		var dateGap = Math.abs(dateToday.getTime() - dateInvalid.getTime());
157
		var ifDelay="0";
158
		if(dateGap < 604800000){
159
			ifDelay="1";
160
		}
161
		return ifDelay;
162
	}
140 163

141
	});
142
})
164
		/*查询单个需求*/
165
//		mui('.tableList').on('tap', 'li', function(e) {
166
//			var oDemandId = this.getAttribute('demandId');
167
//			var demandStatus = this.getAttribute('demandStatus');
168
//			mui.openWindow({
169
//				url: '../html/needShow.html',
170
//				id: '../html/needShow.html',
171
//				show: {
172
//					autoShow: false,
173
//					aniShow: "slide-in-right"
174
//				},
175
//				extras: {
176
//					demanid: oDemandId,
177
//					demandStatus1: demandStatus
178
//				}
179
//
180
//			});
181
//		});
182
		/*发布新需求*/
183
//		document.getElementById("btnLinkBox").addEventListener("tap", function() {
184
//			mui.ajax(baseUrl + "/ajax/professor/auth", {
185
//		dataType: 'json', //数据格式类型
186
//		type: 'GET', //http请求类型
187
//		timeout: 10000, //超时设置
188
//		data: {
189
//			"id": userid
190
//		},
191
//		success: function(data) {
192
//			if(data.success) {
193
//				var $data = data.data;
194
//				if($data.authStatus == 3) {
195
//					var oDa = {};
196
//					oDa.flag = ($data.orgAuth == 0) ? 1 : 0;
197
//					mui.openWindow({
198
//						url: '../html/needIssue.html',
199
//						id: '../html/needIssue.html',
200
//						show: {
201
//							autoShow: false,
202
//							aniShow: "slide-in-right",
203
//						},
204
//						extras: oDa
205
//					});
206
//				} else {
207
//					if($data.orgAuth == 1) {
208
//						mui.openWindow({
209
//							url: '../html/needIssue.html',
210
//							id: '../html/needIssue.html',
211
//							show: {
212
//								autoShow: false,
213
//								aniShow: "slide-in-right",
214
//							}
215
//						});
216
//					} else {
217
//						if($data.authStatus == 2) {
218
//							plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
219
//								'verticalAlign': 'center'
220
//							});
221
//						} else if($data.authStatus == 1) {
222
//							plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
223
//								'verticalAlign': 'center'
224
//							});
225
//						} else if($data.authStatus <= 0) {
226
//							mui.openWindow({
227
//								url: '../html/realname-authentication.html',
228
//								id: 'realname-authentication.html',
229
//								show: {
230
//									autoShow: false,
231
//									aniShow: "slide-in-right",
232
//								}
233
//							});
234
//						}
235
//					}
236
//				}
237
//			}
238
//		},
239
//		error: function() {
240
//			plus.nativeUI.toast("服务器链接超时", toastStyle);
241
//			return;
242
//		}
243
//	});
244
//		})
245
//
246
//	});
247
//})

+ 0 - 308
app/js/needSearch.js

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

16
function pullupRefresh() {
17
	setTimeout(function() {
18
		personalMessage(orderKey)
19
	}, 1000);
20
}
21
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
		}
79
		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
			},
113
		});
114
	});
115
});
116

117
function personalMessage(a) {
118

119
	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,
134
			success: function(data) {
135
				if(data.success) {
136
					console.log(JSON.stringify(data));
137
					plus.nativeUI.closeWaiting();
138
					ws.show("slide-in-right", 150);
139
					if(!a) {
140
						document.getElementsByClassName("tableList")[0].innerHTML = ""
141
					}
142
					if(data.data.length == 0) {
143
						mui('#pullrefresht').pullRefresh().disablePullupToRefresh(true);
144
						return;
145
					}
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); /*能上拉*/
152
					} else {
153
						mui('#pullrefresht').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
154
					}
155
				}
156
			},
157
			error: function() {
158
				plus.nativeUI.toast("服务器链接超时", toastStyle);
159
				mui('#pullrefresht').pullRefresh().endPullupToRefresh(true);
160
				return;
161
			}
162
		});
163
	})
164
}
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>'
231
		
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
	});
255
}
256

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
	});
307

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;

+ 7 - 23
app/js/updateBasic-org.js

@ -3,24 +3,6 @@ mui.ready(function() {
3 3
		var web = plus.webview.currentWebview()
4 4
		web.show("slide-in-right", 150);
5 5
		var userid = plus.storage.getItem('userid');
6
		var upStatus = function() {
7
			mui.ajax(baseUrl + "/ajax/professor/removeOrgAuth", {
8
				dataType: 'json', //数据格式类型
9
				type: 'post', //http请求类型
10
				data: {
11
					id: userid
12
				},
13
				timeout: 10000, //超时设置				
14
				success: function(data) {
15
					console.log(JSON.stringify(data));
16
					if(data.success) {
17
						
18
					} else {
19

20
					}
21
				}
22
			})
23
		}
24 6
		function person() {
25 7
			plus.nativeUI.closeWaiting();
26 8
			var title = document.getElementById("title");
@ -43,13 +25,18 @@ mui.ready(function() {
43 25
			}
44 26
			if(web.orgAuth==1) {
45 27
				var btn = ["确定", "取消"];
46
				mui.confirm("您修改了所在机构,员工认证即将失效,确认修改?", "提示", btn, function(e) {
28
				mui.confirm("您修改了所在机构,认证员工身份将失效,为企业发布的需求也将关闭,确定修改?", "提示", btn, function(e) {
47 29
					if(e.index == 0) {
48 30
						savePro();
49 31
					}
50 32
				})
51 33
			}else{
52
				savePro();
34
				var btn = ["确定", "取消"];
35
				mui.confirm("您修改了所在机构,您为企业发布的需求将关闭,确定修改?", "提示", btn, function(e) {
36
					if(e.index == 0) {
37
						savePro();
38
					}
39
				})
53 40
			}
54 41
			 
55 42
		})
@ -62,9 +49,6 @@ mui.ready(function() {
62 49
					return;
63 50
				}
64 51
			}
65
			if(web.orgAuth==1) {
66
				upStatus();
67
			}
68 52
			mess.name = web.name;
69 53
			mess.orgName = document.getElementById("title").value;
70 54
			mess.department =web.department;

+ 13 - 1
app/js/updateBasic.js

@ -30,7 +30,18 @@ mui.ready(function() {
30 30
							var mun = Math.round(Math.random() * 99 + 1);
31 31
							document.getElementById("userimg").style.backgroundImage = "url(" + baseUrl + "/images/head/" + $data.id + "_l.jpg?" + mun + ")";
32 32
						}
33
						document.getElementById("exName").innerHTML=$data.name;
33
						var on1=document.querySelectorAll("exName")
34
						if($data.orgAuth==0) {
35
							on1[0].style.display="none";
36
							on1[1].style.display="none";
37
							on1[4].innerHTML=$data.name;
38
							if(!f1) {
39
						}else {
40
							bindEvent({selector:"name",txt:"请填写您的姓名",web:{html:'updateName.html',id:"updateName.html"}});
41
						}
42
						}else {
43
							on1[3].innerHTML=$data.name;
44
						}
34 45
						person.name=$data.name;
35 46
						if($data.orgName) {
36 47
							document.getElementById('orgName').innerHTML=$data.orgName;
@ -119,5 +130,6 @@ mui.ready(function() {
119 130
		bindEvent({selector:"orgName",txt:"请填写当前就职的机构",web:{html:'updateBasic-org.html',id:"updateBasic-org.html"}});
120 131
		bindEvent({selector:"city",txt:"请选择所在城市",web:{html:'updateBasic-city.html',id:"updateBasic-city.html"}});
121 132
		bindEvent({selector:"mail",txt:"请填写电子邮箱",web:{html:'updateBasic-email.html',id:"updateBasic-email.html"}});
133
		
122 134
	});
123 135
})

+ 78 - 0
app/js/updateName.js

@ -0,0 +1,78 @@
1
mui.ready(function() {
2
	mui.plusReady(function() {
3
		var web = plus.webview.currentWebview()
4
		web.show("slide-in-right", 150);
5
		var userid = plus.storage.getItem('userid');
6
		function person() {
7
			plus.nativeUI.closeWaiting();
8
			var title = document.getElementById("title");
9
			title.value = web.orgName;
10
			document.getElementById("tt").value=web.orgName;
11
				title.style.height=document.getElementById("tt").scrollHeight+"px";
12
			if(web.orgName.length) {
13
				document.getElementById("fontAdd").innerHTML = web.orgName.length;
14
				document.getElementById("login").removeAttribute("disabled");
15
			}
16
			document.getElementById("title").addEventListener("input", function() {
17
					document.getElementById("fontAdd").innerHTML = this.value.length;
18
			})
19
		}
20
		person();
21
		document.getElementById("login").addEventListener("tap",function(){
22
			if(web.orgName==document.getElementById("title").value) {
23
				mui.back();
24
				return;
25
			}
26
				var btn = ["确定", "取消"];
27
				mui.confirm("您修改了姓名,您的专利和论文将取消关联,确定修改?", "提示", btn, function(e) {
28
					if(e.index == 0) {
29
						savePro();
30
					}
31
				}) 
32
		})
33
		
34
		function savePro() {
35
			var mess = {};
36
			if(document.getElementById("title").value.length) {
37
				if(document.getElementById("title").value.length>50) {
38
					plus.nativeUI.toast("姓名不得超过10个字", toastStyle);
39
					return;
40
				}
41
			}
42
			mess.name = document.getElementById("title").value;
43
			mess.orgName = web.orgName ;
44
			mess.department =web.department;
45
			mess.title = web.title;
46
			mess.office =web.office;	
47
			mess.address = web.address;
48
			mess.province=web.province;
49
			mess.email = web.email;
50
			mess.phone =web.phone;			
51
			mess.id = userid;
52
			var mess1 = JSON.stringify(mess);
53
			console.log(JSON.stringify(mess))
54
			$.ajax({
55
				"url": baseUrl + '/ajax/professor',
56
				"type": "PUT",
57
				"async": true,
58
				"data": mess1,
59
				"contentType": "application/json",
60
				"success": function(data) {
61
					console.log(JSON.stringify(data));
62
					if(data.success) {
63
						plus.nativeUI.showWaiting();
64
						var web = plus.webview.getWebviewById("updateBasic.html");
65
						mui.fire(web, "newId", {
66
								rd: 1
67
							});
68
						var Pa = plus.webview.getWebviewById('html/myaccount.html');
69
						mui.fire(Pa, 'photoUser');
70
						mui.back();
71
					} else {
72
						plus.nativeUI.toast("服务器链接超时", toastStyle);
73
					}
74
				}
75
			});
76
		}
77
	})
78
})