Explorar el Código

我的里面的页面,搜索页面修改

xuchunyang %!s(int64=8) %!d(string=hace) años
padre
commit
e126abdd34

+ 8 - 8
app/html/attentions.html

26
			</ul>
26
			</ul>
27
		</div>
27
		</div>
28
		<div class="alllist" id="pullrefresh">
28
		<div class="alllist" id="pullrefresh">
29
	        <div  class="mui-card-content conblock childlist mui-scroll-wrapper" style="display: block;"><!--当前x显示列表   'childlist'的显示隐藏-->
30
		        <ul class="mui-table-view protable list mui-scroll">
31
		            
32
		        </ul>
29
	        <div  class="mui-card-content conblock childlist " style="display: block;"><!--当前x显示列表   'childlist'的显示隐藏-->
30
		      	<ul class="mui-table-view protable list ">
31
			            
32
			    </ul>
33
			</div>
33
			</div>
34
			<div class="mui-card-content conblock childlist mui-scroll-wrapper" >
35
			        <ul class="mui-table-view protable list2 mui-scroll">
34
			<div class="mui-card-content conblock childlist " >
35
			    <ul class="mui-table-view protable list2 ">
36
			           
36
			           
37
			        </ul>
38
			 </div>
37
			    </ul>
38
			</div>
39
		</div>
39
		</div>
40
		<!--<a id="scrollToTop" class="backTop hide"> <span class="mui-icon mui-icon-arrowup"></span> </a>-->
40
		<!--<a id="scrollToTop" class="backTop hide"> <span class="mui-icon mui-icon-arrowup"></span> </a>-->
41
    </div>
41
    </div>

+ 6 - 1
app/html/fillinfo.html

6
		<title>完善个人信息</title>
6
		<title>完善个人信息</title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
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" />
8
		<link href="../css/mui.min.css" rel="stylesheet" />
9
		<link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
9
		<link href="../css/app.css" rel="stylesheet" />
10
		<link href="../css/app.css" rel="stylesheet" />
10
	</head>
11
	</head>
11
12
31
						<li><label>职称</label></li>
32
						<li><label>职称</label></li>
32
						<li class="basicfrm"><input type="text"  class="mui-input-clear frmtype" id="userTitle"></li>
33
						<li class="basicfrm"><input type="text"  class="mui-input-clear frmtype" id="userTitle"></li>
33
						<li><label>所在地</label></li>
34
						<li><label>所在地</label></li>
34
						<li class="basicfrm"><input type="text"  class="mui-input-clear frmtype"></li>
35
						<li class="basicfrm"><input type="text" class="mui-input-clear frmtype"  id ="showCityPicker" value=""></li>
36
					    <input type="hidden"  class="mui-input-clear frmtype" id="data-province">
37
					    <input type="hidden"  class="mui-input-clear frmtype" id="data-address">
35
					</ul>
38
					</ul>
36
			        
39
			        
37
		        </div>
40
		        </div>
41
			</div>
44
			</div>
42
		</div>
45
		</div>
43
		<script src="../js/public/mui.min.js"></script>
46
		<script src="../js/public/mui.min.js"></script>
47
		<script src="../js/public/mui.picker.min.js"></script>
48
		<script src="../js/public/city.data.js" ></script>
44
		<script src="../js/public/base.js"></script>
49
		<script src="../js/public/base.js"></script>
45
		<script src="../js/fillinfo.js"></script>
50
		<script src="../js/fillinfo.js"></script>
46
	</body>
51
	</body>

+ 1 - 1
app/html/index_home.html

66
            <div class="mui-indicator"></div>
66
            <div class="mui-indicator"></div>
67
          </div>
67
          </div>
68
        </div>
68
        </div>
69
         
69
         <!--<a href="../html/fillinfo.html">ddddd</a>-->
70
        <!-- 九宫格排版-->
70
        <!-- 九宫格排版-->
71
        <div class="mui-card-content conblock">
71
        <div class="mui-card-content conblock">
72
        	<div class="maintitbox">
72
        	<div class="maintitbox">

+ 5 - 10
app/html/myaccount.html

86
				        	<span class="mui-pull-left">我的关注</span>
86
				        	<span class="mui-pull-left">我的关注</span>
87
				        </a>
87
				        </a>
88
				    </li>
88
				    </li>
89
				    <li class="mui-table-view-cell" id="goNewuser">
89
				   <!-- <li class="mui-table-view-cell" id="goNewuser">
90
				        <a class="mui-navigate-right">
90
				        <a class="mui-navigate-right">
91
				        	<em class="mui-icon iconfont icon-friendfavor actionicon addicon mui-pull-left"></em>
91
				        	<em class="mui-icon iconfont icon-friendfavor actionicon addicon mui-pull-left"></em>
92
				        	<span class="mui-pull-left">邀请新用户</span>
92
				        	<span class="mui-pull-left">邀请新用户</span>
93
				        </a>
93
				        </a>
94
				    </li> 
94
				    </li> -->
95
				</ul>
95
				</ul>
96
		    </div>
96
		    </div>
97
		    <div class="mui-input-group  marginbox">
97
		    <div class="mui-input-group  marginbox">
117
		                    <img class="mui-pull-left headimg2" src="../images/default-photo.jpg" >
117
		                    <img class="mui-pull-left headimg2" src="../images/default-photo.jpg" >
118
		                    <div class="mui-pull-left "  style="color:#797979; margin: 10% 5%;"><span id="goreg">注册</span> / <span id="gologin">登录</span> </div>
118
		                    <div class="mui-pull-left "  style="color:#797979; margin: 10% 5%;"><span id="goreg">注册</span> / <span id="gologin">登录</span> </div>
119
		                </a>
119
		                </a>
120
		                <div class="mui-pull-right updatebtn">
121
			        		<a class="editbox" id="editbox">
122
			        			<!--<img src="../images/edit.png" />-->
123
			        			<span class="mui-icon iconfont icon-edit"></span>
124
			        		</a>
125
			        	</div>
120
		              
126
			        </div>
121
			        </div>
127
		        </div>
122
		        </div>
128
		        <ul class="mui-table-view">
123
		        <ul class="mui-table-view">
172
				        	<span class="mui-pull-left">我的关注</span>
167
				        	<span class="mui-pull-left">我的关注</span>
173
				        </a>
168
				        </a>
174
				    </li>
169
				    </li>
175
				    <li class="mui-table-view-cell">
170
				   <!-- <li class="mui-table-view-cell">
176
				        <a class="mui-navigate-right">
171
				        <a class="mui-navigate-right">
177
				        	<em class="mui-icon iconfont icon-friendfavor actionicon addicon mui-pull-left"></em>
172
				        	<em class="mui-icon iconfont icon-friendfavor actionicon addicon mui-pull-left"></em>
178
				        	<span class="mui-pull-left">邀请新用户</span>
173
				        	<span class="mui-pull-left">邀请新用户</span>
179
				        </a>
174
				        </a>
180
				    </li> 
175
				    </li> -->
181
				</ul>
176
				</ul>
182
		    </div>
177
		    </div>
183
		    <div class="mui-input-group  marginbox">
178
		    <div class="mui-input-group  marginbox">

+ 2 - 13
app/html/search-home.html

87
		mui(".hotsearch").on('tap', 'li', function() {
87
		mui(".hotsearch").on('tap', 'li', function() {
88
			plus.nativeUI.showWaiting();
88
			plus.nativeUI.showWaiting();
89
			key = this.innerHTML;
89
			key = this.innerHTML;
90
			mui.openWindow({
91
				url: '../html/search.html',
92
				id: '../html/search.html',
93
				show:{
94
			      autoShow:false,
95
			      aniShow:"fade-in",
96
			    },
97
				extras:{
98
			      key:key,
99
			      bigClass:bigClass
100
			    }
101
			});
102
			
90
			plus.nativeUI.showWaiting();//显示原生等待框
91
            plus.webview.create("../html/search.html",'search.html',{},{key:key,bigClass:bigClass});
103
		});
92
		});
104
		/*按键字搜索*/
93
		/*按键字搜索*/
105
		searchval.addEventListener("keyup", function() {
94
		searchval.addEventListener("keyup", function() {

+ 0 - 13
app/html/search.html

31
    <!-- 主页面内容容器 -->
31
    <!-- 主页面内容容器 -->
32
    <div class="mui-content">
32
    <div class="mui-content">
33
    	
33
    	
34
    	<!--<div class="filterbox" style=" position: fixed; z-index:1; top:45px; width:100%">
35
			<ul class="filterblock" style="width:100%">
36
				<li style="width:33.3333%;">
37
					<a href="#middlePopovercity" class="mui-btn mui-btn-block mui-btn-outlined filterlist2 mui-ellipsis"><span id="addressid">全国</span><em class="mui-icon mui-icon-arrowdown"></em></a>	
38
				</li>
39
				<li style="width:33.3333%;">
40
					<a href="#middlePopoveracad" class="mui-btn mui-btn-block mui-btn-outlined filterlist2 mui-ellipsis"><span id="subjectid">学术领域</span><em class="mui-icon mui-icon-arrowdown"></em></a>
41
				</li>
42
				<li style="width:33.3333%;">
43
					<a href="#middlePopoveruse" class="mui-btn mui-btn-block mui-btn-outlined filterlist2 mui-ellipsis"><span id="industryid">应用行业</span><em class="mui-icon mui-icon-arrowdown"></em></a>
44
				</li>
45
			</ul>
46
		</div>-->
47
		
34
		
48
		<div class="filterbox" style=" position: fixed; z-index:1; top:45px; width:100%">
35
		<div class="filterbox" style=" position: fixed; z-index:1; top:45px; width:100%">
49
			<ul class="filterblock" style="width:100%">
36
			<ul class="filterblock" style="width:100%">

+ 2 - 2
app/html/security.html

42
				    </li>
42
				    </li>
43
				</ul>
43
				</ul>
44
		    </div>
44
		    </div>
45
		    <div class="mui-input-group marginbox">
45
		    <!--<div class="mui-input-group marginbox">
46
				<ul class="mui-table-view">
46
				<ul class="mui-table-view">
47
				    <li class="mui-table-view-cell">
47
				    <li class="mui-table-view-cell">
48
				        <a class="mui-navigate-right">
48
				        <a class="mui-navigate-right">
63
				        </a>
63
				        </a>
64
				    </li>
64
				    </li>
65
				</ul>
65
				</ul>
66
		    </div>
66
		    </div>-->
67
		    <div class="mui-input-group marginbox">
67
		    <div class="mui-input-group marginbox">
68
				<ul class="mui-table-view">
68
				<ul class="mui-table-view">
69
				    <li class="mui-table-view-cell">
69
				    <li class="mui-table-view-cell">

+ 2 - 3
app/html/setup.html

24
				    </li>
24
				    </li>
25
				</ul>
25
				</ul>
26
		    </div>
26
		    </div>
27
		    <div class="mui-input-group marginbox" style="margin-bottom: 4px;">
27
		    <!--<div class="mui-input-group marginbox" style="margin-bottom: 4px;">
28
				<ul class="mui-table-view">
28
				<ul class="mui-table-view">
29
				    <li class="mui-table-view-cell">
29
				    <li class="mui-table-view-cell">
30
				        <a class="mui-navigate-right rightnone" href="setup.html">
30
				        <a class="mui-navigate-right rightnone" href="setup.html">
31
				        	<span class="mui-pull-left">推送消息设置</span>
31
				        	<span class="mui-pull-left">推送消息设置</span>
32
				        	<div class="mui-pull-right">
32
				        	<div class="mui-pull-right">
33
				        		<!-- 开关打开状态 -->
34
								<div class="mui-switch mui-switch-mini witchbg mui-active">
33
								<div class="mui-switch mui-switch-mini witchbg mui-active">
35
								   <div class="mui-switch-handle"></div>
34
								   <div class="mui-switch-handle"></div>
36
								</div>
35
								</div>
41
		    </div>
40
		    </div>
42
		    <div class="marginbox litlabel" style="margin:0 10px 20px 10px;">
41
		    <div class="marginbox litlabel" style="margin:0 10px 20px 10px;">
43
		    	<span class="listtit2">有新的咨询或回复时通知您</span>
42
		    	<span class="listtit2">有新的咨询或回复时通知您</span>
44
		    </div>
43
		    </div>-->
45
		    <div class="mui-input-group marginbox">
44
		    <div class="mui-input-group marginbox">
46
				<ul class="mui-table-view">
45
				<ul class="mui-table-view">
47
				    <li class="mui-table-view-cell">
46
				    <li class="mui-table-view-cell">

+ 5 - 8
app/js/attentions.js

5
    checkedindex = 0
5
    checkedindex = 0
6
var table = document.body.querySelector('.list');
6
var table = document.body.querySelector('.list');
7
var table1 = document.body.querySelector('.list2');
7
var table1 = document.body.querySelector('.list2');
8
var deceleration = mui.os.ios?0.003:0.0009;
9
mui('.mui-scroll-wrapper').scroll({
10
	bounce: false,
11
	indicators: true, //是否显示滚动条
12
	deceleration:deceleration
13
});
8

9
//mui('.mui-scroll-wrapper').scroll({});
10

14
mui.init({
11
mui.init({
15
	pullRefresh: {
12
	pullRefresh: {
16
		container: '#pullrefresh',
13
		container: '#pullrefresh',
94
			},
91
			},
95
			dataType: 'json', //数据格式类型
92
			dataType: 'json', //数据格式类型
96
			type: 'GET', //http请求类型
93
			type: 'GET', //http请求类型
97
			timeout: 10000,
94
			//timeout: 10000,
98
			success: function(data) {
95
			success: function(data) {
99
				if(data.success && data.data.data != "") {
96
				if(data.success && data.data.data != "") {
100
					var datalist = data.data.data;
97
					var datalist = data.data.data;
122
			},
119
			},
123
			dataType: 'json', //数据格式类型
120
			dataType: 'json', //数据格式类型
124
			type: 'GET', //http请求类型
121
			type: 'GET', //http请求类型
125
			timeout: 10000,
122
			//timeout: 10000,
126
			success: function(data) {
123
			success: function(data) {
127
				plus.nativeUI.closeWaiting();
124
				plus.nativeUI.closeWaiting();
128
				plus.webview.currentWebview().show("slide-in-right", 150);
125
				plus.webview.currentWebview().show("slide-in-right", 150);

+ 31 - 7
app/js/bindmail.js

4
	var inputEmail = document.getElementById("inputemail");
4
	var inputEmail = document.getElementById("inputemail");
5
	var sendCode = document.getElementById("sendcode");
5
	var sendCode = document.getElementById("sendcode");
6

6

7
	/*发送按钮*/
8
	sendCode.addEventListener("tap", function() {
9
		userEmail();
10
	});
11

12
	mui.plusReady(function() {
7
	mui.plusReady(function() {
8
		
9
		/*发送按钮*/
10
		sendCode.addEventListener("tap", function() {
11
			userEmail();
12
		});
13

13

14
		/*校验用户账号*/
14
		/*校验用户账号*/
15
		function userEmail() {
15
		function userEmail() {
16
			var gunf = /^\w+@\w+\.((cn)|(com)|(com\.cn))$/;
16
			var gunf = /^\w+@\w+\.((cn)|(com)|(com\.cn))$/;
17
			if(gunf.test(inputEmail.value)) {
17
			if(gunf.test(inputEmail.value)) {
18
				sendEmail();
18
				isReg();
19
			} else {
19
			} else {
20
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
20
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
21
				return;
21
				return;
22
			}
22
			}
23
		}
23
		}
24

24

25
		/*判断账号是否注册*/
26
		function isReg() {
27
			mui.ajax(baseUrl + '/ajax/isReg?key=' + inputEmail.value, {
28
				dataType: 'json', //数据格式类型
29
				type: 'GET', //http请求类型
30
				timeout: 10000, //超时设置
31
				async: false,
32
				success: function(data) {
33
					console.log(data.data);
34
					if(data.data == false) {
35
						plus.nativeUI.toast("您的邮箱已被绑定", toastStyle);
36
						return;
37
					} else {
38
						sendEmail();
39
					}
40
				},
41
				error: function() {
42
					plus.nativeUI.toast("服务器链接超时", toastStyle);
43
				}
44
			});
45
		}
46

25
		/*判断账号是否注册*/
47
		/*判断账号是否注册*/
26
		function sendEmail() {
48
		function sendEmail() {
27
			var userId = plus.storage.getItem('userid');
49
			var userId = plus.storage.getItem('userid');
36
				success: function(data) {
58
				success: function(data) {
37
					if(data.success && data.data) {
59
					if(data.success && data.data) {
38
						plus.nativeUI.toast("发送成功,请登录邮箱验证", toastStyle);
60
						plus.nativeUI.toast("发送成功,请登录邮箱验证", toastStyle);
39
						return;
40
						mui.currentWebview.close();
61
						mui.currentWebview.close();
62
						return;
41
					}
63
					}
42
				},
64
				},
43
				error: function() {
65
				error: function() {
47
			});
69
			});
48
		}
70
		}
49

71

72
	
73
	
50
	});
74
	});
51

75

52
});
76
});

+ 4 - 5
app/js/bindphone.js

170
					console.log(data.data);
170
					console.log(data.data);
171
					if(data.success && data.data) {
171
					if(data.success && data.data) {
172
						plus.nativeUI.toast("手机绑定成功", toastStyle);
172
						plus.nativeUI.toast("手机绑定成功", toastStyle);
173
						var securityPage = plus.webview.getWebviewById('html/security.html');
174
						mui.fire(securityPage, 'closeUser', {
175
							phoneName: phoneName.value
173
						var securityPage = plus.webview.getWebviewById('../html/security.html');
174
						mui.fire(securityPage,'xsphone', {
175
							phonetel:phoneName.value
176
						});
176
						});
177
						mui.currentWebview.close();
178
						return;
177
						mui.back();
179
					}else{
178
					}else{
180
						plus.nativeUI.toast("手机绑定失败", toastStyle);
179
						plus.nativeUI.toast("手机绑定失败", toastStyle);
181
						return;
180
						return;

+ 20 - 2
app/js/fillinfo.js

8
	var userPosition = document.getElementById("userPosition");
8
	var userPosition = document.getElementById("userPosition");
9
	var userTitle = document.getElementById("userTitle");
9
	var userTitle = document.getElementById("userTitle");
10
	var goIndex = document.getElementById("goIndex");
10
	var goIndex = document.getElementById("goIndex");
11
	
11
	var dataProvince = document.getElementById("data-province");
12
	var dataAddress = document.getElementById("data-address");
13
	/*选择地址*/
14
	var cityPicker = new mui.PopPicker({layer: 2});
15
	cityPicker.setData(cityData);
16
	var showCityPickerButton = document.getElementById('showCityPicker');
17
	showCityPickerButton.addEventListener('tap', function(event) {
18
		cityPicker.show(function(items) {
19
			showCityPickerButton.value = items[0].text + " " + items[1].text;
20
			dataProvince.value = items[0].text;
21
			dataAddress.value = items[1].text;
22
			//返回 false 可以阻止选择框的关闭
23
			//return false;
24
		});
25
	}, false);
12
	mui.plusReady(function() {
26
	mui.plusReady(function() {
13
		
27
		
14
		var self = plus.webview.currentWebview();
28
		var self = plus.webview.currentWebview();
20

34

21
		/*提交个人信息*/
35
		/*提交个人信息*/
22
		goIndex.addEventListener('tap', function() {
36
		goIndex.addEventListener('tap', function() {
37
			var d = document.getElementById('showCityPicker').value;
23
			goVal();
38
			goVal();
24
		});
39
		});
25

40

29
			$data.orgName = userMechanism.value;
44
			$data.orgName = userMechanism.value;
30
			$data.title = userTitle.value;
45
			$data.title = userTitle.value;
31
			$data.department = userDepartment.value;
46
			$data.department = userDepartment.value;
32
			$data.address = userPosition.value;
47
			$data.office = userPosition.value;
48
			$data.province = dataProvince.value;
49
			$data.address = dataAddress.value;
33
			$data.id = self.userid;
50
			$data.id = self.userid;
51
			console.log(JSON.stringify($data))
34
			mui.ajax(baseUrl + '/ajax/professor', {
52
			mui.ajax(baseUrl + '/ajax/professor', {
35
				data: $data,
53
				data: $data,
36
				dataType: 'json', //数据格式类型
54
				dataType: 'json', //数据格式类型

+ 1 - 1
app/js/index.js

20
/*点击搜索按钮*/
20
/*点击搜索按钮*/
21
search.addEventListener('focus', function() {
21
search.addEventListener('focus', function() {
22
	var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框
22
	var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框
23
    webviewShow = plus.webview.create("../html/search-home.html");//后台创建webview并打开show.html
23
    webviewShow = plus.webview.create("../html/search-home.html","../html/search-home.html");//后台创建webview并打开show.html
24
    webviewShow.addEventListener("loaded", function() {
24
    webviewShow.addEventListener("loaded", function() {
25
        nwaiting.close(); //新webview的载入完毕后关闭等待框
25
        nwaiting.close(); //新webview的载入完毕后关闭等待框
26
        webviewShow.show("slide-in-right",150); //把新webview窗体显示出来,显示动画效果为速度150毫秒的右侧移入动画
26
        webviewShow.show("slide-in-right",150); //把新webview窗体显示出来,显示动画效果为速度150毫秒的右侧移入动画

+ 6 - 5
app/js/myaccount.js

19
		loginStatus();
19
		loginStatus();
20

20

21
		/*用户信息初始化*/
21
		/*用户信息初始化*/
22
		userInformation()
22
		userInformation();
23

23

24
		/*登录按钮*/
24
		/*登录按钮*/
25
		goLogin.addEventListener('tap', function() {
25
		goLogin.addEventListener('tap', function() {
29
		/*注册按钮*/
29
		/*注册按钮*/
30
		goReg.addEventListener('tap', function() {
30
		goReg.addEventListener('tap', function() {
31
			goRegFun();
31
			goRegFun();
32

33
		})
32
		})
34

33

35
		/*退出登录刷新页面*/
34
		/*退出登录刷新页面*/
105
				dataType: 'json', //数据格式类型
104
				dataType: 'json', //数据格式类型
106
				type: 'GET', //http请求类型
105
				type: 'GET', //http请求类型
107
				timeout: 10000, //超时设置
106
				timeout: 10000, //超时设置
107
				async:true,
108
				success: function(data) {
108
				success: function(data) {
109
					
109
					var $info = data.data || {}
110
					var $info = data.data || {}
110
					if(data.success && data.data) {
111
					if(data.success && data.data) {
111
						document.getElementById("userName").innerText = $info.name || '';
112
						document.getElementById("userName").innerText = $info.name || '';
115
						var userMechanism = document.getElementById("userMechanism");
116
						var userMechanism = document.getElementById("userMechanism");
116
						var userCity = document.getElementById("userCity");
117
						var userCity = document.getElementById("userCity");
117
						var zixunOk = document.getElementById("zixunOk");
118
						var zixunOk = document.getElementById("zixunOk");
118
						
119
					
119
						($info.title != '') ? userTitle.innerText = $info.title : userTitle.innerText = '';
120
						($info.title != '') ? userTitle.innerText = $info.title : userTitle.innerText = '';
120
						($info.office != '') ? userPosition.innerText = " , " +  $info.office  : userPosition.innerText = '';
121
						($info.office != '') ? userPosition.innerText = " , " +  $info.office  : userPosition.innerText = '';
121
						($info.department != '') ? userDepartment.innerText = $info.department : userDepartment.innerText = '';
122
						($info.department != '') ? userDepartment.innerText = $info.department : userDepartment.innerText = '';
129
							start[i].classList.add("icon-favorfill");
130
							start[i].classList.add("icon-favorfill");
130
						}
131
						}
131
						if($info.hasHeadImage == 1) {
132
						if($info.hasHeadImage == 1) {
132
							document.getElementById("userImg").setAttribute("src", "../images/head/" + $info.id + "_m.jpg");
133
							document.getElementById("userImg").setAttribute("src", baseUrl + "/images/head/" + $info.id + "_m.jpg");
133
						} else {
134
						} else {
134
							document.getElementById("userImg").setAttribute("src", "../images/default-photo.jpg");
135
							document.getElementById("userImg").setAttribute("src", baseUrl +  "/images/default-photo.jpg");
135
						}
136
						}
136
						if($info.authentication) {
137
						if($info.authentication) {
137
							document.querySelector('.authicon').style.display = "inline";
138
							document.querySelector('.authicon').style.display = "inline";

+ 25 - 4
app/js/searchhome.js

28
			up: {
28
			up: {
29
				contentrefresh: '正在加载...',
29
				contentrefresh: '正在加载...',
30
				callback: pullupRefresh,
30
				callback: pullupRefresh,
31
				auto:true
31
				//auto:true
32
			}
32
			}
33
		}
33
		}
34
});
34
});
123
	console.log(province);
123
	console.log(province);
124
	console.log(authentication);*/
124
	console.log(authentication);*/
125
		plus.nativeUI.showWaiting();
125
		plus.nativeUI.showWaiting();
126

126
        
127
		expert(key, subject, industry, province, address, authentication, 10, 1);
127
		expert(key, subject, industry, province, address, authentication, 10, 1);
128
	}
128
	}
129
})
129
})
252
			timeout: 10000,
252
			timeout: 10000,
253
			success: function(data) {
253
			success: function(data) {
254
				table.innerHTML = '';
254
				table.innerHTML = '';
255
				plus.nativeUI.closeWaiting();
256
				plus.webview.currentWebview().show("slide-in-right",150);
255
				plus.webview.currentWebview().show("slide-in-right",150);
256
				plus.nativeUI.closeWaiting();
257
				var perrid = plus.webview.getWebviewById('../html/search-home.html');
258
				if(perrid){
259
				  setTimeout(function() {
260
					 perrid.close();
261
				   }, 1000);
262
				}
257
				if(data.success && data.data.data != '') {
263
				if(data.success && data.data.data != '') {
258
					var datalist = data.data.data;
264
					var datalist = data.data.data;
259
					console.log(data.data.total)
265
					console.log(data.data.total)
260
					datalistEach(datalist);
266
					datalistEach(datalist);
261
					mui('#pullrefresh').pullRefresh().refresh(true);
267
					mui('#pullrefresh').pullRefresh().refresh(true);
262
	                mui('#pullrefresh').pullRefresh().scrollTo(0,0,0);
268
	                mui('#pullrefresh').pullRefresh().scrollTo(0,0);
269
	                if(data.data.total<data.data.pageSize){
270
	                	mui('#pullrefresh').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新	
271
	                }
263
				} else {
272
				} else {
264
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
273
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
274
					mui('#pullrefresh').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新
265
				}
275
				}
276
				
266
			},
277
			},
267
			error: function() {
278
			error: function() {
268
				plus.nativeUI.toast("服务器链接超时", toastStyle);
279
				plus.nativeUI.toast("服务器链接超时", toastStyle);
287
				table.innerHTML = '';
298
				table.innerHTML = '';
288
				plus.nativeUI.closeWaiting();
299
				plus.nativeUI.closeWaiting();
289
				plus.webview.currentWebview().show("slide-in-right",150);
300
				plus.webview.currentWebview().show("slide-in-right",150);
301
				var perrid = plus.webview.getWebviewById('../html/search-home.html');
302
				if(perrid){
303
				  setTimeout(function() {
304
					 perrid.close();
305
				   }, 1000);
306
				}
290
				if(data.success && data.data.data != '') {
307
				if(data.success && data.data.data != '') {
291
					var datalist = data.data.data;
308
					var datalist = data.data.data;
292
					resourcesEach(datalist);
309
					resourcesEach(datalist);
293
					mui('#pullrefresh').pullRefresh().refresh(true);
310
					mui('#pullrefresh').pullRefresh().refresh(true);
294
	                mui('#pullrefresh').pullRefresh().scrollTo(0,0,0);
311
	                mui('#pullrefresh').pullRefresh().scrollTo(0,0,0);
312
	                if(data.data.total<data.data.pageSize){
313
	                	mui('#pullrefresh').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新	
314
	                }
295
				} else {
315
				} else {
296
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
316
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
317
					mui('#pullrefresh').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新
297
				}
318
				}
298
			},
319
			},
299
			error: function() {
320
			error: function() {

+ 117 - 116
app/js/security.js

1
//注册信息
1
//注册信息
2
mui.ready(function() {
3

4
	/*定义全局变量*/
5
	var bdPhone = document.getElementById("bdPhone");
6
	var bdEmail = document.getElementById("bdEmail");
7
	var changePass = document.getElementById("changepass");
8
	var phoneName = document.getElementById("phonename");
9
	var emailName = document.getElementById("emailname");
10
	var verified = document.getElementById("verified");
11
	var phoneCookie = "";
12
	var emailCookie = "";
13

14
	mui.plusReady(function() {
15
		
16
		isAuthentication();
17
		
18
		lookup();
19
		
20
		/*退出绑定手机页面*/
21
        window.addEventListener('securityPage',function(event){
22
		    phoneName = event.detail.id;
23
		    ifPhoneAmdEmail(phoneCookie)
24
		})
25
		
26
		
27
		
28
		bdEmail.addEventListener('tap', function() {
29
			mui.openWindow({
30
				url: '../html/bindmail.html',
31
				id: '../html/bindmail.html',
32
				show: {
33
					aniShow: "slide-in-right"
34
				}
35
			});
36
		})
37

38
		bdPhone.addEventListener('tap', function() {
39
			mui.openWindow({
40
				url: '../html/bindphone.html',
41
				id: '../html/bindphone.html',
42
				show: {
43
					aniShow: "slide-in-right"
44
				}
45
			});
46
		})
47

48
		changePass.addEventListener('tap', function() {
49
			mui.openWindow({
50
				url: '../html/changepass.html',
51
				id: '../html/changepass.html',
52
				show: {
53
					aniShow: "slide-in-right"
54
				}
55
			});
56
		})
57

58
		function ifPhoneAmdEmail(){
59
			/*判断是否绑定了手机号*/
60
			if(phoneCookie != "" && phoneCookie != null && phoneCookie != "null") {
61
				/*phoneName.innerText = (phoneCookie.substring(0, 3) + "****" + phoneCookie.substring(7, 11));*/
62
				 phoneName.innerText = (phoneCookie);
63
			} else {
64
				phoneName.innerText = ("请绑定手机号");
2
var bdPhone = document.getElementById("bdPhone");
3
var bdEmail = document.getElementById("bdEmail");
4
var changePass = document.getElementById("changepass");
5
var phoneName = document.getElementById("phonename");
6
var emailName = document.getElementById("emailname");
7
var verified = document.getElementById("verified");
8
var phoneCookie = "";
9
var emailCookie = "";
10

11
/*退出绑定手机页面*/
12
window.addEventListener('xsphone', function(event) {
13
	phoneCookie = event.detail.phonetel;
14
	phoneName.innerText = phoneCookie;
15
})
16

17
mui.plusReady(function() {
18

19
	isAuthentication();
20

21
	lookup();
22

23
	bdEmail.addEventListener('tap', function() {
24
		mui.openWindow({
25
			url: '../html/bindmail.html',
26
			id: '../html/bindmail.html',
27
			show: {
28
				aniShow: "slide-in-right"
65
			}
29
			}
66
	
67
			/*判断是否绑定了邮箱*/
68
			if(emailCookie != "" && emailCookie != null && emailCookie != "null") {
69
				emailName.innerText = (emailCookie);
70
			} else {
71
				emailName.innerText = ("请绑定邮箱");
30
		});
31
	})
32

33
	bdPhone.addEventListener('tap', function() {
34
		mui.openWindow({
35
			url: '../html/bindphone.html',
36
			id: '../html/bindphone.html',
37
			show: {
38
				aniShow: "slide-in-right"
72
			}
39
			}
40
		});
41
	})
42

43
	changePass.addEventListener('tap', function() {
44
		mui.openWindow({
45
			url: '../html/changepass.html',
46
			id: '../html/changepass.html',
47
			show: {
48
				aniShow: "slide-in-right"
49
			}
50
		});
51
	})
52

53
	function ifPhoneAmdEmail() {
54

55
		/*判断是否绑定了手机号*/
56
		if(phoneCookie) {
57
			/*phoneName.innerText = (phoneCookie.substring(0, 3) + "****" + phoneCookie.substring(7, 11));*/
58
			phoneName.innerText = phoneCookie;
59

60
		} else {
61

62
			phoneName.innerText = "请绑定手机号";
63

73
		}
64
		}
74

65

75
		function isAuthentication() {
76
			var userId = plus.storage.getItem('userid');
77
			mui.ajax(baseUrl + "/ajax/professor/editBaseInfo/" + userId, {
78
				dataType: 'json', //数据格式类型
79
				type: 'GET', //http请求类型
80
				timeout: 10000, //超时设置
81
				async: false,
82
				success: function(data) {
83
					var $info = data.data || {}
84
					if(data.success && data.data) {
85
						if($info.authentication){
86
							verified.innerText="已认证";
87
						}else{
88
							verified.innerText="为认证";
89
						}
90
					}
91
				},
92
				error: function() {
93
					plus.nativeUI.toast("服务器链接超时", toastStyle);
94
					return;
95
				}
96
			});
66
		/*判断是否绑定了邮箱*/
67
		if(emailCookie != "" && emailCookie != null && emailCookie != "null") {
68
			emailName.innerText = emailCookie;
69

70
		} else {
71
			emailName.innerText = "请绑定邮箱";
72

97
		}
73
		}
98
        
99
        function lookup() {
100
			var userId = plus.storage.getItem('userid');
101
			mui.ajax(baseUrl + "/ajax/qaUser" , {
102
				data:{
103
					id:userId
104
				},
105
				dataType: 'json', //数据格式类型
106
				type: 'GET', //http请求类型
107
				timeout: 10000, //超时设置
108
				async: false,
109
				success: function(data) {
110
					var $info = data.data || {}
111
					if(data.success && $info) {
112
						emailCookie = $info.email;
113
						phoneCookie = $info.mobilePhone;
114
                        ifPhoneAmdEmail(phoneCookie,emailCookie)					
74
	}
75

76
	function isAuthentication() {
77
		var userId = plus.storage.getItem('userid');
78
		mui.ajax(baseUrl + "/ajax/professor/editBaseInfo/" + userId, {
79
			dataType: 'json', //数据格式类型
80
			type: 'GET', //http请求类型
81
			timeout: 10000, //超时设置
82
			async: false,
83
			success: function(data) {
84
				var $info = data.data || {}
85
				if(data.success && data.data) {
86
					if($info.authentication) {
87
						verified.innerText = "已认证";
88
					} else {
89
						verified.innerText = "未认证";
115
					}
90
					}
116
				},
117
				error: function() {
118
					plus.nativeUI.toast("服务器链接超时", toastStyle);
119
					return;
120
				}
91
				}
121
			});
122
		}
92
			},
93
			error: function() {
94
				plus.nativeUI.toast("服务器链接超时", toastStyle);
95
				return;
96
			}
97
		});
98
	}
123

99

124
	})
100
	function lookup() {
101
		var userId = plus.storage.getItem('userid');
102
		mui.ajax(baseUrl + "/ajax/qaUser", {
103
			data: {
104
				id: userId
105
			},
106
			dataType: 'json', //数据格式类型
107
			type: 'GET', //http请求类型
108
			timeout: 10000, //超时设置
109
			async: true,
110
			success: function(data) {
111
				plus.webview.currentWebview().show("slide-in-right", 150);
112
				plus.nativeUI.closeWaiting();
113
				var $info = data.data || {}
114
				if(data.success && $info) {
115
					emailCookie = $info.email;
116
					phoneCookie = $info.mobilePhone;
117
					ifPhoneAmdEmail();
118
				}
119
			},
120
			error: function() {
121
				plus.nativeUI.toast("服务器链接超时", toastStyle);
122
				return;
123
			}
124
		});
125
	}
125

126

126
});
127
})

+ 2 - 7
app/js/setup.js

6
	var security = document.getElementById("security");
6
	var security = document.getElementById("security");
7
	
7
	
8
	security.addEventListener('tap',function(){
8
	security.addEventListener('tap',function(){
9
		mui.openWindow({
10
			url: '../html/security.html',
11
			id: '../html/security.html',
12
			show: {
13
				aniShow: "slide-in-right"
14
			}
15
		});
9
		plus.nativeUI.showWaiting();//显示原生等待框
10
        webviewShow = plus.webview.create("../html/security.html","../html/security.html");
16
	});
11
	});
17

12

18
	/*退出按钮*/
13
	/*退出按钮*/