style:登录
Showing
7 changed files
with
217 additions
and
108 deletions
1 | <!DOCTYPE html | 1 | <!DOCTYPE html |
2 | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 | <html xmlns="http://www.w3.org/1999/xhtml"> | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
4 | |||
4 | <head> | 5 | <head> |
5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 6 | <meta charset='UTF-8'> |
6 | <title>网上“一窗办事”登记系统</title> | 7 | <title>网上“一窗办事”登记系统</title> |
7 | <link type="text/css" rel="stylesheet" href="./staticCss/common.css" /> | 8 | <meta name='copyright' content=' ® 技术支持 All Rights Reserved' /> |
8 | <link type="text/css" rel="stylesheet" href="./staticCss/pageHome.css" /> | 9 | <meta name='robots' content='index,follow' /> |
9 | <script type="text/javascript" src="./staticJs/head.js"></script> | 10 | <meta name='googlebot' content='index,follow,archive' /> |
11 | <link rel='alternate icon' type='image/png' href='/staticImages/logo-realestate.png'> | ||
12 | <link rel='icon' href='favicon.ico' type='image/x-ico' /> | ||
13 | <meta name='description' content='' /> | ||
14 | <meta name='Keywords' content='' /> | ||
15 | <link type="text/css" rel="stylesheet" href="/staticLib/layui/css/layui.css" /> | ||
16 | <link type="text/css" rel="stylesheet" href="/staticCss/common.css" /> | ||
17 | <link type="text/css" rel="stylesheet" href="/staticCss/header.css" /> | ||
18 | <link type="text/css" rel="stylesheet" href="/staticCss/pageHome.css" /> | ||
10 | </head> | 19 | </head> |
11 | |||
12 | <body> | 20 | <body> |
21 | <div class='home-sticky'> | ||
22 | <div class='top-logo'> | ||
23 | <div class='top_logo_content'> | ||
24 | <h1><a href='/index.html'><img src='/staticImages/logo.png' alt='西安市不动产登记平台' /></a></h1> | ||
25 | <div class='top_logo_search'> | ||
26 | <input type='text' name='title' required lay-verify='required' placeholder='请输入关键字搜索' | ||
27 | autocomplete='off' class='layui-input'> | ||
28 | <img class='search_img' src='/staticImages/search.png'> | ||
29 | </div> | ||
30 | <ul class='login layui-nav login-con'> | ||
31 | <span class='loginButton' id="login">登录</span> | ||
32 | <p class='loginButton register' id='register'><a href='/staticViews/register.html'>注册</a></p> | ||
33 | </ul> | ||
34 | </div> | ||
35 | </div> | ||
36 | <div class='layui-nav navigation layui-bg-blue'> | ||
37 | <ul class="navigation-content"> | ||
38 | <li id='index' class='layui-nav-item'><a href='/index.html' title='首页'>首页</a></li> | ||
39 | <li id='news' class='layui-nav-item'><a href='/staticViews/xwdt.html' title='新闻动态'>新闻动态</a></li> | ||
40 | <li id='zwgk' class='layui-nav-item'> | ||
41 | <a href='javascript:;'>政务公开</a> | ||
42 | <dl class='layui-nav-child'> | ||
43 | <dd><a href='/staticViews/xyzc.html'>相应政策</a></dd> | ||
44 | <dd><a href='/staticViews/flfg.html'>法律法规</a></dd> | ||
45 | <dd><a href='/staticViews/gsgg.html'>公示公告</a></dd> | ||
46 | </dl> | ||
47 | </li> | ||
48 | <li id='bszn' class='layui-nav-item'><a href='/staticViews/bszn.html' | ||
49 | title='办事指南'>办事指南</a></li> | ||
50 | <li id='wssq' class='layui-nav-item'><a href='/staticViews/wssq.html' | ||
51 | title='网上申请'>网上申请</a></li> | ||
52 | <li class='layui-nav-item'> | ||
53 | <a href='javascript:;'>查验中心</a> | ||
54 | <dl class='layui-nav-child'> | ||
55 | <!-- 二级菜单 --> | ||
56 | <dd><a href='/staticViews/convenienceService/fileQuery.html'>档案查询</a></dd> | ||
57 | <dd><a href='/staticViews/convenienceService/recordInquiry.html'>合同备案查询</a> | ||
58 | </dd> | ||
59 | <dd><a href='/staticViews/convenienceService/certificateVerification.html'>证书核验</a> | ||
60 | </dd> | ||
61 | </dl> | ||
62 | </li> | ||
63 | <li id='zxjf' class='layui-nav-item'><a href='/staticViews/zxjf.html'>在线缴费</a></li> | ||
64 | <li id='evaluate' class='layui-nav-item'><a | ||
65 | href='/staticViews/evaluate.html'>好差评</a></li> | ||
66 | </ul> | ||
67 | </div> | ||
68 | </div> | ||
69 | <!-- 轮播 --> | ||
13 | <div class="homeindex"> | 70 | <div class="homeindex"> |
14 | <div class="banner"> | 71 | <div class="banner"> |
15 | <div class="layui-carousel" id="banner_swiper"> | 72 | <div class="layui-carousel" id="banner_swiper"> |
... | @@ -372,7 +429,12 @@ | ... | @@ -372,7 +429,12 @@ |
372 | </div> | 429 | </div> |
373 | </div> | 430 | </div> |
374 | </body> | 431 | </body> |
432 | <script src='https://at.alicdn.com/t/font_2174584_uxkon9mpq1.js'></script> | ||
433 | <script type="text/javascript" src="/staticLib/jquery/jquery.min.js"></script> | ||
434 | <script type="text/javascript" src="/staticLib/layui/layui.js"></script> | ||
435 | <script type="text/javascript" src="/staticJs/login.js"></script> | ||
436 | <script type="text/javascript" src="/staticJs/common.js"></script> | ||
437 | <script type="text/javascript" src="/staticJs/header.js"></script> | ||
375 | <script type="text/javascript" src="./staticJs/down.js"></script> | 438 | <script type="text/javascript" src="./staticJs/down.js"></script> |
376 | <script type="text/javascript" src="./staticJs/common.js"></script> | ||
377 | <script type="text/javascript" src="./staticJs/pageHome.js"></script> | 439 | <script type="text/javascript" src="./staticJs/pageHome.js"></script> |
378 | </html> | 440 | </html> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -202,32 +202,14 @@ div.footer .system_service ul li a:hover { | ... | @@ -202,32 +202,14 @@ div.footer .system_service ul li a:hover { |
202 | .layui-layer-btn { | 202 | .layui-layer-btn { |
203 | text-align: center; | 203 | text-align: center; |
204 | } | 204 | } |
205 | .login-con { | ||
206 | background-color: #fff!important; | ||
207 | } | ||
208 | .loginSelect { | 205 | .loginSelect { |
209 | position: relative; | 206 | position: relative; |
210 | top: -5px; | 207 | top: -5px; |
211 | cursor: pointer; | 208 | cursor: pointer; |
212 | } | 209 | } |
213 | .loginSelect p { | ||
214 | font-size: 16px; | ||
215 | display: inline-block; | ||
216 | } | ||
217 | .layui-nav * { | 210 | .layui-nav * { |
218 | font-size: 16px; | 211 | font-size: 16px; |
219 | } | 212 | } |
220 | .register { | ||
221 | position: relative; | ||
222 | margin-left: 12px; | ||
223 | } | ||
224 | .register::before { | ||
225 | content: ''; | ||
226 | position: absolute; | ||
227 | left: -9px; | ||
228 | height: 10px; | ||
229 | border-left: 1px solid #b1afaf; | ||
230 | } | ||
231 | .not-select{ | 213 | .not-select{ |
232 | -moz-user-select:none; /*火狐*/ | 214 | -moz-user-select:none; /*火狐*/ |
233 | -webkit-user-select:none; /*webkit浏览器*/ | 215 | -webkit-user-select:none; /*webkit浏览器*/ |
... | @@ -235,11 +217,6 @@ div.footer .system_service ul li a:hover { | ... | @@ -235,11 +217,6 @@ div.footer .system_service ul li a:hover { |
235 | -khtml-user-select:none; /*早期浏览器*/ | 217 | -khtml-user-select:none; /*早期浏览器*/ |
236 | user-select:none; | 218 | user-select:none; |
237 | } | 219 | } |
238 | .userImage { | ||
239 | position: relative; | ||
240 | top: 2px; | ||
241 | left: -3px; | ||
242 | } | ||
243 | .isLogin { | 220 | .isLogin { |
244 | position: relative; | 221 | position: relative; |
245 | top: 18px!important; | 222 | top: 18px!important; | ... | ... |
... | @@ -43,6 +43,7 @@ div.top-logo { | ... | @@ -43,6 +43,7 @@ div.top-logo { |
43 | padding-top: 20px; | 43 | padding-top: 20px; |
44 | margin: 0 auto; | 44 | margin: 0 auto; |
45 | background-color: #ffffff; | 45 | background-color: #ffffff; |
46 | white-space: nowrap; | ||
46 | } | 47 | } |
47 | 48 | ||
48 | div.top-logo ::-webkit-input-placeholder { /* WebKit browsers */ | 49 | div.top-logo ::-webkit-input-placeholder { /* WebKit browsers */ |
... | @@ -74,19 +75,15 @@ div.top-logo .top_logo_search input { | ... | @@ -74,19 +75,15 @@ div.top-logo .top_logo_search input { |
74 | border-radius: 50px; | 75 | border-radius: 50px; |
75 | border: 1.5px solid #CBCBCB; | 76 | border: 1.5px solid #CBCBCB; |
76 | padding-left: 15px; | 77 | padding-left: 15px; |
78 | margin-top: 6px; | ||
77 | } | 79 | } |
78 | .search_img { | 80 | .search_img { |
79 | width: 13px; | 81 | width: 13px; |
80 | height: 13px; | 82 | height: 13px; |
81 | position: absolute; | 83 | position: absolute; |
82 | top: 11px; | 84 | top: 17px; |
83 | right: 19px; | 85 | right: 19px; |
84 | } | 86 | } |
85 | div.top-logo .login { | ||
86 | float: right; | ||
87 | position: relative; | ||
88 | top: -5px; | ||
89 | } | ||
90 | .login li { | 87 | .login li { |
91 | color: #6D7278; | 88 | color: #6D7278; |
92 | font-size: 16px; | 89 | font-size: 16px; |
... | @@ -115,32 +112,42 @@ div.top-logo .top_logo_search i { | ... | @@ -115,32 +112,42 @@ div.top-logo .top_logo_search i { |
115 | .top-logo ul li { | 112 | .top-logo ul li { |
116 | display: inline-block; | 113 | display: inline-block; |
117 | padding: 0 12px; | 114 | padding: 0 12px; |
115 | height: 30px; | ||
118 | } | 116 | } |
119 | 117 | .loginButton { | |
120 | .top-logo ul li:first-child { | 118 | display: inline-block; |
121 | height: 13px; | 119 | color: #4a4a4a; |
122 | line-height: 12px; | 120 | cursor: pointer; |
121 | margin-top: -6px; | ||
123 | } | 122 | } |
124 | #cancellation { | 123 | #cancellation { |
125 | cursor: pointer; | 124 | cursor: pointer; |
126 | } | 125 | } |
127 | div.navigation { | 126 | .navigation { |
128 | text-align: center; | 127 | text-align: center; |
129 | height: 59px; | 128 | height: 59px; |
130 | } | 129 | } |
131 | .navigation .layui-nav-item { | 130 | .navigation .layui-nav-item { |
132 | width: 147px!important; | 131 | width: 147px!important; |
133 | position: relative; | 132 | position: relative; |
133 | } | ||
134 | .navigation .layui-nav-item a { | ||
134 | border-right: 1px solid rgba(255,255,255, 0.1); | 135 | border-right: 1px solid rgba(255,255,255, 0.1); |
135 | border-left: 1px solid rgba(255,255,255, 0.1); | 136 | border-left: 1px solid rgba(255,255,255, 0.1); |
136 | margin-right: -1px; | 137 | margin-left: -1px; |
137 | } | 138 | } |
138 | .navigation .layui-nav-item:first-child { | 139 | .navigation .layui-nav-item:first-child a{ |
139 | border-left: 1px solid rgba(255,255,255, 0.2); | 140 | border-left: 1px solid rgba(255,255,255, 0.2); |
140 | } | 141 | } |
141 | .navigation .layui-nav-item:nth-child(8) { | 142 | .navigation .layui-nav-item:nth-child(8) a{ |
142 | border-right: 1px solid rgba(255,255,255, 0.2); | 143 | border-right: 1px solid rgba(255,255,255, 0.2); |
143 | } | 144 | } |
145 | .navigation-content { | ||
146 | width: 1200px; | ||
147 | margin: 0 auto; | ||
148 | white-space: nowrap; | ||
149 | font-size: 0; | ||
150 | } | ||
144 | .layui-bg-blue { | 151 | .layui-bg-blue { |
145 | background-color: #006CFF!important; | 152 | background-color: #006CFF!important; |
146 | } | 153 | } |
... | @@ -185,9 +192,35 @@ div.navigation { | ... | @@ -185,9 +192,35 @@ div.navigation { |
185 | font-size: 12px; | 192 | font-size: 12px; |
186 | display: none | 193 | display: none |
187 | } | 194 | } |
188 | .userInfo { | 195 | .register { |
189 | border-radius: 5px!important; | 196 | position: relative; |
190 | top: 45px!important; | 197 | margin-left: 12px; |
198 | } | ||
199 | .register::before { | ||
200 | content: ''; | ||
201 | position: absolute; | ||
202 | left: -7px; | ||
203 | height: 10px; | ||
204 | border-left: 1px solid #b1afaf; | ||
205 | top: 6px; | ||
206 | } | ||
207 | .login-con { | ||
208 | float: right; | ||
209 | background-color: #fff!important; | ||
210 | position: relative; | ||
211 | top: 17px; | ||
212 | } | ||
213 | .userImage { | ||
214 | position: relative; | ||
215 | left: -3px; | ||
216 | top: -3px; | ||
217 | } | ||
218 | .loginSelect { | ||
219 | line-height: 30px!important; | ||
220 | margin-top: -11px; | ||
221 | } | ||
222 | .loginSelect p { | ||
223 | display: inline-block; | ||
191 | } | 224 | } |
192 | .userInfo img { | 225 | .userInfo img { |
193 | width: 18px; | 226 | width: 18px; |
... | @@ -202,6 +235,8 @@ div.navigation { | ... | @@ -202,6 +235,8 @@ div.navigation { |
202 | } | 235 | } |
203 | .personalCenter { | 236 | .personalCenter { |
204 | display: inline-block; | 237 | display: inline-block; |
238 | position: relative; | ||
239 | top: -5px; | ||
205 | } | 240 | } |
206 | .personalCenter a { | 241 | .personalCenter a { |
207 | color: #006CFF; | 242 | color: #006CFF; | ... | ... |
... | @@ -9,8 +9,6 @@ document.writeln("<!DOCTYPE html>"); | ... | @@ -9,8 +9,6 @@ document.writeln("<!DOCTYPE html>"); |
9 | document.writeln("<html lang=\'en\'>"); | 9 | document.writeln("<html lang=\'en\'>"); |
10 | document.writeln(""); | 10 | document.writeln(""); |
11 | document.writeln("<head>"); | 11 | document.writeln("<head>"); |
12 | document.writeln(" <link rel=\'stylesheet\' type=\'text/css\' href=\'"+localhostPaht+"/staticLib/layui/css/layui.css\' />"); | ||
13 | document.writeln(" <link type=\'text/css\' rel=\'stylesheet\' href=\'"+localhostPaht+"/staticCss/common.css\' />"); | ||
14 | document.writeln(""); | 12 | document.writeln(""); |
15 | document.writeln("<body> "); | 13 | document.writeln("<body> "); |
16 | document.writeln(" <div class=\'footer\'> "); | 14 | document.writeln(" <div class=\'footer\'> "); |
... | @@ -86,6 +84,5 @@ document.writeln(""); | ... | @@ -86,6 +84,5 @@ document.writeln(""); |
86 | document.writeln("</body>"); | 84 | document.writeln("</body>"); |
87 | document.writeln(""); | 85 | document.writeln(""); |
88 | document.writeln("</html>"); | 86 | document.writeln("</html>"); |
89 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/jquery/jquery.min.js\'></script>"); | ||
90 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); | 87 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); |
91 | document.writeln("<script src=\'https://at.alicdn.com/t/font_2174584_uxkon9mpq1.js\'></script>"); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
88 | document.writeln(""); | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -23,7 +23,6 @@ document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/sta | ... | @@ -23,7 +23,6 @@ document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/sta |
23 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticJs/header.js\'></script>"); | 23 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticJs/header.js\'></script>"); |
24 | document.writeln("</head>"); | 24 | document.writeln("</head>"); |
25 | document.writeln(""); | 25 | document.writeln(""); |
26 | document.writeln("<body>"); | ||
27 | document.writeln("<div class='home-sticky'>"); | 26 | document.writeln("<div class='home-sticky'>"); |
28 | document.writeln(" <div class=\'top-logo\'>"); | 27 | document.writeln(" <div class=\'top-logo\'>"); |
29 | document.writeln(" <div class=\'top_logo_content\'>"); | 28 | document.writeln(" <div class=\'top_logo_content\'>"); |
... | @@ -92,8 +91,6 @@ document.writeln(" <li id='evaluate' class=\'layui-nav-item\'><a href | ... | @@ -92,8 +91,6 @@ document.writeln(" <li id='evaluate' class=\'layui-nav-item\'><a href |
92 | document.writeln(" </ul>"); | 91 | document.writeln(" </ul>"); |
93 | document.writeln(" </div> "); | 92 | document.writeln(" </div> "); |
94 | document.writeln(" </div> "); | 93 | document.writeln(" </div> "); |
95 | document.writeln("</body>"); | ||
96 | document.writeln(""); | ||
97 | document.writeln("</html>"); | 94 | document.writeln("</html>"); |
98 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); | 95 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); |
99 | document.writeln("<script src=\'https://at.alicdn.com/t/font_2174584_1j8kvwarwge.js\'></script>"); | 96 | document.writeln("<script src=\'https://at.alicdn.com/t/font_2174584_1j8kvwarwge.js\'></script>"); | ... | ... |
1 | var localhostPaht = curWwwPath.substring(0, pos); | ||
2 | function login() { | 1 | function login() { |
3 | layui.use('layer', function () { | 2 | layui.use('layer', function () { |
4 | layer.open({ | 3 | layer.open({ |
... | @@ -20,7 +19,7 @@ function login() { | ... | @@ -20,7 +19,7 @@ function login() { |
20 | }); | 19 | }); |
21 | }) | 20 | }) |
22 | } | 21 | } |
23 | $(document).on('click', '.PersonLogin', function () { | 22 | $(document).on('click', '#login', function () { |
24 | login(); | 23 | login(); |
25 | }) | 24 | }) |
26 | // 点击登陆的时候 | 25 | // 点击登陆的时候 |
... | @@ -30,17 +29,16 @@ $(document).on('click', '#loginButton', function () { | ... | @@ -30,17 +29,16 @@ $(document).on('click', '#loginButton', function () { |
30 | var password = $('#IDcard').val(); | 29 | var password = $('#IDcard').val(); |
31 | userLoginRequest.phone = username; | 30 | userLoginRequest.phone = username; |
32 | userLoginRequest.password = password; | 31 | userLoginRequest.password = password; |
33 | clicklogin(userLoginRequest); | 32 | handleLogin(userLoginRequest); |
34 | }); | 33 | }); |
35 | function fetchDataReview() { | 34 | function fetchDataReview() { |
36 | // cancellation | ||
37 | $(document).on('click', '#cancellation', function () { | 35 | $(document).on('click', '#cancellation', function () { |
38 | layui.use('layer', function () { | 36 | layui.use('layer', function () { |
39 | layer.confirm('此操作将进行注销', { | 37 | layer.confirm('此操作将进行注销', { |
40 | btn: ['是', '否'] //按钮 | 38 | btn: ['是', '否'] //按钮 |
41 | }, function () { | 39 | }, function () { |
42 | $('.loginButton').addClass('PersonLogin'); | 40 | $('.loginButton').addClass('PersonLogin'); |
43 | window.open('' + localhostPaht + '/index.html', '_self'); | 41 | window.open('/index.html', '_self'); |
44 | $('.loginAfter').hide(); | 42 | $('.loginAfter').hide(); |
45 | $('.isLogin').show(); | 43 | $('.isLogin').show(); |
46 | sessionStorage.clear() | 44 | sessionStorage.clear() |
... | @@ -55,14 +53,10 @@ function fetchDataReview() { | ... | @@ -55,14 +53,10 @@ function fetchDataReview() { |
55 | $(function () { | 53 | $(function () { |
56 | fetchDataReview(); | 54 | fetchDataReview(); |
57 | if (getItem('myCookie') && getItem('myCookie').username) { | 55 | if (getItem('myCookie') && getItem('myCookie').username) { |
58 | $('.loginButton').html(getItem('myCookie').username); | 56 | appendData(); |
59 | $('.loginButton').removeClass('PersonLogin') | 57 | $('.loginInfo').html(getItem('myCookie').username); |
60 | $('.personalCenter').addClass('show'); | ||
61 | $('.loginAfter').show(); | ||
62 | $('.isLogin').hide(); | ||
63 | } else { | 58 | } else { |
64 | $('.loginAfter').hide(); | 59 | beforeLogin(); |
65 | $('.isLogin').show(); | ||
66 | } | 60 | } |
67 | }) | 61 | }) |
68 | function delCookie() { | 62 | function delCookie() { |
... | @@ -76,10 +70,10 @@ function delCookie() { | ... | @@ -76,10 +70,10 @@ function delCookie() { |
76 | } | 70 | } |
77 | } | 71 | } |
78 | 72 | ||
79 | function clicklogin(data) { | 73 | function handleLogin(data) { |
80 | $.ajax({ | 74 | $.ajax({ |
81 | type: "post", | 75 | type: "post", |
82 | url: portal.api_url + "/protal/users/login",//路径 | 76 | url: portal.api_url + "/protal/users/login", |
83 | headers: { | 77 | headers: { |
84 | 'Content-Type': 'application/json;charset=UTF-8', | 78 | 'Content-Type': 'application/json;charset=UTF-8', |
85 | }, | 79 | }, |
... | @@ -87,12 +81,9 @@ function clicklogin(data) { | ... | @@ -87,12 +81,9 @@ function clicklogin(data) { |
87 | data: JSON.stringify(data),//***关键****** | 81 | data: JSON.stringify(data),//***关键****** |
88 | success: function (result) {//返回数据根据结果进行相应的处理 | 82 | success: function (result) {//返回数据根据结果进行相应的处理 |
89 | if (result.code == 200 && result.data !== null) { | 83 | if (result.code == 200 && result.data !== null) { |
90 | $('.loginAfter').show(); | 84 | appendData(); |
91 | $('.isLogin').hide(); | ||
92 | setItem('myCookie', result.data) | 85 | setItem('myCookie', result.data) |
93 | $('.loginButton').removeClass('PersonLogin') | 86 | $('.loginInfo').html(result.data.username); |
94 | $('.personalCenter').addClass('show'); | ||
95 | $('.loginButton').html(result.data.username); | ||
96 | layer.closeAll(); | 87 | layer.closeAll(); |
97 | } else if (result.code == 210) { | 88 | } else if (result.code == 210) { |
98 | layer.msg(result.message); | 89 | layer.msg(result.message); |
... | @@ -100,9 +91,59 @@ function clicklogin(data) { | ... | @@ -100,9 +91,59 @@ function clicklogin(data) { |
100 | } | 91 | } |
101 | }); | 92 | }); |
102 | } | 93 | } |
94 | // 登录成功之前数据操作 | ||
95 | function beforeLogin() { | ||
96 | $('.login-con').empty(); | ||
97 | $('.login-con').append('<span class="loginButton" id="login">登录</span>'+ | ||
98 | '<p class="loginButton register" id="register"><a href="/staticViews/register.html">注册</a></p>') | ||
99 | } | ||
100 | // 登录成功之后数据操作 | ||
101 | function appendData() { | ||
102 | $('.login-con').empty(); | ||
103 | $('.login-con').append( | ||
104 | '<li class="layui-nav-item sysNews">' + | ||
105 | '<p class="sysNewsItem">' + | ||
106 | '<img class="userImage" src="/staticImages/xiaoxi.png">' + | ||
107 | '<span class="sysNewsNum">12</span>' + | ||
108 | '</p>' + | ||
109 | '<dl class="layui-nav-child sysNewsList">' + | ||
110 | '<div class="sysNewsTitle">最新消息</div>' + | ||
111 | '<div class="sysNewsOperation">' + | ||
112 | '<span>全部标记为已阅</span><a href="/staticViews/sysnews-center.html">查看全部</a>' + | ||
113 | '</div>' + | ||
114 | '<dd>' + | ||
115 | '<a>' + | ||
116 | '<p class="newsDetail ellipsis">您申请办理的XXX业务已成功提交您申请办理的XXX业务已成功提交</p>' + | ||
117 | '<div class="newsDetail-time"><span>2020-12-32</span> <span>已读</span></div>' + | ||
118 | '</a>' + | ||
119 | '</dd>' + | ||
120 | '<dd>' + | ||
121 | '<a>' + | ||
122 | '<p class="newsDetail ellipsis">您申请办理的XXX业务已成功提交您申请办理的XXX业务已成功提交</p>' + | ||
123 | '<div class="newsDetail-time"><span>2020-12-32</span> <span>已读</span></div>' + | ||
124 | '</a>' + | ||
125 | '</dd>' + | ||
126 | '</dl>' + | ||
127 | '</li>' + | ||
128 | '<img class="userImage" src="/staticImages/user.png">' + | ||
129 | '<p class="personalCenter"><a href="/staticViews/grzx.html">个人中心</a></p>' + | ||
130 | '<li class="layui-nav-item loginSelect">' + | ||
131 | '<p class="loginInfo">登录</p>' + | ||
132 | '<dl class="layui-nav-child userInfo">' + | ||
133 | '<dd><a>个人信息</a></dd>' + | ||
134 | '<dd><a id="cancellation"><img src="/staticImages/zhuxiao.png">退出</a>' + | ||
135 | '</dd>' + | ||
136 | '</dl>' + | ||
137 | '</li>' | ||
138 | ) | ||
139 | layui.use(['element'],function(){ | ||
140 | layui.element.init();//手动调用初始化方法 | ||
141 | }) | ||
142 | } | ||
143 | |||
103 | // 点击注册的时候 | 144 | // 点击注册的时候 |
104 | $(document).on('click', '#registerButton', function () { | 145 | $(document).on('click', '#registerButton', function () { |
105 | window.open('' + localhostPaht + '/staticViews/register.html', '_self') | 146 | window.open('/staticViews/register.html', '_self') |
106 | }); | 147 | }); |
107 | 148 | ||
108 | // 点击判断是否登录 | 149 | // 点击判断是否登录 | ... | ... |
... | @@ -74,40 +74,40 @@ function initData() { | ... | @@ -74,40 +74,40 @@ function initData() { |
74 | } | 74 | } |
75 | //加载新闻数据 | 75 | //加载新闻数据 |
76 | function NewsData() { | 76 | function NewsData() { |
77 | // var ulNews = $("#ulNews"); | 77 | var ulNews = $("#ulNews"); |
78 | // ulNews.empty(); | 78 | ulNews.empty(); |
79 | // var li, publishTime; | 79 | var li, publishTime; |
80 | // $.ajax({ | 80 | $.ajax({ |
81 | // type: "get", //提交方式 | 81 | type: "get", //提交方式 |
82 | // url: portal.api_url + "/portal/MhNews/getNewsList",//路径 | 82 | url: portal.api_url + "/portal/MhNews/getNewsList",//路径 |
83 | // dataType: "json", | 83 | dataType: "json", |
84 | // //数据,这里使用的是Json格式进行传输 | 84 | //数据,这里使用的是Json格式进行传输 |
85 | // success: function (result) {//返回数据根据结果进行相应的处理 | 85 | success: function (result) {//返回数据根据结果进行相应的处理 |
86 | // if (result.code == 200 && result.data != null) { | 86 | if (result.code == 200 && result.data != null) { |
87 | // if (result.data[0].preViewUrl) { | 87 | if (result.data[0].preViewUrl) { |
88 | // $('.news-img img').attr('src', result.data[0].preViewUrl); | 88 | $('.news-img img').attr('src', result.data[0].preViewUrl); |
89 | // } else { | 89 | } else { |
90 | // $('.news-img img').attr('src', './staticImages/news_demo.jpg'); | 90 | $('.news-img img').attr('src', './staticImages/news_demo.jpg'); |
91 | // } | 91 | } |
92 | // for (var i = 0; i < result.data.length; i++) { | 92 | for (var i = 0; i < result.data.length; i++) { |
93 | // if (i == 6) return; | 93 | if (i == 6) return; |
94 | // publishTime = CutDate(result.data[i].publishTime); | 94 | publishTime = CutDate(result.data[i].publishTime); |
95 | // if (result.data[i].preViewUrl) { | 95 | if (result.data[i].preViewUrl) { |
96 | // li = '<li url="' + result.data[i].preViewUrl + '"><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">'; | 96 | li = '<li url="' + result.data[i].preViewUrl + '"><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">'; |
97 | // } else { | 97 | } else { |
98 | // li = '<li><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">'; | 98 | li = '<li><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">'; |
99 | // } | 99 | } |
100 | // li += '<div class="news_item">'; | 100 | li += '<div class="news_item">'; |
101 | // if (recentlyDay.indexOf(publishTime) > -1) { | 101 | if (recentlyDay.indexOf(publishTime) > -1) { |
102 | // li += '<svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconzuixin"></use> </svg>'; | 102 | li += '<svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconzuixin"></use> </svg>'; |
103 | // } | 103 | } |
104 | // li += result.data[i].headline + '</div>'; | 104 | li += result.data[i].headline + '</div>'; |
105 | // li += '<span>' + publishTime + '</span></a></li>'; | 105 | li += '<span>' + publishTime + '</span></a></li>'; |
106 | // ulNews.append(li); | 106 | ulNews.append(li); |
107 | // } | 107 | } |
108 | // } | 108 | } |
109 | // } | 109 | } |
110 | // }); | 110 | }); |
111 | 111 | ||
112 | if ($('#ulNews li').eq(0).attr('url')) { | 112 | if ($('#ulNews li').eq(0).attr('url')) { |
113 | $('.news-img img').attr('src', $('#ulNews li').eq(0).attr('url')); | 113 | $('.news-img img').attr('src', $('#ulNews li').eq(0).attr('url')); | ... | ... |
-
Please register or sign in to post a comment