Merge branch 'master' of yun.pashanhoo.com:renchao/portalStaticPage
Showing
2 changed files
with
27 additions
and
5 deletions
... | @@ -287,7 +287,7 @@ div.footer .system_service ul li a:hover { | ... | @@ -287,7 +287,7 @@ div.footer .system_service ul li a:hover { |
287 | left: 0; | 287 | left: 0; |
288 | top: -5px; | 288 | top: -5px; |
289 | font-size: 14px; | 289 | font-size: 14px; |
290 | color: #fff; | 290 | /* color: #fff; */ |
291 | } | 291 | } |
292 | /* --------------进度条美化---------------- */ | 292 | /* --------------进度条美化---------------- */ |
293 | ::-webkit-scrollbar { | 293 | ::-webkit-scrollbar { | ... | ... |
... | @@ -2,7 +2,7 @@ function login(){ | ... | @@ -2,7 +2,7 @@ function login(){ |
2 | layui.use('layer', function () { | 2 | layui.use('layer', function () { |
3 | layer.open({ | 3 | layer.open({ |
4 | type: 1, | 4 | type: 1, |
5 | title: '登陆信息', | 5 | title: '登录信息', |
6 | shadeClose: false, | 6 | shadeClose: false, |
7 | area: ['500px', '320px'], | 7 | area: ['500px', '320px'], |
8 | scrollbar: false, | 8 | scrollbar: false, |
... | @@ -13,25 +13,47 @@ function login(){ | ... | @@ -13,25 +13,47 @@ function login(){ |
13 | + '<li><span><a class="require">*</a>密码</span>:<input id="IDcard"></li>' | 13 | + '<li><span><a class="require">*</a>密码</span>:<input id="IDcard"></li>' |
14 | + '</ul>' | 14 | + '</ul>' |
15 | + '<div class="btns">' | 15 | + '<div class="btns">' |
16 | +'<button type="button" id="loginButton">登陆</button>' | 16 | +'<button type="button" id="loginButton">登录</button>' |
17 | +'<button type="button" id="registerButton">注册</button></div>' | 17 | +'<button type="button" id="registerButton">注册</button></div>' |
18 | + '</div>' | 18 | + '</div>' |
19 | }); | 19 | }); |
20 | }) | 20 | }) |
21 | } | 21 | } |
22 | // 时间委托解决冒泡 | 22 | // 时间委托解决冒泡 |
23 | $(document).off().on('click', 'p', function(){ | 23 | $(document).off().on('click', '.PersonLogin', function(){ |
24 | //所执行的代码 | 24 | //所执行的代码 |
25 | login() | 25 | login() |
26 | }); | 26 | }); |
27 | // 点击登陆的时候 | 27 | // 点击登陆的时候 |
28 | $(document).on('click', '#loginButton', function(){ | 28 | $(document).on('click', '#loginButton', function(){ |
29 | layer.closeAll() | 29 | var userLoginRequest = {} |
30 | var username =$('#userName').val() | ||
31 | var password =$('#IDcard').val() | ||
32 | userLoginRequest.username = username | ||
33 | userLoginRequest.password = password | ||
34 | clicklogin(userLoginRequest) | ||
35 | // layer.closeAll() | ||
30 | }); | 36 | }); |
31 | // 点击注册的时候 | 37 | // 点击注册的时候 |
32 | $(document).on('click', '#registerButton', function(){ | 38 | $(document).on('click', '#registerButton', function(){ |
33 | // layer.closeAll() | 39 | // layer.closeAll() |
34 | window.open(`${localhostPaht}/staticViews/register.html`,'_self') | 40 | window.open(`${localhostPaht}/staticViews/register.html`,'_self') |
35 | }); | 41 | }); |
42 | function clicklogin(data){ | ||
43 | $.ajax({ | ||
44 | type: "post", //提交方式 | ||
45 | url: portal.api_url + "/protal/users/login",//路径 | ||
46 | headers:{//***关键****** | ||
47 | 'Content-Type': 'application/json;charset=UTF-8', | ||
48 | }, | ||
49 | dataType: "json", | ||
50 | data:JSON.stringify(data),//***关键****** | ||
51 | success: function (result) {//返回数据根据结果进行相应的处理 | ||
52 | if (result.code == 200 && result.data != null) { | ||
53 | console.log(232323,result) | ||
54 | } | ||
55 | } | ||
56 | }); | ||
57 | } | ||
36 | 58 | ||
37 | 59 | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment