| | |
| | | |
| | | @RequestMapping("/login.action") |
| | | @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "登录") |
| | | public R loginAction(String mobile, String password){ |
| | | if (mobile.equals("super") && password.equals(Cools.md5(superPwd))) { |
| | | public R loginAction(String username, String password){ |
| | | if (username.equals("super") && password.equals(Cools.md5(superPwd))) { |
| | | Map<String, Object> res = new HashMap<>(); |
| | | res.put("username", mobile); |
| | | res.put("token", Cools.enToken(System.currentTimeMillis() + mobile, superPwd)); |
| | | res.put("username", username); |
| | | res.put("token", Cools.enToken(System.currentTimeMillis() + username, superPwd)); |
| | | return R.ok(res); |
| | | } |
| | | EntityWrapper<User> userWrapper = new EntityWrapper<>(); |
| | | userWrapper.eq("mobile", mobile); |
| | | userWrapper.eq("username", username); |
| | | User user = userService.selectOne(userWrapper); |
| | | if (Cools.isEmpty(user)){ |
| | | return R.parse(CodeRes.USER_10001); |
| | |
| | | if (!user.getPassword().equals(password)){ |
| | | return R.parse(CodeRes.USER_10003); |
| | | } |
| | | String token = Cools.enToken(System.currentTimeMillis() + mobile, user.getPassword()); |
| | | String token = Cools.enToken(System.currentTimeMillis() + username, user.getPassword()); |
| | | userLoginService.delete(new EntityWrapper<UserLogin>().eq("user_id", user.getId())); |
| | | UserLogin userLogin = new UserLogin(); |
| | | userLogin.setUserId(user.getId()); |
| | |
| | | userLogin.setCreateTime(new Date()); |
| | | userLoginService.insert(userLogin); |
| | | Map<String, Object> res = new HashMap<>(); |
| | | res.put("username", user.getUsername()); |
| | | res.put("username", user.getNickname()); |
| | | res.put("token", token); |
| | | return R.ok(res); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.zy.system.service.HostService; |
| | | import com.zy.system.service.RoleService; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.HostService; |
| | | import com.zy.system.service.RoleService; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | //import com.zy.system.service.RoleService; |
| | | //import com.zy.sc.system.service.RoleService; |
| | | |
| | | @TableName("sys_user") |
| | | public class User implements Serializable { |
| | |
| | | @TableField("host_id") |
| | | private Long hostId; |
| | | |
| | | |
| | | /** |
| | | * 名称 |
| | | * 所属部门 |
| | | */ |
| | | @TableField("dept_id") |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * 角色 |
| | | */ |
| | | @TableField("role_id") |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * 账号 |
| | | */ |
| | | private String username; |
| | | |
| | | /** |
| | | * 账号 |
| | | * 名称 |
| | | */ |
| | | private String nickname; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String mobile; |
| | | |
| | |
| | | private String password; |
| | | |
| | | /** |
| | | * 角色 |
| | | * 头像 |
| | | */ |
| | | @TableField("role_id") |
| | | private Long roleId; |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 邮箱 |
| | | */ |
| | | private String email; |
| | | |
| | | /** |
| | | * 性别 0: 男 1: 女 2: 未知 |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 注册时间 |
| | |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | public Long getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public String getDeptName() { |
| | | // DeptService service = SpringUtils.getBean(DeptService.class); |
| | | // Dept dept = service.selectById(this.deptId); |
| | | // if (!Cools.isEmpty(dept)){ |
| | | // return dept.getName(); |
| | | // } |
| | | return null; |
| | | } |
| | | |
| | | public void setDeptId(Long deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public void setUsername(String username) { |
| | | this.username = username; |
| | | } |
| | | |
| | | public String getNickname() { |
| | | return nickname; |
| | | } |
| | | |
| | | public void setNickname(String nickname) { |
| | | this.nickname = nickname; |
| | | } |
| | | |
| | | public String getMobile() { |
| | |
| | | this.password = password; |
| | | } |
| | | |
| | | public String getAvatar() { |
| | | return avatar; |
| | | } |
| | | |
| | | public void setAvatar(String avatar) { |
| | | this.avatar = avatar; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public Integer getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public String getSex$(){ |
| | | if (null == this.sex){ return null; } |
| | | switch (this.sex){ |
| | | case 0: |
| | | return "男"; |
| | | case 1: |
| | | return "女"; |
| | | case 2: |
| | | return "未知"; |
| | | default: |
| | | return String.valueOf(this.sex); |
| | | } |
| | | } |
| | | |
| | | public void setSex(Integer sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Long getRoleId() { |
| | | return roleId; |
| | | } |
| | |
| | | server: |
| | | port: 8081 |
| | | port: 7878 |
| | | servlet: |
| | | context-path: /@pom.build.finalName@ |
| | | |
| | |
| | | <resultMap id="BaseResultMap" type="com.zy.system.entity.User"> |
| | | <id column="id" property="id" /> |
| | | <result column="host_id" property="hostId" /> |
| | | <result column="role_id" property="roleId" /> |
| | | <result column="dept_id" property="deptId" /> |
| | | <result column="username" property="username" /> |
| | | <result column="mobile" property="mobile" /> |
| | | <result column="password" property="password" /> |
| | | <result column="role_id" property="roleId" /> |
| | | <result column="avatar" property="avatar" /> |
| | | <result column="email" property="email" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="status" property="status" /> |
| | | |
New file |
| | |
| | | ::selection { |
| | | background: #2d2f36; |
| | | } |
| | | ::-webkit-selection { |
| | | background: #2d2f36; |
| | | } |
| | | ::-moz-selection { |
| | | background: #2d2f36; |
| | | } |
| | | body { |
| | | background: white; |
| | | font-family: 'Inter UI', sans-serif; |
| | | margin: 0; |
| | | padding: 20px; |
| | | } |
| | | .dowebok { |
| | | background: #e2e2e5; |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: calc(100% - 40px); |
| | | position: absolute; |
| | | place-content: center; |
| | | width: calc(100% - 40px); |
| | | } |
| | | @media (max-width: 767px) { |
| | | .dowebok { |
| | | height: auto; |
| | | margin-bottom: 20px; |
| | | padding-bottom: 20px; |
| | | } |
| | | } |
| | | .container { |
| | | display: flex; |
| | | height: 320px; |
| | | margin: 0 auto; |
| | | width: 640px; |
| | | } |
| | | @media (max-width: 767px) { |
| | | .container { |
| | | flex-direction: column; |
| | | height: 630px; |
| | | width: 320px; |
| | | } |
| | | } |
| | | .left { |
| | | background: white; |
| | | height: calc(100% - 40px); |
| | | top: 20px; |
| | | position: relative; |
| | | width: 50%; |
| | | } |
| | | @media (max-width: 767px) { |
| | | .left { |
| | | height: 100%; |
| | | left: 20px; |
| | | width: calc(100% - 40px); |
| | | max-height: 270px; |
| | | } |
| | | } |
| | | .login { |
| | | font-size: 50px; |
| | | font-weight: 900; |
| | | margin: 50px 40px 40px; |
| | | } |
| | | .eula { |
| | | color: #999; |
| | | font-size: 14px; |
| | | line-height: 1.5; |
| | | margin: 40px; |
| | | } |
| | | .right { |
| | | background: #474a59; |
| | | box-shadow: 0px 0px 40px 16px rgba(0, 0, 0, 0.22); |
| | | color: #f1f1f2; |
| | | position: relative; |
| | | width: 50%; |
| | | } |
| | | @media (max-width: 767px) { |
| | | .right { |
| | | flex-shrink: 0; |
| | | height: 100%; |
| | | width: 100%; |
| | | max-height: 350px; |
| | | } |
| | | } |
| | | svg { |
| | | position: absolute; |
| | | width: 320px; |
| | | } |
| | | path { |
| | | fill: none; |
| | | stroke: url(#linearGradient); |
| | | stroke-width: 4; |
| | | stroke-dasharray: 240 1386; |
| | | } |
| | | .form { |
| | | margin: 40px; |
| | | position: absolute; |
| | | } |
| | | label { |
| | | color: #c2c2c5; |
| | | display: block; |
| | | font-size: 14px; |
| | | height: 16px; |
| | | margin-top: 20px; |
| | | margin-bottom: 5px; |
| | | } |
| | | input { |
| | | background: transparent; |
| | | border: 0; |
| | | color: #f2f2f2; |
| | | font-size: 20px; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | outline: none !important; |
| | | width: 100%; |
| | | } |
| | | input::-moz-focus-inner { |
| | | border: 0; |
| | | } |
| | | #submit { |
| | | color: #707075; |
| | | margin-top: 40px; |
| | | transition: color 300ms; |
| | | } |
| | | #submit:focus { |
| | | color: #f2f2f2; |
| | | } |
| | | #submit:active { |
| | | color: #d0d0d2; |
| | | } |
New file |
| | |
| | | /* |
| | | 2017 Julian Garnier |
| | | Released under the MIT license |
| | | */ |
| | | var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,r,p){if(p.get||p.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[r]=p.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; |
| | | $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+$jscomp.symbolCounter_++}; |
| | | $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(e){var r=0;return $jscomp.iteratorPrototype(function(){return r<e.length?{done:!1,value:e[r++]}:{done:!0}})}; |
| | | $jscomp.iteratorPrototype=function(e){$jscomp.initSymbolIterator();e={next:e};e[$jscomp.global.Symbol.iterator]=function(){return this};return e};$jscomp.array=$jscomp.array||{};$jscomp.iteratorFromArray=function(e,r){$jscomp.initSymbolIterator();e instanceof String&&(e+="");var p=0,m={next:function(){if(p<e.length){var u=p++;return{value:r(u,e[u]),done:!1}}m.next=function(){return{done:!0,value:void 0}};return m.next()}};m[Symbol.iterator]=function(){return m};return m}; |
| | | $jscomp.polyfill=function(e,r,p,m){if(r){p=$jscomp.global;e=e.split(".");for(m=0;m<e.length-1;m++){var u=e[m];u in p||(p[u]={});p=p[u]}e=e[e.length-1];m=p[e];r=r(m);r!=m&&null!=r&&$jscomp.defineProperty(p,e,{configurable:!0,writable:!0,value:r})}};$jscomp.polyfill("Array.prototype.keys",function(e){return e?e:function(){return $jscomp.iteratorFromArray(this,function(e){return e})}},"es6-impl","es3");var $jscomp$this=this; |
| | | (function(e,r){"function"===typeof define&&define.amd?define([],r):"object"===typeof module&&module.exports?module.exports=r():e.anime=r()})(this,function(){function e(a){if(!h.col(a))try{return document.querySelectorAll(a)}catch(c){}}function r(a,c){for(var d=a.length,b=2<=arguments.length?arguments[1]:void 0,f=[],n=0;n<d;n++)if(n in a){var k=a[n];c.call(b,k,n,a)&&f.push(k)}return f}function p(a){return a.reduce(function(a,d){return a.concat(h.arr(d)?p(d):d)},[])}function m(a){if(h.arr(a))return a; |
| | | h.str(a)&&(a=e(a)||a);return a instanceof NodeList||a instanceof HTMLCollection?[].slice.call(a):[a]}function u(a,c){return a.some(function(a){return a===c})}function C(a){var c={},d;for(d in a)c[d]=a[d];return c}function D(a,c){var d=C(a),b;for(b in a)d[b]=c.hasOwnProperty(b)?c[b]:a[b];return d}function z(a,c){var d=C(a),b;for(b in c)d[b]=h.und(a[b])?c[b]:a[b];return d}function T(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,d,k){return c+c+d+d+k+k});var c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a); |
| | | a=parseInt(c[1],16);var d=parseInt(c[2],16),c=parseInt(c[3],16);return"rgba("+a+","+d+","+c+",1)"}function U(a){function c(a,c,b){0>b&&(b+=1);1<b&&--b;return b<1/6?a+6*(c-a)*b:.5>b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+ |
| | | 255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1<a.indexOf("translate")||"perspective"===a)return"px";if(-1<a.indexOf("rotate")||-1<a.indexOf("skew"))return"deg"}function I(a,c){return h.fnc(a)?a(c.target,c.id,c.total):a}function E(a,c){if(c in a.style)return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function J(a,c){if(h.dom(a)&& |
| | | u(W,c))return"transform";if(h.dom(a)&&(a.getAttribute(c)||h.svg(a)&&a[c]))return"attribute";if(h.dom(a)&&"transform"!==c&&E(a,c))return"css";if(null!=a[c])return"object"}function X(a,c){var d=V(c),d=-1<c.indexOf("scale")?1:0+d;a=a.style.transform;if(!a)return d;for(var b=[],f=[],n=[],k=/(\w+)\((.+?)\)/g;b=k.exec(a);)f.push(b[1]),n.push(b[2]);a=r(n,function(a,b){return f[b]===c});return a.length?a[0]:d}function K(a,c){switch(J(a,c)){case "transform":return X(a,c);case "css":return E(a,c);case "attribute":return a.getAttribute(c)}return a[c]|| |
| | | 0}function L(a,c){var d=/^(\*=|\+=|-=)/.exec(a);if(!d)return a;var b=y(a)||0;c=parseFloat(c);a=parseFloat(a.replace(d[0],""));switch(d[0][0]){case "+":return c+a+b;case "-":return c-a+b;case "*":return c*a+b}}function F(a,c){return Math.sqrt(Math.pow(c.x-a.x,2)+Math.pow(c.y-a.y,2))}function M(a){a=a.points;for(var c=0,d,b=0;b<a.numberOfItems;b++){var f=a.getItem(b);0<b&&(c+=F(d,f));d=f}return c}function N(a){if(a.getTotalLength)return a.getTotalLength();switch(a.tagName.toLowerCase()){case "circle":return 2* |
| | | Math.PI*a.getAttribute("r");case "rect":return 2*a.getAttribute("width")+2*a.getAttribute("height");case "line":return F({x:a.getAttribute("x1"),y:a.getAttribute("y1")},{x:a.getAttribute("x2"),y:a.getAttribute("y2")});case "polyline":return M(a);case "polygon":var c=a.points;return M(a)+F(c.getItem(c.numberOfItems-1),c.getItem(0))}}function Y(a,c){function d(b){b=void 0===b?0:b;return a.el.getPointAtLength(1<=c+b?c+b:0)}var b=d(),f=d(-1),n=d(1);switch(a.property){case "x":return b.x;case "y":return b.y; |
| | | case "angle":return 180*Math.atan2(n.y-f.y,n.x-f.x)/Math.PI}}function O(a,c){var d=/-?\d*\.?\d+/g,b;b=h.pth(a)?a.totalLength:a;if(h.col(b))if(h.rgb(b)){var f=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b=f?"rgba("+f[1]+",1)":b}else b=h.hex(b)?T(b):h.hsl(b)?U(b):void 0;else f=(f=y(b))?b.substr(0,b.length-f.length):b,b=c&&!/\s/g.test(b)?f+c:f;b+="";return{original:b,numbers:b.match(d)?b.match(d).map(Number):[0],strings:h.str(a)||c?b.split(d):[]}}function P(a){a=a?p(h.arr(a)?a.map(m):m(a)):[];return r(a, |
| | | function(a,d,b){return b.indexOf(a)===d})}function Z(a){var c=P(a);return c.map(function(a,b){return{target:a,id:b,total:c.length}})}function aa(a,c){var d=C(c);if(h.arr(a)){var b=a.length;2!==b||h.obj(a[0])?h.fnc(c.duration)||(d.duration=c.duration/b):a={value:a}}return m(a).map(function(a,b){b=b?0:c.delay;a=h.obj(a)&&!h.pth(a)?a:{value:a};h.und(a.delay)&&(a.delay=b);return a}).map(function(a){return z(a,d)})}function ba(a,c){var d={},b;for(b in a){var f=I(a[b],c);h.arr(f)&&(f=f.map(function(a){return I(a, |
| | | c)}),1===f.length&&(f=f[0]));d[b]=f}d.duration=parseFloat(d.duration);d.delay=parseFloat(d.delay);return d}function ca(a){return h.arr(a)?A.apply(this,a):Q[a]}function da(a,c){var d;return a.tweens.map(function(b){b=ba(b,c);var f=b.value,e=K(c.target,a.name),k=d?d.to.original:e,k=h.arr(f)?f[0]:k,w=L(h.arr(f)?f[1]:f,k),e=y(w)||y(k)||y(e);b.from=O(k,e);b.to=O(w,e);b.start=d?d.end:a.offset;b.end=b.start+b.delay+b.duration;b.easing=ca(b.easing);b.elasticity=(1E3-Math.min(Math.max(b.elasticity,1),999))/ |
| | | 1E3;b.isPath=h.pth(f);b.isColor=h.col(b.from.original);b.isColor&&(b.round=1);return d=b})}function ea(a,c){return r(p(a.map(function(a){return c.map(function(b){var c=J(a.target,b.name);if(c){var d=da(b,a);b={type:c,property:b.name,animatable:a,tweens:d,duration:d[d.length-1].end,delay:d[0].delay}}else b=void 0;return b})})),function(a){return!h.und(a)})}function R(a,c,d,b){var f="delay"===a;return c.length?(f?Math.min:Math.max).apply(Math,c.map(function(b){return b[a]})):f?b.delay:d.offset+b.delay+ |
| | | b.duration}function fa(a){var c=D(ga,a),d=D(S,a),b=Z(a.targets),f=[],e=z(c,d),k;for(k in a)e.hasOwnProperty(k)||"targets"===k||f.push({name:k,offset:e.offset,tweens:aa(a[k],d)});a=ea(b,f);return z(c,{children:[],animatables:b,animations:a,duration:R("duration",a,c,d),delay:R("delay",a,c,d)})}function q(a){function c(){return window.Promise&&new Promise(function(a){return p=a})}function d(a){return g.reversed?g.duration-a:a}function b(a){for(var b=0,c={},d=g.animations,f=d.length;b<f;){var e=d[b], |
| | | k=e.animatable,h=e.tweens,n=h.length-1,l=h[n];n&&(l=r(h,function(b){return a<b.end})[0]||l);for(var h=Math.min(Math.max(a-l.start-l.delay,0),l.duration)/l.duration,w=isNaN(h)?1:l.easing(h,l.elasticity),h=l.to.strings,p=l.round,n=[],m=void 0,m=l.to.numbers.length,t=0;t<m;t++){var x=void 0,x=l.to.numbers[t],q=l.from.numbers[t],x=l.isPath?Y(l.value,w*x):q+w*(x-q);p&&(l.isColor&&2<t||(x=Math.round(x*p)/p));n.push(x)}if(l=h.length)for(m=h[0],w=0;w<l;w++)p=h[w+1],t=n[w],isNaN(t)||(m=p?m+(t+p):m+(t+" ")); |
| | | else m=n[0];ha[e.type](k.target,e.property,m,c,k.id);e.currentValue=m;b++}if(b=Object.keys(c).length)for(d=0;d<b;d++)H||(H=E(document.body,"transform")?"transform":"-webkit-transform"),g.animatables[d].target.style[H]=c[d].join(" ");g.currentTime=a;g.progress=a/g.duration*100}function f(a){if(g[a])g[a](g)}function e(){g.remaining&&!0!==g.remaining&&g.remaining--}function k(a){var k=g.duration,n=g.offset,w=n+g.delay,r=g.currentTime,x=g.reversed,q=d(a);if(g.children.length){var u=g.children,v=u.length; |
| | | if(q>=g.currentTime)for(var G=0;G<v;G++)u[G].seek(q);else for(;v--;)u[v].seek(q)}if(q>=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q<k)b(q);else if(q<=n&&0!==r&&(b(0),x&&e()),q>=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime= |
| | | 0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1<a&&v.splice(a,1);g.paused=!0};g.play=function(){g.paused&&(g.paused=!1,t=0,l=d(g.currentTime),v.push(g),B||ia())};g.reverse=function(){g.reversed=!g.reversed;t=0;l=d(g.currentTime)};g.restart=function(){g.pause(); |
| | | g.reset();g.play()};g.finished=m;g.reset();g.autoplay&&g.play();return g}var ga={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},S={duration:1E3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},W="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),H,h={arr:function(a){return Array.isArray(a)},obj:function(a){return-1<Object.prototype.toString.call(a).indexOf("Object")}, |
| | | pth:function(a){return h.obj(a)&&a.hasOwnProperty("totalLength")},svg:function(a){return a instanceof SVGElement},dom:function(a){return a.nodeType||h.svg(a)},str:function(a){return"string"===typeof a},fnc:function(a){return"function"===typeof a},und:function(a){return"undefined"===typeof a},hex:function(a){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)},rgb:function(a){return/^rgb/.test(a)},hsl:function(a){return/^hsl/.test(a)},col:function(a){return h.hex(a)||h.rgb(a)||h.hsl(a)}},A=function(){function a(a, |
| | | d,b){return(((1-3*b+3*d)*a+(3*b-6*d))*a+3*d)*a}return function(c,d,b,f){if(0<=c&&1>=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0=== |
| | | n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0<n?h=m:l=m;while(1e-7<Math.abs(n)&&10>++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25, |
| | | .46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)? |
| | | d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;d<b;)v[d]&&v[d].tick(c),d++;a()}else cancelAnimationFrame(B),B=0}return a}();q.version="2.2.0";q.speed=1;q.running=v;q.remove= |
| | | function(a){a=P(a);for(var c=v.length;c--;)for(var d=v[c],b=d.animations,f=b.length;f--;)u(a,b[f].animatable.target)&&(b.splice(f,1),b.length||d.pause())};q.getValue=K;q.path=function(a,c){var d=h.str(a)?e(a)[0]:a,b=c||100;return function(a){return{el:d,property:a,totalLength:N(d)*(b/100)}}};q.setDashoffset=function(a){var c=N(a);a.setAttribute("stroke-dasharray",c);return c};q.bezier=A;q.easings=Q;q.timeline=function(a){var c=q(a);c.pause();c.duration=0;c.add=function(d){c.children.forEach(function(a){a.began= |
| | | !0;a.completed=!0});m(d).forEach(function(b){var d=z(b,D(S,a||{}));d.targets=d.targets||a.targets;b=c.duration;var e=d.offset;d.autoplay=!1;d.direction=c.direction;d.offset=h.und(e)?b:L(e,b);c.began=!0;c.completed=!0;c.seek(d.offset);d=q(d);d.began=!0;d.completed=!0;d.duration>b&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q}); |
| | |
| | | var pageCurr; |
| | | var tableData; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var insTb2; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'util', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | var util = layui.util; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#user', |
| | | insTb2 = table.render({ |
| | | elem: '#userTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/user/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | even: true, |
| | | cellMinWidth: 50, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#userToolbar', |
| | | height: 'full-100', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', width: 80} |
| | | // ,{field: 'hostName', align: 'center',title: '授权商户'} |
| | | ,{field: 'mobile', align: 'center',title: '账号'} |
| | | ,{field: 'username', align: 'center',title: '名称'} |
| | | // ,{field: 'password', align: 'center',title: '密码'} |
| | | ,{field: 'hostName', align: 'center',title: '授权商户', templet: '#hostTpl', width: 140} |
| | | // ,{field: 'nickname', align: 'center',title: '用户名'} |
| | | ,{field: 'username', align: 'center',title: '用户名'} |
| | | ,{field: 'mobile', align: 'center',title: '手机号'} |
| | | // ,{field: 'deptName', align: 'center',title: '所属部门'} |
| | | ,{field: 'roleName', align: 'center',title: '角色'} |
| | | // ,{field: 'createTime$', align: 'center',title: '注册时间'} |
| | | ,{field: 'email', align: 'center',title: '邮箱'} |
| | | // ,{field: 'sex$', align: 'center',title: '性别'} |
| | | ,{field: 'createTime$', align: 'center',title: '注册时间', hide: true} |
| | | ,{field: 'status$', align: 'center',title: '状态', templet: '#statusTpl', width: 120, unresize: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:170} |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | tableData = table.cache.userTable; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | /* 表格2搜索 */ |
| | | form.on('submit(userTbSearch)', function (data) { |
| | | insTb2.reload({where: data.field, page: {curr: 1}}); |
| | | return false; |
| | | }); |
| | | |
| | | /* 表格2头工具栏点击事件 */ |
| | | table.on('toolbar(userTable)', function (obj) { |
| | | if (obj.event === 'add') { // 添加 |
| | | showEditModel() |
| | | } else if (obj.event === 'del') { // 删除 |
| | | var checkRows = table.checkStatus('userTable'); |
| | | if (checkRows.data.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | var ids = checkRows.data.map(function (d) { |
| | | return d.id; |
| | | }); |
| | | doDelUser({ids: ids}); |
| | | } |
| | | }); |
| | | |
| | |
| | | var data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?1:0; |
| | | http.post(baseUrl+"/user/edit/auth", {id: data.id, status: data[this.name]}, function (res) { |
| | | layer.msg(res.msg); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(user)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(user)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: ['30%', top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'user_detail.html', |
| | | success: function(layero, index){ |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | var ids=[]; |
| | | data.map(function (track) { |
| | | ids.push(track.id); |
| | | }); |
| | | if (ids.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(ids.length===1?'此':ids.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/user/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function() { |
| | | var titles = []; |
| | | var fields = []; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'user': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/user/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles, res.data, 'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(user)', function(obj){ |
| | | /* 表格2工具条点击事件 */ |
| | | table.on('tool(userTable)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: ['30%', top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'user_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#password', index).parent().parent().hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | } |
| | | }); |
| | | showEditModel(data) |
| | | break; |
| | | // 删除 |
| | | case 'del': |
| | | var ids = [obj.id]; |
| | | doDelUser({ids: ids}); |
| | | break; |
| | | // 重置密码 |
| | | case 'resetPwd': |
| | | layer.open({ |
| | | admin.open({ |
| | | type: 1, |
| | | title: '重置密码', |
| | | offset: '150px', |
| | | area: ['360px'], |
| | | shade: 0.1, |
| | | shadeClose: true, |
| | | content: $("#resetpwd-window"), |
| | | content: $("#resetpwd-window").html(), |
| | | success: function(layero, index){ |
| | | layer.iframeAuto(index); |
| | | $('#resetUserId').val(data.id); |
| | |
| | | } |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | id: $('#id').val(), |
| | | hostId: $('#hostId').val(), |
| | | username: $('#username').val(), |
| | | mobile: $('#mobile').val(), |
| | | password: hex_md5($('#password').val()), |
| | | roleId: $('#roleId').val(), |
| | | createTime: top.strToDate($('#createTime\\$').val()), |
| | | status: $('#status').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/user/edit/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | /* 显示表单弹窗 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '用户', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | // 回显表单数据 |
| | | form.val('detail', mData); |
| | | // 表单提交事件 |
| | | form.on('submit(editSubmit)', function (data) { |
| | | if (isEmpty(data.field.roleId)) { |
| | | layer.msg('请选择角色', {icon: 2}); |
| | | return false; |
| | | } |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/user/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }) |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | /* 删除订单 */ |
| | | function doDelUser(obj) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/user/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: obj.ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | // 重置密码 |
| | | form.on('submit(savePwd)', function (data) { |
| | | $.ajax({ |
| | | url: baseUrl+"/user/edit/auth", |
| | | url: baseUrl+"/user/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | id: data.field.resetUserId, |
| | |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | layer.msg("重置密码成功"); |
| | | layer.msg("重置密码成功", {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }) |
| | | |
| | | $('#cancel').click(function () { |
| | | layer.closeAll(); |
| | | }) |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data) { |
| | | for (var val in data) { |
| | | el.find(":input[id='" + val + "']").val(data[val]); |
| | | } |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | | |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <html lang="zh-CN"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta charset="utf-8"> |
| | | <title>自动仓储 - 管理系统</title> |
| | | <link rel="icon" type="image/x-icon" href="../static/image/log.png" /> |
| | | <link rel="stylesheet" href="../static/layui/css/layui.css" media="all"> |
| | | <script type="text/javascript" src="../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <style> |
| | | html{ |
| | | height: 100%; |
| | | } |
| | | body.login-bg { |
| | | color: #777; |
| | | height: 100%; |
| | | /*background-image: url("../static/image/bg-imgage.jpg");*/ |
| | | background-image: url("../static/image/login_bg.jpg"); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | background-position: top center; |
| | | } |
| | | |
| | | #login-wrapper { |
| | | /*color: #fff;*/ |
| | | box-sizing:border-box; |
| | | /*background: #576669;*/ |
| | | background: #fff; |
| | | position: absolute; |
| | | top: 45%; |
| | | left: 50%; |
| | | margin-top: -210px; |
| | | margin-left: -220px; |
| | | width: 440px; |
| | | min-height: 420px; |
| | | padding: 50px; |
| | | text-align: center; |
| | | border-radius: 5px; |
| | | |
| | | transform-origin: 50% 50%; |
| | | animation: loading 1s 0s forwards; |
| | | transform: rotateX(0deg); |
| | | } |
| | | |
| | | #login-wrapper h2 { |
| | | letter-spacing: 3px; |
| | | font-size: 26px; |
| | | margin-bottom: 30px; |
| | | } |
| | | |
| | | .layadmin-user-login-body .layui-form-item { |
| | | margin-bottom: 20px; |
| | | position: relative; |
| | | } |
| | | .layadmin-user-login-body .layui-form-item .layui-input { |
| | | height: 42px; |
| | | padding-left: 40px; |
| | | font-size: 16px; |
| | | border: 1px solid #c8cccf; |
| | | color: inherit; |
| | | } |
| | | .login-submit { |
| | | margin-top: 30px; |
| | | } |
| | | .layadmin-user-login-icon { |
| | | position: absolute; |
| | | left: 1px; |
| | | top: 1px; |
| | | width: 38px; |
| | | line-height: 40px; |
| | | text-align: center; |
| | | color: #B2B2B2; |
| | | font-size: 18px; |
| | | } |
| | | .layui-btn-normal { |
| | | background-color: #0767aa; |
| | | font-size: 20px; |
| | | border-radius: 4px; |
| | | height: 52px; |
| | | } |
| | | .layui-form-checked[lay-skin=primary] i { |
| | | border-color: #0767aa!important; |
| | | background-color: #0767aa; |
| | | color: #fff; |
| | | } |
| | | .layui-form-checkbox[lay-skin=primary]:hover i { |
| | | border-color: #0767aa; |
| | | color: #fff; |
| | | } |
| | | #code-box { |
| | | position: relative; |
| | | height: 42px; |
| | | } |
| | | #code-label { |
| | | z-index: 999; |
| | | } |
| | | #code { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | display: inline-block; |
| | | width: 60%; |
| | | } |
| | | #codeImg { |
| | | border: 1px solid rgba(0,0,0,0.1); |
| | | position: absolute; |
| | | right: 5%; |
| | | top: 0; |
| | | width: 30%; |
| | | height: 90%; |
| | | } |
| | | </style> |
| | | <link rel="stylesheet" href="../static/css/login0.css"> |
| | | </head> |
| | | <body class="login-bg"> |
| | | |
| | | <div id="login-wrapper"> |
| | | <header> |
| | | <h2>系统登录</h2> |
| | | </header> |
| | | <div class="layui-form layadmin-user-login-body"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-icon layui-icon-username layadmin-user-login-icon"></label> |
| | | <input id="mobile" class="layui-input" type="text" name="mobile" lay-verify="mobile" placeholder="账号"> |
| | | <body> |
| | | <div class="dowebok"> |
| | | <div class="container"> |
| | | <div class="left"> |
| | | <div class="login">登录</div> |
| | | <div class="eula">欢迎光临,请输入您的电子邮箱和密码以登录!</div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-icon layui-icon-password layadmin-user-login-icon"></label> |
| | | <input id="password" class="layui-input" type="password" name="password" lay-verify="password" placeholder="密码"> |
| | | <div class="right"> |
| | | <svg viewBox="0 0 320 300"> |
| | | <defs> |
| | | <linearGradient inkscape:collect="always" id="linearGradient" x1="13" y1="193.49992" x2="307" |
| | | y2="193.49992" gradientUnits="userSpaceOnUse"> |
| | | <stop style="stop-color:#ff00ff;" offset="0" id="stop876" /> |
| | | <stop style="stop-color:#ff0000;" offset="1" id="stop878" /> |
| | | </linearGradient> |
| | | </defs> |
| | | <path d="m 40,120.00016 239.99984,-3.2e-4 c 0,0 24.99263,0.79932 25.00016,35.00016 0.008,34.20084 -25.00016,35 -25.00016,35 h -239.99984 c 0,-0.0205 -25,4.01348 -25,38.5 0,34.48652 25,38.5 25,38.5 h 215 c 0,0 20,-0.99604 20,-25 0,-24.00396 -20,-25 -20,-25 h -190 c 0,0 -20,1.71033 -20,25 0,24.00396 20,25 20,25 h 168.57143" /> |
| | | </svg> |
| | | <div class="form"> |
| | | <!-- <input type="password" style="position: absolute; z-index: -1">--> |
| | | <label for="username">电子邮件</label> |
| | | <input type="text" id="username"> |
| | | <label for="password">密码</label> |
| | | <input type="password" id="password"> |
| | | <input type="submit" id="submit" onclick="login()" value="登陆"> |
| | | </div> |
| | | </div> |
| | | <div id="code-box" class="layui-form-item" style=""> |
| | | <label id="code-label" class="layui-icon layui-icon-vercode layadmin-user-login-icon"></label> |
| | | <input id="code" class="layui-input" type="text" name="password" lay-verify="code" placeholder="验证码"> |
| | | <img id="codeImg" title="看不清?点击换一张。"> |
| | | </div> |
| | | <div class="layui-form-item" style="text-align: left;padding-left: 3px;"> |
| | | <input id="rememberPwd" style="vertical-align: middle" type="checkbox" lay-skin='primary' lay-filter="remPwd" title="记住密码" checked="checked"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item login-submit"> |
| | | <button id="login-button" class="layui-btn layui-btn-fluid layui-btn-normal" lay-submit="" lay-filter="login">登 录</button> |
| | | </div> |
| | | </div> |
| | | |
| | | </body> |
| | | <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/tools/anime.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <script type="text/javascript"> |
| | | |
| | | $(function () { |
| | |
| | | }, 100); |
| | | } |
| | | |
| | | function login() { |
| | | var username = $("#username").val(); |
| | | if (username === "") { |
| | | layer.msg("请输入账号", {offset: '150px'}); |
| | | return; |
| | | } |
| | | var password = $("#password").val(); |
| | | if (password === "") { |
| | | layer.msg("请输入密码", {offset: '150px'}); |
| | | return; |
| | | } |
| | | var user = { |
| | | username: username, |
| | | password: hex_md5(password) |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/login.action", |
| | | data: user, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | // 记住密码 |
| | | if($('#rememberPwd').is(':checked')){ |
| | | localStorage.setItem('oldUserName',user.username); |
| | | localStorage.setItem('oldPass',password); |
| | | } else { |
| | | localStorage.removeItem('oldUserName'); |
| | | localStorage.removeItem('oldPass'); |
| | | } |
| | | localStorage.setItem("token", res.data.token); |
| | | localStorage.setItem("username", res.data.nickname); |
| | | window.location.href = "index.html"; |
| | | } else { |
| | | layer.msg(res.msg, {offset: '150px'}); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | layui.use(['form','layer'],function () { |
| | | var form = layui.form, |
| | | layer = layui.layer, |
| | | $ = layui.jquery; |
| | | |
| | | form.on('submit(login)', function (data) { |
| | | var mobile = $("#mobile").val(); |
| | | if (mobile === "") { |
| | | layer.msg("请输入手机号", {offset: '150px'}); |
| | | return; |
| | | } |
| | | var password = $("#password").val(); |
| | | if (password === "") { |
| | | layer.msg("请输入密码", {offset: '150px'}); |
| | | return; |
| | | } |
| | | var code = $("#code").val(); |
| | | if (code === "" && codeSwitch === 'Y') { |
| | | layer.msg("请输入验证码", {offset: '150px'}); |
| | | return; |
| | | } |
| | | if (sessionStorage.getItem("code").toUpperCase() !== code.toUpperCase()&&codeSwitch==='Y'){ |
| | | layer.msg("验证码错误", {offset: '150px'}); |
| | | return; |
| | | } |
| | | |
| | | var user = { |
| | | mobile: mobile, |
| | | password: hex_md5(password) |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/login.action", |
| | | data: user, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | // 记住密码 |
| | | if($('#rememberPwd').is(':checked')){ |
| | | localStorage.setItem('oldUserName',user.mobile); |
| | | localStorage.setItem('oldPass',password); |
| | | } else { |
| | | localStorage.removeItem('oldUserName'); |
| | | localStorage.removeItem('oldPass'); |
| | | } |
| | | localStorage.setItem("token", res.data.token); |
| | | localStorage.setItem("username", res.data.username); |
| | | window.location.href = "index.html"; |
| | | } else { |
| | | layer.msg(res.msg, {offset: '150px'}); |
| | | } |
| | | } |
| | | }); |
| | | return false; |
| | | }); |
| | | |
| | |
| | | |
| | | }); |
| | | </script> |
| | | </html> |
| | | <script> |
| | | var current = null; |
| | | document.querySelector('#username').addEventListener('focus', function(e) { |
| | | if (current) current.pause(); |
| | | current = anime({ |
| | | targets: 'path', |
| | | strokeDashoffset: { |
| | | value: 0, |
| | | duration: 700, |
| | | easing: 'easeOutQuart' |
| | | }, |
| | | strokeDasharray: { |
| | | value: '240 1386', |
| | | duration: 700, |
| | | easing: 'easeOutQuart' |
| | | } |
| | | }); |
| | | }); |
| | | document.querySelector('#password').addEventListener('focus', function(e) { |
| | | if (current) current.pause(); |
| | | current = anime({ |
| | | targets: 'path', |
| | | strokeDashoffset: { |
| | | value: -336, |
| | | duration: 700, |
| | | easing: 'easeOutQuart' |
| | | }, |
| | | strokeDasharray: { |
| | | value: '240 1386', |
| | | duration: 700, |
| | | easing: 'easeOutQuart' |
| | | } |
| | | }); |
| | | }); |
| | | document.querySelector('#submit').addEventListener('focus', function(e) { |
| | | if (current) current.pause(); |
| | | current = anime({ |
| | | targets: 'path', |
| | | strokeDashoffset: { |
| | | value: -730, |
| | | duration: 700, |
| | | easing: 'easeOutQuart' |
| | | }, |
| | | strokeDasharray: { |
| | | value: '530 1386', |
| | | duration: 700, |
| | | easing: 'easeOutQuart' |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/originTable.css" media="all"> |
| | | <style> |
| | | #resetpwd-window .layui-form { |
| | | padding: 25px 30px 0 0; |
| | | body { |
| | | color: #595959; |
| | | background-color: #f5f7f9; |
| | | } |
| | | #resetpwd-window .layui-form-label { |
| | | padding: 8px 15px; |
| | | box-sizing: content-box; |
| | | -webkit-box-sizing: content-box; |
| | | } |
| | | #resetpwd-window .layui-form-required:before { |
| | | content: "*"; |
| | | display: inline-block; |
| | | font-family: SimSun,serif; |
| | | margin-right: 4px; |
| | | font-size: 14px; |
| | | line-height: 1; |
| | | color: #ed4014; |
| | | } |
| | | #resetpwd-window .layui-input { |
| | | height: 36px; |
| | | border-radius: 4px; |
| | | } |
| | | #resetpwd-window .cool-button-contain { |
| | | text-align: right; |
| | | margin: 20px 0; |
| | | } |
| | | #resetpwd-window .layui-form-radio>i:hover, .layui-form-radioed>i { |
| | | color: #007bff; |
| | | } |
| | | #resetpwd-window .layui-btn { |
| | | height: 36px; |
| | | line-height: 36px; |
| | | border-radius: 4px; |
| | | box-shadow: 0 1px 0 rgba(0,0,0,.03); |
| | | } |
| | | #resetpwd-window .layui-btn-primary:hover { |
| | | border-color: #777777; |
| | | |
| | | .admin-form { |
| | | padding: 25px 30px 0 0 !important; |
| | | margin: 0 !important; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mobile" placeholder="帐号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="roleId" class="layui-input" name="role_id" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="roleName" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="角色" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="roleQuery" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="roleQuerySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | <!-- 正文开始 --> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">用户名:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="username" class="layui-input" placeholder="输入用户名"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">手机号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="mobile" class="layui-input" placeholder="输入手机号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="userTbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <table id="userTable" lay-filter="userTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <table class="layui-hide" id="user" lay-filter="user"></table> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button>--> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | <script type="text/html" id="hostTpl"> |
| | | <span name="hostName" class="layui-badge layui-badge-gray">{{d.hostName}}</span> |
| | | </script> |
| | | |
| | | <script type="text/html" id="statusTpl"> |
| | | <input type="checkbox" name="status" value="{{d.status}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="statusSwitch" {{ d.status === 1 ? 'checked' : '' }}> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | |
| | | <a class="layui-btn layui-btn-xs btn-edit layui-btn-warm" lay-event="resetPwd">重置密码</a> |
| | | </script> |
| | | |
| | | <script type="text/html" id="statusTpl"> |
| | | <input type="checkbox" name="status" value="{{d.status}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="statusSwitch" {{ d.status === 1 ? 'checked' : '' }}> |
| | | <script type="text/html" id="userToolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-add" lay-event="add"><i class="layui-icon"></i>新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="del"><i class="layui-icon"></i>删除</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../../static/js/user/user.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | <!-- 重置密码 --> |
| | | <div id="resetpwd-window" style="display: none"> |
| | | <div class="layui-form"> |
| | | <input type="text" id="resetUserId" name="resetUserId" style="display: none"> |
| | | <script type="text/html" id="resetpwd-window"> |
| | | <form class="layui-form model-form"> |
| | | <input type="hidden" id="resetUserId" name="resetUserId"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">新密码:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="resetPassword" name="resetPassword" placeholder="请输入新密码" class="layui-input" lay-verify="required" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item cool-button-contain"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn layui-btn-normal" id="savePwd" lay-filter="savePwd" lay-submit="">确定</button> |
| | | <button class="layui-btn layui-btn-primary" id="cancel">取消</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form"> |
| | | <input name="id" type="hidden"> |
| | | <input name="status" type="hidden"> |
| | | <div class="layui-row"> |
| | | |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">用户名</label> |
| | | <div class="layui-input-block"> |
| | | <input name="username" placeholder="请输入用户名" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">角色:</label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input name="roleId" class="layui-input" style="display: none"> |
| | | <input id="roleName" name="roleName" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请选择角色" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="roleQuery" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="roleQuerySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">手机号</label> |
| | | <div class="layui-input-block"> |
| | | <input name="mobile" placeholder="请输入手机号" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">邮箱</label> |
| | | <div class="layui-input-block"> |
| | | <input name="email" placeholder="请输入邮箱" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../../static/js/user/user.js" charset="utf-8"></script> |
| | | |
| | | <!-- 项目编辑窗口 --> |
| | | <script type="text/html" id="hostEditDialog"> |
| | | <form id="hostEditForm" lay-filter="hostEditForm" class="layui-form model-form"> |
| | | <input name="id" type="hidden"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目名称:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="name" placeholder="请输入类型名称" class="layui-input" |
| | | lay-verType="tips" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="hostEditSubmit" lay-submit>保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |