<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <include file="public@head_common"/> <link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/augly.css" /> <link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/write/sale_people.css" /> <title>销售人员</title> <style type="text/css"> </style> </head> <body> <div class="test_num"></div> <div class="header"> <div class="return"> <span class="back_href"> <i class="iconfont icon-jiantou-copy"></i>返回 </span> </div> 填写电子订单 </div> <div class="header_place"></div> <div class="pic_wrap"> <img src="__TMPL__/public/mobile/images/biglogo@2x.png" /> </div> <div class="text_item "> <p class="text_tit"><i class="iconfont icon-icon-test1"></i>销售代码</p> <input type="text" name="user_login" id="user_login" value="" class="baby_input" placeholder="请输入销售代码" /> </div> <div class="text_item "> <p class="text_tit"><i class="iconfont icon-mima"></i>密码</p> <input type="password" name="user_pass" id="user_pass" value="" class="baby_input" placeholder="请输入密码" /> </div> <div class="btn"> 确定 </div> <div class="bottom_icon position_a"> <img src="__TMPL__/public/mobile/images/biglogo@2x.png" class="bottom_img" /> <p class="bottom_text">{$site_info.site_name}</p> </div> <script src="__TMPL__/public/mobile/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script> <script src="__TMPL__/public/mobile/js/swiper-4.3.5.min.js" type="text/javascript" charset="utf-8"></script> <script src="__TMPL__/public/mobile/js/common.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> $('.btn').click(function(){ var user_login = $('input[name=user_login]').val(); var user_pass = $('input[name=user_pass]').val(); if(user_login.length == 0) { _error('请输入销售代码'); return false; } else if(user_pass.length == 0) { _error('请输入密码'); return false; } else { var data = { user_login: user_login, user_pass: user_pass }; $.ajax({ url: "{:url('user/Login/doLoginSales')}", type: "POST", data: data, dataType: "JSON", success: function (res) { console.log(res); if (res.code == 1) { _error(res.msg); location.href = "{:url('order_type')}"; } else { _error(res.msg); } } }) } }); // 弹窗提示 var popup_switch = true; function _error(test) { if(popup_switch) { popup_switch = false; $('.test_num').html(test); $('.test_num').removeClass('Augly-fadeout'); $('.test_num').addClass('Augly-fadein'); $('.test_num').show(); setTimeout(function() { $('.test_num').removeClass('Augly-fadein'); $('.test_num').addClass('Augly-fadeout'); popup_switch = true }, 1500) } else { popup_switch = true } } //软件盘弹出时不让下面的弹起 var flag = false; $("input").focus(function(){ flag = true; }); window.onresize = function(){ if(flag){ $(".bottom_icon position_a").css({"position":"initial"}); flag = false; }else { $(".bottom_icon position_a").css({"position":"fixed"}); alert(document.activeElement.id) if(document.activeElement.id == "keyword"){ flag = true; }; }; }; </script> </body> </html>