mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:13:26 +08:00
后台【升级】:layuiadmin升级到最新版v2.6.0,layui升级到最新版v2.10.3
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>核心商城(CoreShop)后台管理</title>
|
<title>核心商城(CoreShop)后台管理</title>
|
||||||
<meta name="keywords" content="corecms,CoreShop,核心商城,核心小程序商城系统" />
|
<meta name="keywords" content="corecms,CoreShop,核心商城,核心小程序商城系统" />
|
||||||
<meta name="description" content="核心小程序商城系统(CoreShop)基于Asp.net 5.0 开发的支持可视化布局的商城系统、前后端分离,支持分布式部署,拥有分销、团购、直播、秒杀、优惠券、自定义页面等众多营销功能,拥有完整sku和下单流程的完全开源商城,致力于为中小企业打造一个完整、易于维护的开源的电商系统,采用现阶段流行技术实现。后台管理系统包含会员管理、商品管理、订单管理、财务管理、运营管理、多规格管理、内容管理、报表统计、促销设置、分销管理、多门店管理、权限管理、设置等模块。" />
|
<meta name="description" content="核心小程序商城系统(CoreShop)基于Asp.net 9.0 开发的支持可视化布局的商城系统、前后端分离,支持分布式部署,拥有分销、团购、直播、秒杀、优惠券、自定义页面等众多营销功能,拥有完整sku和下单流程的完全开源商城,致力于为中小企业打造一个完整、易于维护的开源的电商系统,采用现阶段流行技术实现。后台管理系统包含会员管理、商品管理、订单管理、财务管理、运营管理、多规格管理、内容管理、报表统计、促销设置、分销管理、多门店管理、权限管理、设置等模块。" />
|
||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta name="robots" content="noarchive">
|
<meta name="robots" content="noarchive">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
@@ -31,14 +31,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="LAY_app"></div>
|
<div id="LAY_app"></div>
|
||||||
<script src="/lib/layuiAdmin/layui/layui.js"></script>
|
<script src="/lib/layuiAdmin/layui/layui.js"></script>
|
||||||
<script>
|
<script src="/lib/layuiAdmin/index.js"></script>
|
||||||
var editor;
|
|
||||||
layui.config({
|
|
||||||
base: '/lib/layuiAdmin/',
|
|
||||||
version: new Date().getTime()
|
|
||||||
}).use('index');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="/lib/jquery/jquery-2.1.4.min.js"></script>
|
<script src="/lib/jquery/jquery-2.1.4.min.js"></script>
|
||||||
<script src="/static/js/common.js"></script>
|
<script src="/static/js/common.js"></script>
|
||||||
<link href="/static/css/overWrite.min.css" rel="stylesheet" />
|
<link href="/static/css/overWrite.min.css" rel="stylesheet" />
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
/** The Web UI Theme-v2.3.2 */; layui.define(['admin', "breadcrumb"],function(e){function a(e){var n,a=layui.router(),i=u(l.container),t=r.correctRouter(a.path.join("/"));if(layui.each(l.indPage,function(e,a){if(t===a)return n=!0}),layui.config({base:l.paths.base+"modules/"}),n||"/user/login"===t)i.render(a.path.join("/")).done(function(){r.pageType="alone"});else{if(l.interceptor)if(!layui.data(l.tableName)[l.request.tokenName])return location.hash="/user/login/redirect="+encodeURIComponent(t);"console"===r.pageType?c():i.render("layout").done(function(){c(),layui.element.render(),r.screen()<2&&r.sideFlexible(),r.pageType="console"})}}var l=layui.setter,o=layui.element,r=layui.admin,s=r.tabsPage,u=layui.view,c=function(){function e(e){c.haveInit&&h(".layui-layer").each(function(){var e=h(this),a=e.attr("times");e.hasClass("layui-layim")||e.hasClass("layui-layim-chat")||layer.close(a)}),c.haveInit=!0,h(d).scrollTop(0),delete s.type}var i=layui.router(),a=i.path,t=r.correctRouter(i.path.join("/"));""===(a=a.length?a:[""])[a.length-1]&&(a[a.length-1]=l.entry);if("tab"===s.type&&("/"!==t||"/"===t&&r.tabsBody().html()))return r.tabsBodyChange(s.index),e(s.type);u().render(a.join("/")).then(function(e){var a,n=h("#LAY_app_tabsheader>li");n.each(function(e){h(this).attr("lay-id")===t&&(a=!0,s.index=e)}),l.pageTabs&&"/"!==t&&!a&&(h(d).append('<div class="layadmin-tabsbody-item layui-show"></div>'),s.index=n.length,o.tabAdd(y,{title:"<span>"+(e.title||"\u65b0\u6807\u7b7e\u9875")+"</span>",id:t,attr:i.href})),this.container=r.tabsBody(s.index),l.pageTabs||this.container.scrollTop(0),o.tabChange(y,t),r.tabsBodyChange(s.index)}).done(function(){layui.use("common",layui.cache.callback.common),n.on("resize",layui.data.resize),o.render("breadcrumb","breadcrumb"),r.tabsBody(s.index).on("scroll",function(){var e=h(this),a=h(".layui-laydate"),n=h(".layui-layer")[0];a[0]&&(a.each(function(){var e=h(this);e.hasClass("layui-laydate-static")||e.remove()}),e.find("input").blur()),n&&layer.closeAll("tips")})}),e()},d="#LAY_app_body",y="layadmin-layout-tabs",h=layui.$,n=h(window),i=(layui.link(l.paths.core+"css/admin.css?v="+r.v,function(){a()},"layuiAdmin"),window.onhashchange=function(){a(),layui.event.call(this,l.MOD_NAME,"hash({*})",layui.router())},{render:c});h.extend(r,i),e("adminIndex",i)});
|
/** The Web UI Theme-v2.6.0 */;layui.define("admin",function(a){function e(a){var n,e=layui.hash(),i=c(l.container),t=s.correctRouter(e.path.join("/"));if(layui.each(l.indPage,function(a,e){if(t===e)return n=!0}),layui.config({base:l.paths.base+"modules/"}),n||"/user/login"===t)i.render(e.path.join("/")).done(function(){s.pageType="alone"});else{if(l.interceptor)if(!layui.data(l.tableName)[l.request.tokenName])return location.hash="/user/login/redirect="+encodeURIComponent(e.href||"");"console"===s.pageType?h():i.render("layout").done(function(){p.firstSymbolEXP.test(location.hash)||(location.hash="/"+location.hash),h(),layui.element.render(),s.screen()<2&&s.sideFlexible(),s.pageType="console"})}}var l=layui.setter,o=layui.element,s=layui.admin,r=s.tabsPage,c=layui.view,h=function(){function a(a){h.haveInit&&d(".layui-layer").each(function(){var a=d(this),e=a.attr("times");a.hasClass("layui-layim")||a.hasClass("layui-layim-chat")||layer.close(e)}),h.haveInit=!0,d(u).scrollTop(0),delete r.type}var i=layui.hash(),e=i.path,t=s.correctRouter(i.path.join("/"));""===(e=e.length?e:[""])[e.length-1]&&(e[e.length-1]=l.entry);if("tab"===r.type&&("/"!==t||"/"===t&&s.tabsBody().html()))return s.tabsBodyChange(r.index),a(r.type);c().render(e.join("/")).then(function(a){var e,n=d("#LAY_app_tabsheader>li");n.each(function(a){d(this).attr("lay-id")===t&&(e=!0,r.index=a)}),l.pageTabs&&"/"!==t&&!e&&(d(u).append('<div class="layadmin-tabsbody-item layui-show"></div>'),r.index=n.length,o.tabAdd(y,{title:"<span>"+(a.title||"\u65b0\u6807\u7b7e\u9875")+"</span>",id:t,attr:i.href})),this.container=s.tabsBody(r.index),l.pageTabs||this.container.scrollTop(0),o.tabChange(y,t),s.tabsBodyChange(r.index)}).done(function(){layui.use("common",layui.cache.callback.common),n.on("resize",layui.data.resize),o.render("breadcrumb","breadcrumb"),s.tabsBody(r.index).on("scroll",function(){var a=d(this),e=d(".layui-laydate"),n=d(".layui-layer")[0];e[0]&&(e.each(function(){var a=d(this);a.hasClass("layui-laydate-static")||a.remove()}),a.find("input").blur()),n&&layer.closeAll("tips")})}),a()},u="#LAY_app_body",y="layadmin-layout-tabs",d=layui.$,n=d(window),p=(layui.link(l.paths.core+"css/admin.css?v="+s.v,function(){e()},"layuiAdmin"),window.onhashchange=function(){p.firstSymbolEXP.test(location.hash)&&(e(),layui.event.call(this,l.MOD_NAME,"hash({*})",layui.hash()))},{firstSymbolEXP:/^#\//,render:h});d.extend(s,p),a("adminIndex",p)});
|
||||||
@@ -1 +1 @@
|
|||||||
/** The Web UI Theme-v2.3.2 */;layui.define(["laytpl","layer"],function(e){function u(e){return new t(e)}function t(e){this.id=e,this.container=c("#"+(e||a))}var c=layui.jquery,p=layui.laytpl,r=layui.layer,s=layui.setter,y=(layui.device(),layui.hint()),a="LAY_app_body";u.loading=function(e){e.append(this.elemLoad=c('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon layui-icon-loading layadmin-loading"></i>'))},u.removeLoad=function(){this.elemLoad&&this.elemLoad.remove()},u.exit=function(){layui.data(s.tableName,{key:s.request.tokenName,remove:!0}),location.hash="/user/login"},u.req=function(a){function n(){return s.debug?"<br><cite>URL\uff1a</cite>"+a.url:""}var e,r=a.success,o=a.error,t=s.request,i=s.response;return a.data=a.data||{},a.headers=a.headers||{},t.tokenName&&(e="string"==typeof a.data?JSON.parse(a.data):a.data,a.data[t.tokenName]=t.tokenName in e?a.data[t.tokenName]:layui.data(s.tableName)[t.tokenName]||"",a.headers[t.tokenName]=t.tokenName in a.headers?a.headers[t.tokenName]:layui.data(s.tableName)[t.tokenName]||""),delete a.success,delete a.error,c.ajax(c.extend({type:"get",dataType:"json",success:function(e){var t=i.statusCode;e[i.statusName]==t.ok?"function"==typeof a.done&&a.done(e):e[i.statusName]==t.logout?u.exit():(t=["<cite>Error\uff1a</cite> "+(e[i.msgName]||"\u8fd4\u56de\u72b6\u6001\u7801\u5f02\u5e38"),n()].join(""),u.error(t)),"function"==typeof r&&r(e)},error:function(e,t){var a=["\u8bf7\u6c42\u5f02\u5e38\uff0c\u8bf7\u91cd\u8bd5<br><cite>\u9519\u8bef\u4fe1\u606f\uff1a</cite>"+t,n()].join("");u.error(a),"function"==typeof o&&o.apply(this,arguments)}},a))},u.popup=function(e){var n=e.success,t=e.skin;return delete e.success,delete e.skin,r.open(c.extend({type:1,title:"\u63d0\u793a",content:"",id:"LAY-system-view-popup",skin:"layui-layer-admin"+(t?" "+t:""),shadeClose:!0,closeBtn:!1,success:function(e,t){var a=c('<i class="layui-icon" close>ဆ</i>');e.append(a),a.on("click",function(){r.close(t)}),"function"==typeof n&&n.apply(this,arguments)}},e))},u.error=function(e,t){return u.popup(c.extend({content:e,maxWidth:300,offset:"t",anim:6,id:"LAY_adminError"},t))},t.prototype.render=function(e,n){var r=this;layui.router();return e=(s.paths&&s.paths.views?s.paths:s).views+e+s.engine,c("#"+a).children(".layadmin-loading").remove(),u.loading(r.container),c.ajax({url:e,type:"get",dataType:"html",data:{v:layui.cache.version},success:function(e){var t=c(e="<div>"+e+"</div>").find("title"),a={title:t.text()||(e.match(/\<title\>([\s\S]*)\<\/title>/)||[])[1],body:e};t.remove(),r.params=n||{},r.then&&(r.then(a),delete r.then),r.parse(e),u.removeLoad(),r.done&&(r.done(a),delete r.done)},error:function(e){if(u.removeLoad(),r.render.isError)return u.error("\u8bf7\u6c42\u89c6\u56fe\u6587\u4ef6\u5f02\u5e38\uff0c\u72b6\u6001\uff1a"+e.status);404===e.status?r.render("template/tips/404"):r.render("template/tips/error"),r.render.isError=!0}}),r},t.prototype.parse=function(e,t,n){function o(t){var e=p(t.dataElem.html()),a=c.extend({params:d.params},t.res);t.dataElem.after(e.render(a)),"function"==typeof n&&n();try{t.done&&new Function("d",t.done)(a)}catch(e){console.error(t.dataElem[0],"\n\u5b58\u5728\u9519\u8bef\u56de\u8c03\u811a\u672c\n\n",e)}}var a=this,r="object"==typeof e,i=r?e:c(e),s=r?e:i.find("*[template]"),d=layui.router();i.find("title").remove(),a.container[t?"after":"html"](i.children()),d.params=a.params||{};for(var l=s.length;0<l;l--)!function(){var t=s.eq(l-1),a=t.attr("lay-done")||t.attr("lay-then"),e=p(t.attr("lay-url")||"").render(d),n=p(t.attr("lay-data")||"").render(d),r=p(t.attr("lay-headers")||"").render(d);try{n=new Function("return "+n+";")()}catch(e){y.error("lay-data: "+e.message),n={}}try{r=new Function("return "+r+";")()}catch(e){y.error("lay-headers: "+e.message),r=r||{}}e?u.req({type:t.attr("lay-type")||"get",url:e,data:n,dataType:"json",headers:r,success:function(e){o({dataElem:t,res:e,done:a})}}):o({dataElem:t,done:a})}();return a},t.prototype.send=function(e,t){e=p(e||this.container.html()).render(t||{});return this.container.html(e),this},t.prototype.refresh=function(e){var t=this,a=t.container.next().attr("lay-templateid");return t.id!=a||t.parse(t.container,"refresh",function(){t.container.siblings('[lay-templateid="'+t.id+'"]:last').remove(),"function"==typeof e&&e()}),t},t.prototype.then=function(e){return this.then=e,this},t.prototype.done=function(e){return this.done=e,this},e("view",u)});
|
/** The Web UI Theme-v2.6.0 */;layui.define(["laytpl","layer"],function(e){function u(e){return new t(e)}function t(e){this.id=e,this.container=c("#"+(e||a))}var c=layui.jquery,p=layui.laytpl,r=layui.layer,s=layui.setter,y=(layui.device(),layui.hint()),a="LAY_app_body";u.loading=function(e){e.append(this.elemLoad=c('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon layui-icon-loading layadmin-loading"></i>'))},u.removeLoad=function(){this.elemLoad&&this.elemLoad.remove()},u.exit=function(){layui.data(s.tableName,{key:s.request.tokenName,remove:!0}),r.closeAll(),location.hash="/user/login"},u.req=function(a){function n(){return s.debug?"<br><cite>URL\uff1a</cite>"+a.url:""}var e,r=a.success,o=a.error,t=s.request,i=s.response;return a.data=a.data||{},a.headers=a.headers||{},t.tokenName&&(e="string"==typeof a.data?JSON.parse(a.data):a.data,"headers"===t.tokenTransferMethod?a.headers[t.tokenName]=t.tokenName in a.headers?a.headers[t.tokenName]:layui.data(s.tableName)[t.tokenName]||"":a.data[t.tokenName]=t.tokenName in e?a.data[t.tokenName]:layui.data(s.tableName)[t.tokenName]||""),delete a.success,delete a.error,c.ajax(c.extend({type:"get",dataType:"json",success:function(e){var t=i.statusCode;e[i.statusName]==t.ok?"function"==typeof a.done&&a.done(e):e[i.statusName]==t.logout?u.exit():(t=["<cite>Error\uff1a</cite> "+(e[i.msgName]||"\u8fd4\u56de\u72b6\u6001\u7801\u5f02\u5e38"),n()].join(""),u.error(t)),"function"==typeof r&&r(e)},error:function(e,t){t=["\u8bf7\u6c42\u5f02\u5e38\uff0c\u8bf7\u91cd\u8bd5<br><cite>\u9519\u8bef\u4fe1\u606f\uff1a</cite>"+t,n()].join("");u.error(t),"function"==typeof o&&o.apply(this,arguments)}},a))},u.popup=function(e){var n=e.success,t=e.skin;return delete e.success,delete e.skin,r.open(c.extend({type:1,title:"\u63d0\u793a",content:"",id:"LAY-system-view-popup",skin:"layui-layer-admin"+(t?" "+t:""),shadeClose:!0,closeBtn:!1,success:function(e,t){var a=c('<i class="layui-icon" close>ဆ</i>');e.append(a),a.on("click",function(){r.close(t)}),"function"==typeof n&&n.apply(this,arguments)}},e))},u.error=function(e,t){return u.popup(c.extend({content:e,maxWidth:300,offset:"t",anim:6,id:"LAY_adminError"},t))},t.prototype.render=function(e,n){var r=this;layui.hash();return e=e.replace(/^\//,""),e=(s.paths&&s.paths.views?s.paths:s).views+e+s.engine,c("#"+a).children(".layadmin-loading").remove(),u.loading(r.container),c.ajax({url:e,type:"get",dataType:"html",data:{v:layui.cache.version},success:function(e){var t=c(e="<div>"+e+"</div>").find("title"),a={title:t.text()||(e.match(/\<title\>([\s\S]*)\<\/title>/)||[])[1],body:e};t.remove(),r.params=n||{},r.then&&(r.then(a),delete r.then),r.parse(e),u.removeLoad(),r.done&&(r.done(a),delete r.done)},error:function(e){if(u.removeLoad(),r.render.isError)return u.error("\u8bf7\u6c42\u89c6\u56fe\u6587\u4ef6\u5f02\u5e38\uff0c\u72b6\u6001\uff1a"+e.status);404===e.status?r.render("template/tips/404"):r.render("template/tips/error"),r.render.isError=!0}}),r},t.prototype.parse=function(e,t,n){function o(t){var e=p(t.dataElem.html()),a=c.extend({params:d.params},t.res);t.dataElem.after(e.render(a)),"function"==typeof n&&n();try{t.done&&new Function("d",t.done)(a)}catch(e){console.error(t.dataElem[0],"\n\u5b58\u5728\u9519\u8bef\u56de\u8c03\u811a\u672c\n\n",e)}}var a=this,r="object"==typeof e,i=r?e:c(e),s=r?e:i.find("*[template]"),d=layui.hash();i.find("title").remove(),a.container[t?"after":"html"](i.children()),d.params=a.params||{};for(var l=s.length;0<l;l--)(()=>{var t=s.eq(l-1),a=t.attr("lay-done")||t.attr("lay-then"),e=p(t.attr("lay-url")||"").render(void 0),n=p(t.attr("lay-data")||"").render(e),r=p(t.attr("lay-headers")||"").render(e);try{n=new Function("return "+n+";")()}catch(e){y.error("lay-data: "+e.message),n={}}try{r=new Function("return "+r+";")()}catch(e){y.error("lay-headers: "+e.message),r=r||{}}e?u.req({type:t.attr("lay-type")||"get",url:e,data:n,dataType:"json",headers:r,success:function(e){o({dataElem:t,res:e,done:a})}}):o({dataElem:t,done:a})})();return a},t.prototype.send=function(e,t){e=p(e||this.container.html()).render(t||{});return this.container.html(e),this},t.prototype.refresh=function(e){var t=this,a=t.container.next().attr("lay-templateid");return t.id==a&&t.parse(t.container,"refresh",function(){t.container.siblings('[lay-templateid="'+t.id+'"]:last').remove(),"function"==typeof e&&e()}),t},t.prototype.then=function(e){return this.then=e,this},t.prototype.done=function(e){return this.done=e,this},e("view",u)});
|
||||||
@@ -32,11 +32,12 @@ layui.define('view', function(exports){
|
|||||||
var ICON_SHRINK = 'layui-icon-shrink-right';
|
var ICON_SHRINK = 'layui-icon-shrink-right';
|
||||||
var ICON_SPREAD = 'layui-icon-spread-left';
|
var ICON_SPREAD = 'layui-icon-spread-left';
|
||||||
var SIDE_SHRINK = 'layadmin-side-shrink';
|
var SIDE_SHRINK = 'layadmin-side-shrink';
|
||||||
|
var SIDE_SCROLL = 'layui-side-scroll';
|
||||||
var SIDE_MENU = 'LAY-system-side-menu';
|
var SIDE_MENU = 'LAY-system-side-menu';
|
||||||
|
|
||||||
// 通用方法
|
// 通用方法
|
||||||
var admin = {
|
var admin = {
|
||||||
v: '2.3.2',
|
v: '2.6.0',
|
||||||
mode: 'spa',
|
mode: 'spa',
|
||||||
|
|
||||||
// 数据的异步请求
|
// 数据的异步请求
|
||||||
@@ -73,6 +74,128 @@ layui.define('view', function(exports){
|
|||||||
}, options));
|
}, options));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 渲染侧边菜单
|
||||||
|
renderMenuItems: function(res) {
|
||||||
|
var url = layui.hash()
|
||||||
|
var path = url.path
|
||||||
|
var pathURL = path.join('/')
|
||||||
|
var dataName = layui.setter.response.dataName;
|
||||||
|
var childrenName = 'children'; // 用于存放子菜单集合的名称
|
||||||
|
|
||||||
|
// 递归
|
||||||
|
return (function eachItems(data, itemTagName) {
|
||||||
|
itemTagName = itemTagName || 'li'; // 菜单项标签名
|
||||||
|
var arr = [];
|
||||||
|
var isli = itemTagName === 'li';
|
||||||
|
|
||||||
|
layui.each(data || res[dataName], function(index, item) {
|
||||||
|
// 是否有子菜单
|
||||||
|
var hasChildren = typeof item[childrenName] === 'object' && item[childrenName].length > 0
|
||||||
|
var url = item.url || ''; // URL
|
||||||
|
var primaryClassName = isli ? 'layui-nav-item' : '' // 初始 className
|
||||||
|
var selectedClassName = function() { // 选中的 className
|
||||||
|
var matched = (!data && index == 0 && !path[0]) // 匹配首页
|
||||||
|
|| (pathURL === url) // 按 URL 匹配
|
||||||
|
|| item.spread // 展开状态
|
||||||
|
// 返回选中样式
|
||||||
|
return matched ? (hasChildren ? 'layui-nav-itemed' : 'layui-this') : '';
|
||||||
|
};
|
||||||
|
// 递归子菜单
|
||||||
|
var eachChildItems = function() {
|
||||||
|
return hasChildren
|
||||||
|
? '<dl class="layui-nav-child">'+ eachItems(item[childrenName], 'dd') + '</dl>'
|
||||||
|
: '';
|
||||||
|
};
|
||||||
|
// 子菜单父元素
|
||||||
|
arr.push([
|
||||||
|
'<'+ itemTagName +' class="'+ primaryClassName +' '+ selectedClassName() +'">',
|
||||||
|
'<a href="javascript:;"'+ function() {
|
||||||
|
var attrs = [];
|
||||||
|
if (!hasChildren) {
|
||||||
|
attrs.push('lay-href="'+ url +'"');
|
||||||
|
}
|
||||||
|
if (item.pageMode) {
|
||||||
|
attrs.push('lay-page-mode="'+ item.pageMode +'"');
|
||||||
|
}
|
||||||
|
if (isli) {
|
||||||
|
attrs.push('lay-tips="'+ item.title +'"');
|
||||||
|
attrs.push('lay-direction="2"');
|
||||||
|
}
|
||||||
|
return attrs.length ? ' '+ attrs.join('') : '';
|
||||||
|
}() +'>',
|
||||||
|
'<i class="layui-icon '+ (item.icon || '') +'"></i>',
|
||||||
|
'<cite>'+ (item.title || '未命名') +'</cite>',
|
||||||
|
'</a>',
|
||||||
|
eachChildItems(), // 子菜单
|
||||||
|
'</'+ itemTagName +'>'
|
||||||
|
].join(''));
|
||||||
|
});
|
||||||
|
return arr.join('');
|
||||||
|
})();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 设置侧边状态展开和选中状态,并同步其他状态
|
||||||
|
setSideMenuStatus: function(url) {
|
||||||
|
url = url || layui.hash();
|
||||||
|
|
||||||
|
var sideMenu = $('#'+ SIDE_MENU);
|
||||||
|
var SIDE_NAV_ITEM = 'layui-nav-item';
|
||||||
|
var SIDE_NAV_ITEMD = 'layui-nav-itemed';
|
||||||
|
var selectMenuItem = function(item) {
|
||||||
|
item.addClass(SIDE_NAV_ITEMD).siblings().removeClass(SIDE_NAV_ITEMD);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 捕获对应菜单
|
||||||
|
var matchMenu = function(list) {
|
||||||
|
var pathURL = url.path.join('/');
|
||||||
|
// var tabsData = setter.tabs ? tabs.data(TABS_ID) : {};
|
||||||
|
|
||||||
|
list.find('li,dd').each(function(index, item) {
|
||||||
|
var othis = $(this);
|
||||||
|
var elemA = othis.children('a');
|
||||||
|
var href = admin.correctRouter(elemA.attr('lay-href'));
|
||||||
|
var matched = href === url.href || href === pathURL || function() {
|
||||||
|
var href2Hash = layui.hash('#'+ href);
|
||||||
|
var hrefPath = href2Hash.path.join('/');
|
||||||
|
return url.href.indexOf(hrefPath) !== -1;
|
||||||
|
}()
|
||||||
|
|
||||||
|
// 匹配当前路由对应的菜单
|
||||||
|
if (matched) {
|
||||||
|
list.find('.'+ THIS).removeClass(THIS); // 清除旧选中状态
|
||||||
|
othis.addClass(THIS); // 设置当前选中状态
|
||||||
|
|
||||||
|
// 自动展开祖级节点
|
||||||
|
var closestLi = othis.closest('.'+ SIDE_NAV_ITEM);
|
||||||
|
var closestDd = othis.parent().closest('dd')
|
||||||
|
selectMenuItem(closestLi);
|
||||||
|
selectMenuItem(closestDd);
|
||||||
|
|
||||||
|
// 让选中的菜单保持在可视范围内
|
||||||
|
util.toVisibleArea({
|
||||||
|
scrollElem: container.find('.'+ SIDE_SCROLL),
|
||||||
|
thisElem: othis
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始设置 tabs 标题
|
||||||
|
/* if (!args[0] && setter.tabs) {
|
||||||
|
var title = elemA.attr('lay-title') || elemA.text().replace(/\s/g, '');
|
||||||
|
tabs.headerItem(TABS_ID, tabsData.index).find('span').html(title);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 重置状态
|
||||||
|
sideMenu.find('.'+ THIS).removeClass(THIS);
|
||||||
|
|
||||||
|
// 移动端点击菜单时自动收缩
|
||||||
|
if(admin.screen() < 2) admin.sideFlexible();
|
||||||
|
|
||||||
|
// 开始捕获
|
||||||
|
matchMenu(sideMenu);
|
||||||
|
},
|
||||||
|
|
||||||
// 发送验证码
|
// 发送验证码
|
||||||
sendAuthCode: function(options) {
|
sendAuthCode: function(options) {
|
||||||
options = $.extend({
|
options = $.extend({
|
||||||
@@ -121,7 +244,7 @@ layui.define('view', function(exports){
|
|||||||
}
|
}
|
||||||
|
|
||||||
admin.req($.extend(true, {
|
admin.req($.extend(true, {
|
||||||
url: '/auth/code'
|
url: ''
|
||||||
,type: 'get'
|
,type: 'get'
|
||||||
,data: {
|
,data: {
|
||||||
phone: value
|
phone: value
|
||||||
@@ -310,15 +433,15 @@ layui.define('view', function(exports){
|
|||||||
|
|
||||||
// 切换页面标签主体
|
// 切换页面标签主体
|
||||||
tabsBodyChange: function(index){
|
tabsBodyChange: function(index){
|
||||||
admin.tabsHeader(index).attr('lay-attr', layui.router().href);
|
admin.tabsHeader(index).attr('lay-attr', layui.hash().href);
|
||||||
admin.tabsBody(index).addClass(SHOW).siblings().removeClass(SHOW);
|
admin.tabsBody(index).addClass(SHOW).siblings().removeClass(SHOW);
|
||||||
events.rollPage('auto', index);
|
events.rollPage('auto', index);
|
||||||
},
|
},
|
||||||
|
|
||||||
// resize事件管理
|
// resize事件管理
|
||||||
resize: function(fn){
|
resize: function(fn){
|
||||||
var router = layui.router()
|
var url = layui.hash();
|
||||||
,key = router.path.join('-');
|
var key = url.path.join('-');
|
||||||
|
|
||||||
if(admin.resizeFn[key]){
|
if(admin.resizeFn[key]){
|
||||||
$win.off('resize', admin.resizeFn[key]);
|
$win.off('resize', admin.resizeFn[key]);
|
||||||
@@ -332,8 +455,8 @@ layui.define('view', function(exports){
|
|||||||
},
|
},
|
||||||
resizeFn: {},
|
resizeFn: {},
|
||||||
runResize: function(){
|
runResize: function(){
|
||||||
var router = layui.router()
|
var url = layui.hash()
|
||||||
,key = router.path.join('-');
|
var key = url.path.join('-');
|
||||||
admin.resizeFn[key] && admin.resizeFn[key]();
|
admin.resizeFn[key] && admin.resizeFn[key]();
|
||||||
},
|
},
|
||||||
delResize: function(){
|
delResize: function(){
|
||||||
@@ -624,12 +747,16 @@ layui.define('view', function(exports){
|
|||||||
// 关闭其它标签页
|
// 关闭其它标签页
|
||||||
,closeOtherTabs: function(type){
|
,closeOtherTabs: function(type){
|
||||||
var TABS_REMOVE = 'LAY-system-pagetabs-remove';
|
var TABS_REMOVE = 'LAY-system-pagetabs-remove';
|
||||||
|
var thisIndex = admin.tabsPage.index;
|
||||||
if(type === 'all'){
|
if(type === 'all'){
|
||||||
$(TABS_HEADER+ ':gt(0)').remove();
|
$(TABS_HEADER+ ':gt(0)').remove();
|
||||||
$(APP_BODY).find('.'+ TABS_BODY+ ':gt(0)').remove();
|
$(APP_BODY).find('.'+ TABS_BODY+ ':gt(0)').remove();
|
||||||
|
} else if(type === 'right') {
|
||||||
|
$(TABS_HEADER+ ':gt('+ thisIndex +')').remove();
|
||||||
|
$(APP_BODY).find('.'+ TABS_BODY+ ':gt('+ thisIndex +')').remove();
|
||||||
} else {
|
} else {
|
||||||
$(TABS_HEADER).each(function(index, item){
|
$(TABS_HEADER).each(function(index, item){
|
||||||
if(index && index != admin.tabsPage.index){
|
if(index && index != thisIndex){
|
||||||
$(item).addClass(TABS_REMOVE);
|
$(item).addClass(TABS_REMOVE);
|
||||||
admin.tabsBody(index).addClass(TABS_REMOVE);
|
admin.tabsBody(index).addClass(TABS_REMOVE);
|
||||||
}
|
}
|
||||||
@@ -638,6 +765,11 @@ layui.define('view', function(exports){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 关闭右侧标签页
|
||||||
|
,closeRightTabs: function() {
|
||||||
|
events.closeOtherTabs('right');
|
||||||
|
}
|
||||||
|
|
||||||
// 关闭全部标签页
|
// 关闭全部标签页
|
||||||
,closeAllTabs: function(){
|
,closeAllTabs: function(){
|
||||||
events.closeOtherTabs('all');
|
events.closeOtherTabs('all');
|
||||||
@@ -689,78 +821,7 @@ layui.define('view', function(exports){
|
|||||||
// admin.prevRouter = {}; // 上一个路由
|
// admin.prevRouter = {}; // 上一个路由
|
||||||
|
|
||||||
// hash 改变侧边状态
|
// hash 改变侧边状态
|
||||||
admin.on('hash(side)', function(router){
|
admin.on('hash(side)', admin.setSideMenuStatus);
|
||||||
var path = router.path;
|
|
||||||
var getData = function(item){
|
|
||||||
return {
|
|
||||||
list: item.children('.layui-nav-child'),
|
|
||||||
name: item.data('name'),
|
|
||||||
jump: item.data('jump')
|
|
||||||
};
|
|
||||||
};
|
|
||||||
var sideMenu = $('#'+ SIDE_MENU);
|
|
||||||
var SIDE_NAV_ITEMD = 'layui-nav-itemed';
|
|
||||||
|
|
||||||
// 捕获对应菜单
|
|
||||||
var matchMenu = function(list){
|
|
||||||
var pathURL = admin.correctRouter(router.href);
|
|
||||||
list.each(function(index1, item1){
|
|
||||||
var othis1 = $(item1);
|
|
||||||
var data1 = getData(othis1);
|
|
||||||
var listChildren1 = data1.list.children('dd');
|
|
||||||
var matched1 = path[0] == data1.name || (index1 === 0 && !path[0])
|
|
||||||
|| (data1.jump && pathURL == admin.correctRouter(data1.jump));
|
|
||||||
|
|
||||||
listChildren1.each(function(index2, item2){
|
|
||||||
var othis2 = $(item2);
|
|
||||||
var data2 = getData(othis2);
|
|
||||||
var listChildren2 = data2.list.children('dd');
|
|
||||||
var matched2 = (path[0] == data1.name && path[1] == data2.name)
|
|
||||||
|| (data2.jump && pathURL == admin.correctRouter(data2.jump));
|
|
||||||
|
|
||||||
listChildren2.each(function(index3, item3){
|
|
||||||
var othis3 = $(item3);
|
|
||||||
var data3 = getData(othis3);
|
|
||||||
var matched3 = (path[0] == data1.name && path[1] == data2.name && path[2] == data3.name)
|
|
||||||
|| (data3.jump && pathURL == admin.correctRouter(data3.jump));
|
|
||||||
|
|
||||||
// 匹配 3 级菜单
|
|
||||||
if(matched3){
|
|
||||||
var selected = data3.list[0] ? SIDE_NAV_ITEMD : THIS;
|
|
||||||
othis3.addClass(selected).siblings().removeClass(selected); // 标记选择器
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// 匹配 2 级菜单
|
|
||||||
if(matched2){
|
|
||||||
var selected = data2.list[0] ? SIDE_NAV_ITEMD : THIS;
|
|
||||||
othis2.addClass(selected).siblings().removeClass(selected); // 标记选择器
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// 匹配 1 级菜单
|
|
||||||
if(matched1){
|
|
||||||
var selected = data1.list[0] ? SIDE_NAV_ITEMD : THIS;
|
|
||||||
othis1.addClass(selected).siblings().removeClass(selected); // 标记选择器
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 重置状态
|
|
||||||
sideMenu.find('.'+ THIS).removeClass(THIS);
|
|
||||||
|
|
||||||
// 移动端点击菜单时自动收缩
|
|
||||||
if(admin.screen() < 2) admin.sideFlexible();
|
|
||||||
|
|
||||||
// 开始捕获
|
|
||||||
matchMenu(sideMenu.children('li'));
|
|
||||||
});
|
|
||||||
|
|
||||||
// 侧边导航点击事件
|
// 侧边导航点击事件
|
||||||
element.on('nav(layadmin-system-side-menu)', function(elem){
|
element.on('nav(layadmin-system-side-menu)', function(elem){
|
||||||
@@ -823,17 +884,17 @@ layui.define('view', function(exports){
|
|||||||
$body.on('click', '*[lay-href]', function(){
|
$body.on('click', '*[lay-href]', function(){
|
||||||
var othis = $(this)
|
var othis = $(this)
|
||||||
var href = othis.attr('lay-href')
|
var href = othis.attr('lay-href')
|
||||||
var router = layui.router();
|
var url = layui.hash();
|
||||||
|
|
||||||
admin.tabsPage.elem = othis;
|
admin.tabsPage.elem = othis;
|
||||||
// admin.prevRouter[router.path[0]] = router.href; // 记录上一次各菜单的路由信息
|
// admin.prevRouter[router.path[0]] = url.href; // 记录上一次各菜单的路由信息
|
||||||
|
|
||||||
// 执行跳转
|
// 执行跳转
|
||||||
location.hash = admin.correctRouter(href);
|
location.hash = admin.correctRouter(href);
|
||||||
|
|
||||||
// 如果为当前页,则执行刷新
|
// 如果为当前页,则执行刷新
|
||||||
if (setter.refreshCurrPage) {
|
if (setter.refreshCurrPage) {
|
||||||
if(admin.correctRouter(href) === router.href){
|
if (admin.correctRouter(href) === url.href) {
|
||||||
admin.events.refresh();
|
admin.events.refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -892,24 +953,33 @@ layui.define('view', function(exports){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 设置组件全局 token
|
// 预设基础组件 token,以便在组件请求数据时自动传递 token
|
||||||
(function(){
|
admin.setComponentsToken = (function fn(opts) {
|
||||||
var request = setter.request;
|
var request = setter.request;
|
||||||
|
opts = $.extend({}, opts);
|
||||||
|
// 若开启 token 功能
|
||||||
if (request.tokenName) {
|
if (request.tokenName) {
|
||||||
|
// 根据 token 的传递方式,给组件返回动态配置项
|
||||||
|
var dynamicOptions = function(dataAlias) {
|
||||||
|
var rst = {};
|
||||||
var obj = {};
|
var obj = {};
|
||||||
obj[request.tokenName] = layui.data(setter.tableName)[request.tokenName] || ''
|
obj[request.tokenName] = layui.data(setter.tableName)[request.tokenName] || opts.value || '';
|
||||||
|
|
||||||
// table
|
// token 的传参方式
|
||||||
table.set({
|
if (request.tokenTransferMethod === 'headers') { // Headers 方式传递
|
||||||
headers: obj, // 通过 request 头传递
|
rst.headers = obj;
|
||||||
where: obj // 通过参数传递
|
} else { // data 方式传递 --- 默认
|
||||||
});
|
rst[dataAlias || 'data'] = obj;
|
||||||
// upload
|
|
||||||
upload.set({
|
|
||||||
headers: obj, // 通过 request 头传递
|
|
||||||
data: obj // 通过参数传递
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return rst;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 带数据请求功能的基础组件
|
||||||
|
table.set(dynamicOptions('where')); // table
|
||||||
|
upload.set(dynamicOptions()); // upload
|
||||||
|
}
|
||||||
|
return fn;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ layui.define('admin', function(exports){
|
|||||||
|
|
||||||
// 根据路由渲染页面
|
// 根据路由渲染页面
|
||||||
var renderPage = function () {
|
var renderPage = function () {
|
||||||
var router = layui.router()
|
var url = layui.hash();
|
||||||
,path = router.path
|
var path = url.path;
|
||||||
,pathURL = admin.correctRouter(router.path.join('/'))
|
var pathURL = admin.correctRouter(url.path.join('/'));
|
||||||
|
|
||||||
// 默认读取主页
|
// 默认读取主页
|
||||||
if (!path.length) path = [''];
|
if (!path.length) path = [''];
|
||||||
@@ -54,12 +54,12 @@ layui.define('admin', function(exports){
|
|||||||
view().render(path.join('/')).then(function (res) {
|
view().render(path.join('/')).then(function (res) {
|
||||||
|
|
||||||
// 遍历页签选项卡
|
// 遍历页签选项卡
|
||||||
var matchTo
|
var matchTo;
|
||||||
,tabs = $('#LAY_app_tabsheader>li');
|
var tabs = $('#LAY_app_tabsheader>li');
|
||||||
|
|
||||||
tabs.each(function (index) {
|
tabs.each(function (index) {
|
||||||
var li = $(this)
|
var li = $(this);
|
||||||
,layid = li.attr('lay-id');
|
var layid = li.attr('lay-id');
|
||||||
|
|
||||||
if (layid === pathURL) {
|
if (layid === pathURL) {
|
||||||
matchTo = true;
|
matchTo = true;
|
||||||
@@ -73,9 +73,9 @@ layui.define('admin', function(exports){
|
|||||||
$(APP_BODY).append('<div class="layadmin-tabsbody-item layui-show"></div>');
|
$(APP_BODY).append('<div class="layadmin-tabsbody-item layui-show"></div>');
|
||||||
tabsPage.index = tabs.length;
|
tabsPage.index = tabs.length;
|
||||||
element.tabAdd(FILTER_TAB_TBAS, {
|
element.tabAdd(FILTER_TAB_TBAS, {
|
||||||
title: '<span>'+ (res.title || '新标签页') +'</span>'
|
title: '<span>' + (res.title || '新标签页') + '</span>',
|
||||||
,id: pathURL
|
id: pathURL,
|
||||||
,attr: router.href
|
attr: url.href
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,9 +95,9 @@ layui.define('admin', function(exports){
|
|||||||
|
|
||||||
// 容器 scroll 事件,剔除吸附层
|
// 容器 scroll 事件,剔除吸附层
|
||||||
admin.tabsBody(tabsPage.index).on('scroll', function () {
|
admin.tabsBody(tabsPage.index).on('scroll', function () {
|
||||||
var othis = $(this)
|
var othis = $(this);
|
||||||
,elemDate = $('.layui-laydate')
|
var elemDate = $('.layui-laydate');
|
||||||
,layerOpen = $('.layui-layer')[0];
|
var layerOpen = $('.layui-layer')[0];
|
||||||
|
|
||||||
// 关闭 layDate
|
// 关闭 layDate
|
||||||
if (elemDate[0]) {
|
if (elemDate[0]) {
|
||||||
@@ -118,10 +118,10 @@ layui.define('admin', function(exports){
|
|||||||
|
|
||||||
// 入口页面
|
// 入口页面
|
||||||
var entryPage = function (fn) {
|
var entryPage = function (fn) {
|
||||||
var router = layui.router()
|
var url = layui.hash();
|
||||||
,container = view(setter.container)
|
var container = view(setter.container);
|
||||||
,pathURL = admin.correctRouter(router.path.join('/'))
|
var pathURL = admin.correctRouter(url.path.join('/'));
|
||||||
,isIndPage;
|
var isIndPage;
|
||||||
|
|
||||||
// 检查是否属于独立页面
|
// 检查是否属于独立页面
|
||||||
layui.each(setter.indPage, function (index, item) {
|
layui.each(setter.indPage, function (index, item) {
|
||||||
@@ -135,18 +135,17 @@ layui.define('admin', function(exports){
|
|||||||
base: setter.paths.base + 'modules/'
|
base: setter.paths.base + 'modules/'
|
||||||
});
|
});
|
||||||
|
|
||||||
//独立页面
|
// 单独页面
|
||||||
if (isIndPage || pathURL === '/user/login') { // 此处单独判断登入页,是为了兼容旧版(即未在 config.js 配置 indPage 的情况)
|
if (isIndPage || pathURL === '/user/login') { // 此处单独判断登入页,是为了兼容旧版(即未在 config.js 配置 indPage 的情况)
|
||||||
container.render(router.path.join('/')).done(function(){
|
container.render(url.path.join('/')).done(function () {
|
||||||
admin.pageType = 'alone';
|
admin.pageType = 'alone';
|
||||||
});
|
});
|
||||||
} else { //后台框架页面
|
} else { // 框架页面
|
||||||
|
|
||||||
// 强制拦截未登入
|
// 强制拦截未登入
|
||||||
if (setter.interceptor) {
|
if (setter.interceptor) {
|
||||||
var local = layui.data(setter.tableName);
|
var local = layui.data(setter.tableName);
|
||||||
if (!local[setter.request.tokenName]) {
|
if (!local[setter.request.tokenName]) {
|
||||||
return location.hash = '/user/login/redirect='+ encodeURIComponent(pathURL); //跳转到登入页
|
return location.hash = '/user/login/redirect=' + encodeURIComponent(url.href || ''); // 跳转到登入页
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,6 +154,10 @@ layui.define('admin', function(exports){
|
|||||||
renderPage();
|
renderPage();
|
||||||
} else { // 初始控制台结构
|
} else { // 初始控制台结构
|
||||||
container.render('layout').done(function () {
|
container.render('layout').done(function () {
|
||||||
|
// 若初始路由非特定首字符,则视为首页
|
||||||
|
if (!adminuiIndex.firstSymbolEXP.test(location.hash)) {
|
||||||
|
location.hash = '/' + location.hash;
|
||||||
|
}
|
||||||
renderPage();
|
renderPage();
|
||||||
layui.element.render();
|
layui.element.render();
|
||||||
|
|
||||||
@@ -170,26 +173,30 @@ layui.define('admin', function(exports){
|
|||||||
|
|
||||||
var APP_BODY = '#LAY_app_body';
|
var APP_BODY = '#LAY_app_body';
|
||||||
var FILTER_TAB_TBAS = 'layadmin-layout-tabs';
|
var FILTER_TAB_TBAS = 'layadmin-layout-tabs';
|
||||||
var $ = layui.$, $win = $(window);
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
|
||||||
// 初始主体结构
|
// 初始主体结构
|
||||||
layui.link(
|
layui.link(setter.paths.core + 'css/admin.css?v=' + admin.v, function () {
|
||||||
setter.paths.core + 'css/admin.css?v='+ admin.v
|
|
||||||
,function(){
|
|
||||||
entryPage()
|
|
||||||
}
|
|
||||||
,'layuiAdmin'
|
|
||||||
);
|
|
||||||
|
|
||||||
//Hash改变
|
|
||||||
window.onhashchange = function(){
|
|
||||||
entryPage();
|
entryPage();
|
||||||
|
}, 'layuiAdmin');
|
||||||
|
|
||||||
|
// hash 改变
|
||||||
|
window.onhashchange = function () {
|
||||||
|
// 若路由非特定首字符,则不触发 hash 事件
|
||||||
|
if (!adminuiIndex.firstSymbolEXP.test(location.hash)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
entryPage();
|
||||||
|
|
||||||
// 执行 {setter.MOD_NAME}.hash 下的事件
|
// 执行 {setter.MOD_NAME}.hash 下的事件
|
||||||
layui.event.call(this, setter.MOD_NAME, 'hash({*})', layui.router());
|
layui.event.call(this, setter.MOD_NAME, 'hash({*})', layui.hash());
|
||||||
};
|
};
|
||||||
|
|
||||||
// 对外输出
|
// 对外输出
|
||||||
var adminuiIndex = {
|
var adminuiIndex = {
|
||||||
|
firstSymbolEXP: /^#\//, // 路由特定首字符表达式
|
||||||
render: renderPage
|
render: renderPage
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,22 +3,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
layui.define(['laytpl', 'layer'], function(exports) {
|
layui.define(['laytpl', 'layer'], function(exports) {
|
||||||
var $ = layui.jquery
|
var $ = layui.jquery;
|
||||||
,laytpl = layui.laytpl
|
var laytpl = layui.laytpl;
|
||||||
,layer = layui.layer
|
var layer = layui.layer;
|
||||||
,setter = layui.setter
|
var setter = layui.setter;
|
||||||
,device = layui.device()
|
var device = layui.device();
|
||||||
,hint = layui.hint()
|
var hint = layui.hint();
|
||||||
|
|
||||||
// 对外接口
|
// 对外接口
|
||||||
,view = function(id){
|
var view = function(id) {
|
||||||
return new Class(id);
|
return new Class(id);
|
||||||
}
|
};
|
||||||
|
|
||||||
,SHOW = 'layui-show', LAY_BODY = 'LAY_app_body'
|
var SHOW = 'layui-show';
|
||||||
|
var LAY_BODY = 'LAY_app_body';
|
||||||
|
|
||||||
// 构造器
|
// 构造器
|
||||||
,Class = function(id){
|
var Class = function(id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.container = $('#'+(id || LAY_BODY));
|
this.container = $('#'+(id || LAY_BODY));
|
||||||
};
|
};
|
||||||
@@ -39,22 +40,25 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
view.exit = function(){
|
view.exit = function(){
|
||||||
// 清空本地记录的 token
|
// 清空本地记录的 token
|
||||||
layui.data(setter.tableName, {
|
layui.data(setter.tableName, {
|
||||||
key: setter.request.tokenName
|
key: setter.request.tokenName,
|
||||||
,remove: true
|
remove: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 关闭当前全部弹层
|
||||||
|
layer.closeAll();
|
||||||
|
|
||||||
// 跳转到登入页
|
// 跳转到登入页
|
||||||
location.hash = '/user/login';
|
location.hash = '/user/login';
|
||||||
};
|
};
|
||||||
|
|
||||||
// Ajax 请求
|
// Ajax 请求
|
||||||
view.req = function(options) {
|
view.req = function(options) {
|
||||||
var that = this
|
var that = this;
|
||||||
,success = options.success
|
var success = options.success;
|
||||||
,error = options.error
|
var error = options.error;
|
||||||
,request = setter.request
|
var request = setter.request;
|
||||||
,response = setter.response
|
var response = setter.response;
|
||||||
,debug = function(){
|
var debug = function() {
|
||||||
return setter.debug
|
return setter.debug
|
||||||
? '<br><cite>URL:</cite>' + options.url
|
? '<br><cite>URL:</cite>' + options.url
|
||||||
: '';
|
: '';
|
||||||
@@ -63,29 +67,31 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
options.data = options.data || {};
|
options.data = options.data || {};
|
||||||
options.headers = options.headers || {};
|
options.headers = options.headers || {};
|
||||||
|
|
||||||
|
// 是否已开启自动传递 token
|
||||||
if (request.tokenName) {
|
if (request.tokenName) {
|
||||||
var sendData = typeof options.data === 'string'
|
var sendData = typeof options.data === 'string'
|
||||||
? JSON.parse(options.data)
|
? JSON.parse(options.data)
|
||||||
: options.data;
|
: options.data;
|
||||||
|
|
||||||
//自动给参数传入默认 token
|
// token 的传参方式
|
||||||
options.data[request.tokenName] = request.tokenName in sendData
|
if (request.tokenTransferMethod === 'headers') { // Headers 方式传递
|
||||||
? options.data[request.tokenName]
|
|
||||||
: (layui.data(setter.tableName)[request.tokenName] || '');
|
|
||||||
|
|
||||||
//自动给 Request Headers 传入 token
|
|
||||||
options.headers[request.tokenName] = request.tokenName in options.headers
|
options.headers[request.tokenName] = request.tokenName in options.headers
|
||||||
? options.headers[request.tokenName]
|
? options.headers[request.tokenName]
|
||||||
: (layui.data(setter.tableName)[request.tokenName] || '');
|
: (layui.data(setter.tableName)[request.tokenName] || '');
|
||||||
|
} else { // data 方式传递 --- 默认
|
||||||
|
options.data[request.tokenName] = request.tokenName in sendData
|
||||||
|
? options.data[request.tokenName]
|
||||||
|
: (layui.data(setter.tableName)[request.tokenName] || '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete options.success;
|
delete options.success;
|
||||||
delete options.error;
|
delete options.error;
|
||||||
|
|
||||||
return $.ajax($.extend({
|
return $.ajax($.extend({
|
||||||
type: 'get'
|
type: 'get',
|
||||||
,dataType: 'json'
|
dataType: 'json',
|
||||||
,success: function(res){
|
success: function(res) {
|
||||||
var statusCode = response.statusCode;
|
var statusCode = response.statusCode;
|
||||||
|
|
||||||
//只有 response 的 code 一切正常才执行 done
|
//只有 response 的 code 一切正常才执行 done
|
||||||
@@ -109,8 +115,8 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
|
|
||||||
//只要 http 状态码正常,无论 response 的 code 是否正常都执行 success
|
//只要 http 状态码正常,无论 response 的 code 是否正常都执行 success
|
||||||
typeof success === 'function' && success(res);
|
typeof success === 'function' && success(res);
|
||||||
}
|
},
|
||||||
,error: function(e, code){
|
error: function(e, code){
|
||||||
var errorText = [
|
var errorText = [
|
||||||
'请求异常,请重试<br><cite>错误信息:</cite>'+ code
|
'请求异常,请重试<br><cite>错误信息:</cite>'+ code
|
||||||
,debug()
|
,debug()
|
||||||
@@ -124,8 +130,8 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
|
|
||||||
// 弹窗
|
// 弹窗
|
||||||
view.popup = function(options){
|
view.popup = function(options){
|
||||||
var success = options.success
|
var success = options.success;
|
||||||
,skin = options.skin;
|
var skin = options.skin;
|
||||||
|
|
||||||
delete options.success;
|
delete options.success;
|
||||||
delete options.skin;
|
delete options.skin;
|
||||||
@@ -164,7 +170,11 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
|
|
||||||
// 请求模板文件渲染
|
// 请求模板文件渲染
|
||||||
Class.prototype.render = function(views, params){
|
Class.prototype.render = function(views, params){
|
||||||
var that = this, router = layui.router();
|
var that = this;
|
||||||
|
var url = layui.hash();
|
||||||
|
|
||||||
|
// 清除开头 /
|
||||||
|
views = views.replace(/^\//, '');
|
||||||
views = (
|
views = (
|
||||||
setter.paths && setter.paths.views
|
setter.paths && setter.paths.views
|
||||||
? setter.paths.views
|
? setter.paths.views
|
||||||
@@ -176,13 +186,13 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
|
|
||||||
// 请求模板
|
// 请求模板
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: views
|
url: views,
|
||||||
,type: 'get'
|
type: 'get',
|
||||||
,dataType: 'html'
|
dataType: 'html',
|
||||||
,data: {
|
data: {
|
||||||
v: layui.cache.version
|
v: layui.cache.version
|
||||||
}
|
},
|
||||||
,success: function(html){
|
success: function(html){
|
||||||
html = '<div>' + html + '</div>';
|
html = '<div>' + html + '</div>';
|
||||||
|
|
||||||
var elemTitle = $(html).find('title')
|
var elemTitle = $(html).find('title')
|
||||||
@@ -209,8 +219,8 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
delete that.done;
|
delete that.done;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
},
|
||||||
,error: function(e){
|
error: function(e){
|
||||||
view.removeLoad();
|
view.removeLoad();
|
||||||
|
|
||||||
if(that.render.isError){
|
if(that.render.isError){
|
||||||
@@ -232,13 +242,14 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
//解析模板
|
//解析模板
|
||||||
Class.prototype.parse = function(html, refresh, callback){
|
Class.prototype.parse = function(html, refresh, callback){
|
||||||
var that = this
|
var that = this
|
||||||
,isScriptTpl = typeof html === 'object' //是否模板元素
|
var isScriptTpl = typeof html === 'object' //是否模板元素
|
||||||
,elem = isScriptTpl ? html : $(html)
|
var elem = isScriptTpl ? html : $(html)
|
||||||
,elemTemp = isScriptTpl ? html : elem.find('*[template]')
|
var elemTemp = isScriptTpl ? html : elem.find('*[template]')
|
||||||
,fn = function(options){
|
var url = layui.hash();
|
||||||
|
var fn = function(options){
|
||||||
var tpl = laytpl(options.dataElem.html())
|
var tpl = laytpl(options.dataElem.html())
|
||||||
,res = $.extend({
|
var res = $.extend({
|
||||||
params: router.params
|
params: url.params
|
||||||
}, options.res);
|
}, options.res);
|
||||||
|
|
||||||
options.dataElem.after(tpl.render(res));
|
options.dataElem.after(tpl.render(res));
|
||||||
@@ -250,21 +261,20 @@ layui.define(['laytpl', 'layer'], function(exports){
|
|||||||
console.error(options.dataElem[0], '\n存在错误回调脚本\n\n', e)
|
console.error(options.dataElem[0], '\n存在错误回调脚本\n\n', e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
,router = layui.router();
|
|
||||||
|
|
||||||
elem.find('title').remove();
|
elem.find('title').remove();
|
||||||
that.container[refresh ? 'after' : 'html'](elem.children());
|
that.container[refresh ? 'after' : 'html'](elem.children());
|
||||||
|
|
||||||
router.params = that.params || {};
|
url.params = that.params || {};
|
||||||
|
|
||||||
//遍历模板区块
|
//遍历模板区块
|
||||||
for(var i = elemTemp.length; i > 0; i--){
|
for(var i = elemTemp.length; i > 0; i--){
|
||||||
(function(){
|
(function(){
|
||||||
var dataElem = elemTemp.eq(i - 1)
|
var dataElem = elemTemp.eq(i - 1)
|
||||||
,layDone = dataElem.attr('lay-done') || dataElem.attr('lay-then') //获取回调
|
,layDone = dataElem.attr('lay-done') || dataElem.attr('lay-then') //获取回调
|
||||||
,url = laytpl(dataElem.attr('lay-url')|| '').render(router) //接口 url
|
,url = laytpl(dataElem.attr('lay-url')|| '').render(url) //接口 url
|
||||||
,data = laytpl(dataElem.attr('lay-data')|| '').render(router) //接口参数
|
,data = laytpl(dataElem.attr('lay-data')|| '').render(url) //接口参数
|
||||||
,headers = laytpl(dataElem.attr('lay-headers')|| '').render(router); //接口请求的头信息
|
,headers = laytpl(dataElem.attr('lay-headers')|| '').render(url); //接口请求的头信息
|
||||||
|
|
||||||
try {
|
try {
|
||||||
data = new Function('return '+ data + ';')();
|
data = new Function('return '+ data + ';')();
|
||||||
|
|||||||
@@ -5,19 +5,15 @@
|
|||||||
// 初始化配置
|
// 初始化配置
|
||||||
layui.define(['all'], function (exports) {
|
layui.define(['all'], function (exports) {
|
||||||
exports('setter', {
|
exports('setter', {
|
||||||
paths: { // v1.9.0 及以上版本的写法
|
paths: {
|
||||||
core: layui.cache.base + 'adminui/dist/', // 核心库所在目录
|
core: layui.cache.base + 'adminui/dist/', // 核心库所在目录
|
||||||
//views: layui.cache.base + 'views/', // 业务视图所在目录
|
//views: layui.cache.base + 'views/', // 业务视图所在目录
|
||||||
views: '/views/', //视图所在目录
|
views: '/views/', //视图所在目录
|
||||||
modules: layui.cache.base + 'modules/', // 业务模块所在目录
|
modules: layui.cache.base + 'modules/', // 业务模块所在目录
|
||||||
base: layui.cache.base // 记录静态资源所在基础目录
|
base: layui.cache.base // 记录静态资源所在基础目录
|
||||||
},
|
},
|
||||||
/* v1.9.0 之前的写法
|
|
||||||
views: layui.cache.base + 'views/', // 业务视图所在目录
|
|
||||||
base: layui.cache.base, // 记录静态资源所在基础目录
|
|
||||||
*/
|
|
||||||
|
|
||||||
container: 'LAY_app', // 容器ID
|
container: 'LAY_app', // 主容器 ID
|
||||||
entry: 'index', // 默认视图文件名
|
entry: 'index', // 默认视图文件名
|
||||||
engine: '.html', // 视图文件后缀名
|
engine: '.html', // 视图文件后缀名
|
||||||
pageTabs: false, // 是否开启页面选项卡功能。单页版不推荐开启
|
pageTabs: false, // 是否开启页面选项卡功能。单页版不推荐开启
|
||||||
@@ -25,12 +21,11 @@ layui.define(['all'], function (exports) {
|
|||||||
|
|
||||||
name: '核心商城系统',
|
name: '核心商城系统',
|
||||||
version: 'CoreShopProfessional v0.7.5',
|
version: 'CoreShopProfessional v0.7.5',
|
||||||
name: 'layuiAdmin',
|
|
||||||
tableName: 'CoreShop', // 本地存储表名
|
tableName: 'CoreShop', // 本地存储表名
|
||||||
MOD_NAME: 'admin', // 模块事件名
|
MOD_NAME: 'admin', // 模块事件名
|
||||||
|
|
||||||
debug: true, // 是否开启调试模式。如开启,接口异常时会抛出异常 URL 等信息
|
debug: true, // 是否开启调试模式。如开启,接口异常时会抛出异常 URL 等信息
|
||||||
interceptor: false, // 是否开启未登入拦截
|
interceptor: true, // 是否开启未登入拦截
|
||||||
|
|
||||||
//额外增加
|
//额外增加
|
||||||
apiUrl: '/', //api请求地址
|
apiUrl: '/', //api请求地址
|
||||||
@@ -39,7 +34,8 @@ layui.define(['all'], function (exports) {
|
|||||||
|
|
||||||
// 自定义请求字段
|
// 自定义请求字段
|
||||||
request: {
|
request: {
|
||||||
tokenName: 'Authorization' // 自动携带 token 的字段名。可设置 false 不携带。
|
tokenName: 'Authorization', // 接口自动传递 token 的字段名。可设置 false 不传递
|
||||||
|
tokenTransferMethod: 'headers' // token 的传递方式(可选值: data | headers) --- v2.4.0 新增
|
||||||
},
|
},
|
||||||
|
|
||||||
// 自定义响应字段
|
// 自定义响应字段
|
||||||
@@ -64,12 +60,7 @@ layui.define(['all'], function (exports) {
|
|||||||
|
|
||||||
// 配置业务模块目录中的特殊模块
|
// 配置业务模块目录中的特殊模块
|
||||||
extend: {
|
extend: {
|
||||||
layim: 'layim/layim', // layim
|
layim: 'layim/layim' // layim
|
||||||
echarts: 'echarts', //第三方 echarts 核心包
|
|
||||||
echartsTheme: 'echartsTheme', //第三方 echarts 主题
|
|
||||||
treeGrid: 'treeGrid', //treeGrid
|
|
||||||
coreHelper: 'coreHelper', //常用操作封装
|
|
||||||
dtree: 'dtree', //常用操作封装
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 主题配置
|
// 主题配置
|
||||||
@@ -77,7 +68,7 @@ layui.define(['all'], function (exports) {
|
|||||||
// 内置主题配色方案
|
// 内置主题配色方案
|
||||||
color: [{
|
color: [{
|
||||||
main: '#20222A', // 主题色
|
main: '#20222A', // 主题色
|
||||||
selected: '#009688', // 选中色
|
selected: '#16baaa', // 选中色
|
||||||
alias: 'default' // 默认别名
|
alias: 'default' // 默认别名
|
||||||
}, {
|
}, {
|
||||||
main: '#03152A',
|
main: '#03152A',
|
||||||
@@ -99,7 +90,7 @@ layui.define(['all'], function (exports) {
|
|||||||
}, {
|
}, {
|
||||||
main: '#3A3D49',
|
main: '#3A3D49',
|
||||||
logo: '#2F9688',
|
logo: '#2F9688',
|
||||||
selected: '#5FB878',
|
selected: '#16b777',
|
||||||
alias: 'green' // 墨绿
|
alias: 'green' // 墨绿
|
||||||
}, {
|
}, {
|
||||||
main: '#20222A',
|
main: '#20222A',
|
||||||
@@ -114,7 +105,7 @@ layui.define(['all'], function (exports) {
|
|||||||
}, {
|
}, {
|
||||||
main: '#24262F',
|
main: '#24262F',
|
||||||
logo: '#3A3D49',
|
logo: '#3A3D49',
|
||||||
selected: '#009688',
|
selected: '#16baaa',
|
||||||
alias: 'classic-black' // 经典黑
|
alias: 'classic-black' // 经典黑
|
||||||
}, {
|
}, {
|
||||||
logo: '#226A62',
|
logo: '#226A62',
|
||||||
@@ -143,14 +134,14 @@ layui.define(['all'], function (exports) {
|
|||||||
alias: 'fashion-red-header' // 时尚红头
|
alias: 'fashion-red-header' // 时尚红头
|
||||||
}, {
|
}, {
|
||||||
main: '#28333E',
|
main: '#28333E',
|
||||||
logo: '#009688',
|
logo: '#16baaa',
|
||||||
selected: '#009688',
|
selected: '#16baaa',
|
||||||
header: '#009688',
|
header: '#16baaa',
|
||||||
alias: 'green-header' // 墨绿头
|
alias: 'green-header' // 墨绿头
|
||||||
}, {
|
}, {
|
||||||
main: '#393D49',
|
main: '#393D49',
|
||||||
logo: '#393D49',
|
logo: '#393D49',
|
||||||
selected: '#009688',
|
selected: '#16baaa',
|
||||||
header: '#23262E',
|
header: '#23262E',
|
||||||
alias: 'Classic-style1' // 经典风格1
|
alias: 'Classic-style1' // 经典风格1
|
||||||
}, {
|
}, {
|
||||||
@@ -169,7 +160,7 @@ layui.define(['all'], function (exports) {
|
|||||||
|
|
||||||
// 初始的颜色索引,对应上面的配色方案数组索引
|
// 初始的颜色索引,对应上面的配色方案数组索引
|
||||||
// 如果本地已经有主题色记录,则以本地记录为优先,除非请求本地数据(localStorage)
|
// 如果本地已经有主题色记录,则以本地记录为优先,除非请求本地数据(localStorage)
|
||||||
initColorIndex: 14
|
initColorIndex: 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
layui.extend({
|
layui.config({
|
||||||
|
base: '/lib/layuiAdmin/', // 静态资源所在路径
|
||||||
|
version: new Date().getTime()
|
||||||
|
}).extend({
|
||||||
setter: 'config' // 将 config.js 扩展到 layui 模块
|
setter: 'config' // 将 config.js 扩展到 layui 模块
|
||||||
}).define(['setter'], function (exports) {
|
}).define(['setter'], function (exports) {
|
||||||
var setter = layui.setter;
|
var setter = layui.setter;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
"use strict";layui.extend({setter:"config"}).define(["setter"],function(n){var t=layui.setter;layui.each({admin:"admin",view:"view",adminIndex:"index"},function(n,i){var r={};r[n]="{/}"+t.paths.core+"/modules/"+i;layui.extend(r)});layui.config({base:t.paths.modules});layui.each(t.extend,function(n,t){var i={};i[n]="{/}"+layui.cache.base+t;layui.extend(i)});layui.use("adminIndex",function(){layui.use("common");n("index",layui.admin)})});
|
"use strict";layui.config({base:"/lib/layuiAdmin/",version:(new Date).getTime()}).extend({setter:"config"}).define(["setter"],function(n){var t=layui.setter;layui.each({admin:"admin",view:"view",adminIndex:"index"},function(n,i){var r={};r[n]="{/}"+t.paths.core+"/modules/"+i;layui.extend(r)});layui.config({base:t.paths.modules});layui.each(t.extend,function(n,t){var i={};i[n]="{/}"+layui.cache.base+t;layui.extend(i)});layui.use("adminIndex",function(){layui.use("common");n("index",layui.admin)})});
|
||||||
@@ -2,7 +2,10 @@
|
|||||||
* 初始化主题入口模块
|
* 初始化主题入口模块
|
||||||
*/
|
*/
|
||||||
|
|
||||||
layui.extend({
|
layui.config({
|
||||||
|
base: '/lib/layuiAdmin/', // 静态资源所在路径
|
||||||
|
version: new Date().getTime()
|
||||||
|
}).extend({
|
||||||
setter: 'config' // 将 config.js 扩展到 layui 模块
|
setter: 'config' // 将 config.js 扩展到 layui 模块
|
||||||
}).define(['setter'], function (exports) {
|
}).define(['setter'], function (exports) {
|
||||||
var setter = layui.setter;
|
var setter = layui.setter;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -14,15 +14,19 @@
|
|||||||
/>
|
/>
|
||||||
<missing-glyph />
|
<missing-glyph />
|
||||||
|
|
||||||
<glyph glyph-name="edge" unicode="" d="M240.185509 821.062741C322.180562 871.479699 415.37494 897.48813 509.969233 895.934224 845.948962 895.934224 1023.938224 648.353161 1023.938224 456.964708c-0.199988-65.396055-25.998431-127.79229-71.795669-174.389479-45.797237-46.397201-107.993485-72.995596-173.389539-73.995536-150.390927 0-182.98896 46.197213-182.98896 63.996139 0 7.599542 2.399855 12.399252 9.599421 18.798866l1.99988 2.399855 0.799951 3.199807c20.998733 22.998612 31.798082 52.396839 31.798082 83.194981 0 157.390504-164.390082 285.382782-367.977799 285.382782-75.075471 0.599964-149.071006-17.798926-215.027027-53.796754 53.996742 115.03306 165.430019 195.188224 182.628981 207.627473 1.599903 1.099934 0.599964 1.679899 0.599964 1.679899z m31.198118-636.081624c-2.799831-59.99638 9.199445-119.992761 32.798021-174.389479 27.198359-52.796815 65.396055-101.993847 112.993183-138.591638-118.992821 22.998612-222.966548 87.794703-298.781974 178.589225C42.237452 143.383627 0 259.176641 0 380.169341c0 102.393822 124.792471 188.78861 271.983591 188.78861 73.195584 1.199928 144.791264-21.798685 203.587717-65.396054l-7.199566-2.399856c-102.993786-35.197876-196.988115-181.389056-196.988115-316.180924zM939.543315 95.986486l-1.399915-0.199987c-23.598576-37.597732-51.796875-70.195765-84.394908-98.994028-61.596284-55.996622-136.191783-90.99451-217.586873-99.793979-37.197756-0.599964-73.59556 6.399614-107.593509 22.798624-51.196911 20.598757-94.194317 59.99638-123.192567 105.993605-28.798263 47.797116-42.197454 103.393762-37.997708 159.190396-1.199928 40.197575 10.799348 80.595138 29.99819 116.392978 27.798323-66.196006 74.995475-122.592604 135.191844-161.590251 60.196368-38.997647 130.992097-58.996441 202.787766-57.196549 61.99626-0.599964 124.192507 13.399192 180.389116 40.997526l3.799771 1.799892c7.799529 4.599722 15.399071 7.799529 23.1986 0 8.999457-9.799409 3.599783-18.39889-2.399855-27.998311-0.399976-0.399976-0.599964-0.99994-0.799952-1.399916z" horiz-adv-x="1024" />
|
<glyph glyph-name="sound" unicode="" d="M631.4-29.7c-5.1 0-10.1 1.3-14.5 3.7L277.1 162.2H116.8c-16 0-28.9 13-28.9 28.9v384c0 16 13 28.9 28.9 28.9h160.3l339.7 189.9c4.5 2.5 9.5 3.8 14.6 3.8 5.3 0 10.6-1.4 15.1-4.1 9.1-5.3 14.8-15.2 14.8-25.8v-767.6c0-10.5-5.6-20.4-14.7-25.8-4.6-2.7-9.9-4.1-15.2-4.1zM305.8 551.5v-336.7L601.4 51V716.8L305.8 551.5zM145.7 220.1h102.2v326H145.7v-326zM829.4 93c-7.1 0-13.9 2.2-19.8 6.2-7.5 5.3-12.6 13.2-14.2 22.3-1.6 9.1 0.4 18.2 5.7 25.8 48.7 69.5 74.5 151.3 74.5 236.6 0 84.1-25.2 165.1-72.7 234.1-5.2 7.6-7.2 16.7-5.5 25.8 1.7 9.1 6.8 16.9 14.3 22.2 5.8 4 12.5 6.1 19.5 6.1 11.4 0 22-5.6 28.4-14.9 55.6-80.5 84.9-175 84.9-273.2 0-99.5-30.1-195-87-276.2-6.3-9.3-16.8-14.8-28.1-14.8zM755 221.4c-4.8 0-9.5 1-13.9 2.9-8.4 3.7-14.9 10.5-18.2 19.1-3.3 8.6-3.1 18 0.6 26.4 16 36.3 24.1 75 24.1 115 0 38.6-7.5 75.9-22.4 111.1-3.6 8.5-3.7 17.9-0.2 26.4s10 15.2 18.5 18.8c4.3 1.8 8.8 2.7 13.4 2.7 13.9 0 26.4-8.3 31.8-21.1 18.5-43.7 27.9-90.2 27.9-138 0-49.6-10.1-97.7-29.9-142.8-5.6-12.4-18-20.5-31.7-20.5z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
<glyph glyph-name="leaf" unicode="" d="M1017.948269 886.876437c-4.863707 5.785251-12.031275 9.113051-19.557222 9.113051l-26.110427 0c-258.032454 0.102394-461.847374 0.153591-611.905533-35.735447-80.635142-19.301237-142.992985-48.432282-190.606116-89.031436-51.401703-43.82456-86.420393-101.216302-107.155144-175.554223-13.77197-49.353826-20.222782-138.487656 6.96278-227.160714 10.034595-32.766026 25.700852-63.688963 46.589193-92.103251-62.255449-97.530124-116.063407-225.983185-116.063407-378.805977 0-14.130349 11.468109-25.598458 25.598458-25.598458s25.598458 11.468109 25.598458 25.598458c0 235.761795 139.665185 410.650458 222.91137 493.845446 59.7468 59.7468 127.275532 110.175762 195.367429 145.808815 63.381781 33.175601 123.947732 51.4529 170.536925 51.4529 14.130349 0 25.598458 11.468109 25.598458 25.598458s-11.468109 25.598458-25.598458 25.598458c-55.497456 0-122.667809-19.813206-194.241097-57.340545-72.597226-38.039308-144.477695-91.591282-207.80828-154.973063-26.72479-26.72479-58.876453-62.357843-90.823328-105.977615-12.389654 19.506025-22.014674 40.189579-28.619076 61.794677-25.598458 83.553366-16.178225 164.034917-6.604402 198.388047 73.211589 262.384191 351.313233 263.049751 855.858835 262.896161-60.156376-321.926204-172.328817-530.29765-333.599101-619.533873-149.597387-82.785412-297.966048-37.629733-354.845821-14.335136-11.980078 4.914904-24.06255 10.95614-35.786644 17.91892-12.133669 7.218765-27.851122 3.225406-35.069887-8.908263s-3.225406-27.851122 8.908263-35.069887c13.925561-8.2939 28.260697-15.461468 42.595834-21.349114 31.844481-13.004017 83.143791-29.694211 146.679163-35.172281 14.027955-1.228726 27.902319-1.791892 41.674289-1.791892 75.208269 0 145.860012 18.072511 210.675307 53.910352 82.375837 45.565255 153.641943 119.749585 211.904033 220.351524 68.296685 118.00889 119.698388 274.51786 152.720399 465.175173 1.279923 7.423553-0.767954 15.051893-5.631661 20.837145z" horiz-adv-x="1025" />
|
<glyph glyph-name="bot" unicode="" d="M511.453867 861.866667c35.498667 0 63.8976-28.398933 63.8976-63.8976 0-22.9376-12.014933-42.5984-30.037334-54.0672V657.066667h306.926934c18.568533 0 33.860267-15.291733 33.860266-33.860267v-613.853867c0-18.568533-15.291733-33.860267-33.860266-33.860266H170.666667c-18.568533 0-33.860267 15.291733-33.860267 33.860266V623.2064c0 18.568533 15.291733 33.860267 33.860267 33.860267h306.926933V743.901867c-17.476267 10.922667-29.4912 30.583467-30.037333 52.974933v1.092267c0 35.498667 28.398933 63.8976 63.8976 63.8976zM809.642667 580.608H213.265067v-528.657067h596.923733l-0.546133 528.657067z m-170.3936-367.547733c4.9152 0 8.738133-3.822933 8.738133-8.738134v-51.336533c0-4.9152-3.822933-8.738133-8.738133-8.738133H383.658667c-4.9152 0-8.738133 3.822933-8.738134 8.738133v51.336533c0 4.9152 3.822933 8.738133 8.738134 8.738134h255.5904zM93.661867 504.149333c4.9152 0 8.738133-3.822933 8.738133-8.738133v-323.857067c0-4.9152-3.822933-8.738133-8.738133-8.738133H42.325333c-4.9152 0-8.738133 3.822933-8.738133 8.738133V495.4112c0 4.9152 3.822933 8.738133 8.738133 8.738133h51.336534z m886.920533 0c4.9152 0 8.738133-3.822933 8.738133-8.738133v-323.857067c0-4.9152-3.822933-8.738133-8.738133-8.738133h-51.336533c-4.9152 0-8.738133 3.822933-8.738134 8.738133V495.4112c0 4.9152 3.822933 8.738133 8.738134 8.738133h51.336533zM332.322133 435.882667c32.768 0 59.528533-26.760533 59.528534-59.528534s-26.760533-59.528533-59.528534-59.528533-59.528533 26.760533-59.528533 59.528533 26.760533 59.528533 59.528533 59.528534z m358.263467 0c32.768 0 59.528533-26.760533 59.528533-59.528534s-26.760533-59.528533-59.528533-59.528533-59.528533 26.760533-59.528533 59.528533 26.2144 59.528533 59.528533 59.528534z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
<glyph glyph-name="folder" unicode="" d="M970.666667 682.666667H542.173333L429.793333 795.046667A52.986667 52.986667 0 0 1 392.08 810.666667H96a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h874.666667a53.393333 53.393333 0 0 1 53.333333 53.333333V629.333333a53.393333 53.393333 0 0 1-53.333333 53.333334zM96 768h296.08a10.573333 10.573333 0 0 0 7.54-3.126667L481.826667 682.666667H96a53.546667 53.546667 0 0 1-10.666667-1.073334V757.333333a10.666667 10.666667 0 0 0 10.666667 10.666667z m885.333333-714.666667a10.666667 10.666667 0 0 0-10.666666-10.666666H96a10.666667 10.666667 0 0 0-10.666667 10.666666V629.333333a10.666667 10.666667 0 0 0 10.666667 10.666667h874.666667a10.666667 10.666667 0 0 0 10.666666-10.666667z" horiz-adv-x="1024" />
|
<glyph glyph-name="edge" unicode="" d="M257.173915 793.74632C334.044277 841.012218 421.414006 865.395122 510.096156 863.938335 825.077152 863.938335 991.942085 631.831088 991.942085 452.404414c-0.187489-61.308802-24.373529-119.805272-67.30844-163.490137-42.93491-43.497376-101.243892-68.433371-162.552692-69.370815-140.991494 0-171.55215 43.309887-171.55215 59.996381 0 7.124571 2.249864 11.624299 8.999457 17.623936l1.874887 2.249864 0.749954 2.99982c19.686312 21.561199 29.810702 49.122037 29.810702 77.995294 0 147.553597-154.115702 267.546358-344.979186 267.546358-70.383254 0.562466-139.754068-16.686493-201.587838-50.434457 50.621946 107.843494 155.090643 182.98896 171.214669 194.650756 1.499909 1.031188 0.562466 1.574905 0.562467 1.574906z m29.248235-596.326523c-2.624842-56.246606 8.62448-112.493213 30.748145-163.490136 25.498462-49.497014 61.308802-95.619232 105.931109-129.929661-111.55577 21.561199-209.031139 82.307534-280.108101 167.427398C71.597611 158.42215 32 266.978101 32 380.408757c0 95.994208 116.992942 176.989322 254.984617 176.989322 68.62086 1.124932 135.74181-20.436267 190.863484-61.308801l-6.749593-2.249865c-96.556674-32.998009-184.676358-170.05224-184.676358-296.419616zM912.821858 113.987331l-1.312421-0.187488c-22.123665-35.247874-48.55957-65.80853-79.120226-92.806901-57.746516-52.496833-127.679797-85.307353-203.987693-93.556856-34.872896-0.562466-68.995837 5.999638-100.868915 21.37371-47.997104 19.311335-88.307172 56.246606-115.493031 99.369005-26.998372 44.809796-39.560113 96.931652-35.622852 149.240996-1.124932 37.685227 10.124389 75.557942 28.123303 109.118417 26.060928-62.058756 70.308258-114.930566 126.742354-151.49086 56.434095-36.560294 122.805091-55.309163 190.113531-53.621765 58.121494-0.562466 116.430475 12.561742 169.114796 38.435181l3.562285 1.687398c7.312058 4.312239 14.436629 7.312058 21.748688 0 8.436991-9.186946 3.374797-17.248959-2.249864-26.248416-0.374978-0.374978-0.562466-0.937444-0.749955-1.312421z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
<glyph glyph-name="folder-open" unicode="" d="M1003.153333 491.04a52.933333 52.933333 0 0 1-42.38 20.96H896V629.333333a53.393333 53.393333 0 0 1-53.333333 53.333334H461.253333a10.573333 10.573333 0 0 0-7.54 3.126666L344.46 795.046667A52.986667 52.986667 0 0 1 306.746667 810.666667H53.333333a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h796.893334a53.453333 53.453333 0 0 1 51.453333 39.333333l110.546667 405.333334a52.953333 52.953333 0 0 1-9.073334 46.373333zM53.333333 768h253.413334a10.573333 10.573333 0 0 0 7.54-3.126667l109.253333-109.253333A52.986667 52.986667 0 0 1 461.253333 640H842.666667a10.666667 10.666667 0 0 0 10.666666-10.666667v-117.333333H173.773333a53.453333 53.453333 0 0 1-51.453333-39.333333L42.666667 180.633333V757.333333a10.666667 10.666667 0 0 0 10.666666 10.666667z m917.726667-312.14l-110.546667-405.333333a10.666667 10.666667 0 0 0-10.286666-7.86H63.226667a10.666667 10.666667 0 0 0-10.286667 13.473333l110.546667 405.333333A10.666667 10.666667 0 0 0 173.773333 469.333333h787a10.666667 10.666667 0 0 0 10.286667-13.473333z" horiz-adv-x="1024" />
|
<glyph glyph-name="leaf" unicode="" d="M956.681096 804.64791c-4.274742 5.084693-10.574363 8.009517-17.188965 8.009518l-22.948617 0c-226.786337 0.089995-405.920544 0.134992-537.807598-31.408108-70.87073-16.963978-125.677428-42.567435-167.524906-78.250286-45.177278-38.51768-75.955424-88.95964-94.179326-154.295703-12.104271-43.377386-17.773929-121.717666 6.119631-199.652972 8.819468-28.798265 22.588639-55.976628 40.947533-80.950123-54.716703-85.719836-102.008854-198.618034-102.008854-332.93494 0-12.419252 10.079393-22.498645 22.498645-22.498645s22.498645 10.079393 22.498644 22.498645c0 207.212515 122.752604 360.923254 195.918197 434.043849 52.511836 52.511836 111.863261 96.834166 171.709654 128.152278 55.706643 29.158243 108.938436 45.222275 149.885969 45.222276 12.419252 0 22.498645 10.079393 22.498645 22.498645s-10.079393 22.498645-22.498645 22.498644c-48.777061 0-107.813504-17.413951-170.719714-50.396963-63.806156-33.432986-126.982349-80.50015-182.643996-136.206794-23.488585-23.488585-51.746883-54.806698-79.825191-93.144388-10.889344 17.143967-19.348835 35.322872-25.153484 54.311728-22.498645 73.435576-14.219143 144.171314-5.804651 174.364494 64.346123 230.611105 308.771396 231.19607 752.21968 231.061079-52.871815-282.942953-151.460874-466.081919-293.202335-544.512193-131.482078-72.760616-261.884222-33.073008-311.87621-12.59924-10.529365 4.31974-21.148726 9.62942-31.453105 15.74905-10.664358 6.344618-24.478525 2.83483-30.823143-7.829528s-2.83483-24.478525 7.829528-30.823142c12.239263-7.289561 24.838503-13.589181 37.437745-18.76387 27.988313-11.429312 73.075598-26.098428 128.917233-30.913138 12.329257-1.079935 24.523523-1.574905 36.627793-1.574905 66.101018 0 128.197276 15.884043 185.163844 47.382145 72.400638 40.047587 135.036864 105.248659 186.243779 193.668332 60.026383 103.718751 105.203661 241.275463 134.226913 408.845367 1.124932 6.524607-0.67496 13.229203-4.949702 18.313897z" horiz-adv-x="1025" />
|
||||||
|
|
||||||
<glyph glyph-name="gitee" unicode="" d="M512-128C229.222-128 0 101.222 0 384S229.222 896 512 896s512-229.222 512-512-229.222-512-512-512z m259.149 568.883h-290.74a25.293 25.293 0 0 1-25.292-25.293l-0.026-63.206c0-13.952 11.315-25.293 25.267-25.293h177.024c13.978 0 25.293-11.315 25.293-25.267v-12.646a75.853 75.853 0 0 0-75.853-75.853h-240.23a25.293 25.293 0 0 0-25.267 25.293V478.797a75.853 75.853 0 0 0 75.827 75.853h353.946a25.293 25.293 0 0 1 25.267 25.292l0.077 63.207a25.293 25.293 0 0 1-25.268 25.293H417.152a189.62 189.62 0 0 1-189.62-189.645V124.85c0-13.977 11.316-25.293 25.294-25.293h372.94a170.65 170.65 0 0 1 170.65 170.65V415.616a25.293 25.293 0 0 1-25.293 25.267z" horiz-adv-x="1024" />
|
<glyph glyph-name="folder" unicode="" d="M947.911111 679.727408H519.417777L407.037777 792.107408A52.986667 52.986667 0 0 1 369.324444 807.727408H73.244444a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h874.666667a53.393333 53.393333 0 0 1 53.333333 53.333333V626.394074a53.393333 53.393333 0 0 1-53.333333 53.333334zM73.244444 765.060741h296.08a10.573333 10.573333 0 0 0 7.54-3.126667L459.071111 679.727408H73.244444a53.546667 53.546667 0 0 1-10.666667-1.073334V754.394074a10.666667 10.666667 0 0 0 10.666667 10.666667z m885.333333-714.666667a10.666667 10.666667 0 0 0-10.666666-10.666666H73.244444a10.666667 10.666667 0 0 0-10.666667 10.666666V626.394074a10.666667 10.666667 0 0 0 10.666667 10.666667h874.666667a10.666667 10.666667 0 0 0 10.666666-10.666667z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
<glyph glyph-name="folder-open" unicode="" d="M1003.153333 488.100741a52.933333 52.933333 0 0 1-42.38 20.96H896V626.394074a53.393333 53.393333 0 0 1-53.333333 53.333334H461.253333a10.573333 10.573333 0 0 0-7.54 3.126666L344.46 792.107408A52.986667 52.986667 0 0 1 306.746667 807.727408H53.333333a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h796.893334a53.453333 53.453333 0 0 1 51.453333 39.333333l110.546667 405.333334a52.953333 52.953333 0 0 1-9.073334 46.373333zM53.333333 765.060741h253.413334a10.573333 10.573333 0 0 0 7.54-3.126667l109.253333-109.253333A52.986667 52.986667 0 0 1 461.253333 637.060741H842.666667a10.666667 10.666667 0 0 0 10.666666-10.666667v-117.333333H173.773333a53.453333 53.453333 0 0 1-51.453333-39.333333L42.666667 177.694074V754.394074a10.666667 10.666667 0 0 0 10.666666 10.666667z m917.726667-312.14l-110.546667-405.333333a10.666667 10.666667 0 0 0-10.286666-7.86H63.226667a10.666667 10.666667 0 0 0-10.286667 13.473333l110.546667 405.333333A10.666667 10.666667 0 0 0 173.773333 466.394074h787a10.666667 10.666667 0 0 0 10.286667-13.473333z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
<glyph glyph-name="gitee" unicode="" d="M512-96C246.895625-96 32 118.895625 32 384S246.895625 864 512 864s480-214.895625 480-480-214.895625-480-480-480z m242.952188 533.327813h-272.568751a23.712187 23.712187 0 0 1-23.71125-23.712188l-0.024375-59.255625c0-13.08 10.607812-23.712187 23.687813-23.712187h165.96c13.104375 0 23.712187-10.607812 23.712187-23.687813v-11.855625a71.112188 71.112188 0 0 0-71.112187-71.112187h-225.215625a23.712187 23.712187 0 0 0-23.687812 23.712187V472.872187a71.112188 71.112188 0 0 0 71.087812 71.112188h331.824375a23.712187 23.712187 0 0 1 23.687812 23.71125l0.072188 59.256563a23.712187 23.712187 0 0 1-23.68875 23.712187H423.08a177.76875 177.76875 0 0 1-177.76875-177.792188V141.046875c0-13.103438 10.60875-23.712187 23.713125-23.712187h349.63125a159.984375 159.984375 0 0 1 159.984375 159.984375V413.64a23.712187 23.712187 0 0 1-23.712187 23.687812z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
<glyph glyph-name="github" unicode="" d="M512 883.32190493c275.66730126 0 499.32190493-223.65460366 499.32190493-499.32190493 0-220.40901063-143.01411555-407.65472541-341.32813256-473.98131826-25.34058667-4.53550763-34.45321159 11.06830222-34.45321159 24.05067207 0 16.26957255 0.6657627 70.19633778 0.66576271 137.18869334 0 46.81142841-15.60380985 76.72913237-33.7874489 92.33294222 111.18234397 12.35821682 228.19011015 54.63413874 228.1901113 246.41536 0 54.63413874-19.51516445 98.82412715-51.34693604 133.9431003 5.20127033 13.02397952 22.09499477 63.70515285-5.20127033 132.61157604-41.61015922 13.02397952-137.18869333-51.34693603-137.18869333-51.34693604a469.36259015 469.36259015 0 0 1-249.6609519 0S291.63259904 689.58500523 250.02244096 676.56102571c-27.29626397-68.90642318-10.40253952-119.62920619-5.20127033-132.61157604-31.87338126-35.11897429-51.34693603-79.3089627-51.34693604-133.9431003 0-191.15706937 116.38361429-234.05714318 227.56595826-246.41536-14.31389411-13.02397952-27.29626397-35.11897429-31.87338126-66.95074588-28.62778937-13.02397952-101.44556715-35.11897429-144.96979285 41.61015921-27.29626397 47.47719111-76.72913237 51.34693603-76.72913351 51.34693604-48.76710571 0.6657627-3.24559189-30.54185699-3.2455919-30.541857 32.49753429-14.93804715 55.25829063-72.81777778 55.25829064-72.81777777 29.25194126-89.08735033 168.39631189-59.16964523 168.39631302-59.16964523 0-41.61015922 0.6657627-80.5988773 0.66576157-92.95709525 0-13.02397952-9.11262493-28.62778937-34.45321045-24.05067094C155.77543111-23.61311459000001 12.76131555 163.63259903999995 12.76131555 384.04160967c0 275.66730126 223.65460366 499.32190493 499.32190493 499.32190492zM201.87948715 166.21242937c1.28991459 2.62144-0.6657627 5.86703189-4.53550763 7.78109952-3.91135459 1.28991459-7.15694763 0.6657627-8.44686222-1.2899146-1.28991459-2.62144 0.6657627-5.86703189 4.53550763-7.78109952 3.24559189-1.9556773 7.15694763-1.28991459 8.44686222 1.2899146z m20.13931634-22.13660444c2.62144 1.9556773 1.9556773 6.49118493-1.2899146 10.40253952-3.24559189 3.24559189-7.78109952 4.53550763-10.40253952 1.95567729-2.62144-1.9556773-1.9556773-6.49118493 1.2899146-10.40253952 3.24559189-3.24559189 7.78109952-4.53550763 10.40253952-1.95567729z m19.51516444-29.25194127c3.24559189 2.62144 3.24559189 7.78109952 0 12.35821682-2.62144 4.53550763-7.78109952 6.49118493-11.06830222 3.91135459-3.24559189-1.9556773-3.24559189-7.15694763 0-11.69245411s8.44686222-6.49118493 11.06830222-4.53550763z m27.29626396-27.2962651c2.62144 2.62144 1.28991459 8.44686222-2.62144 12.35821795-4.53550763 4.53550763-10.40253952 5.20127033-13.02397952 1.9556773-3.24559189-2.62144-1.9556773-8.44686222 2.62144-12.35821682 4.53550763-4.53550763 10.40253952-5.20127033 13.02397952-1.95567843z m37.0746516-16.26957141c1.28991459 3.91135459-2.62144 8.44686222-8.44686223 10.40253952-5.20127033 1.28991459-11.06830222-0.6657627-12.35821681-4.53550763s2.62144-8.44686222 8.44686222-9.73677682c5.20127033-1.9556773 11.06830222 0 12.35821682 3.9113546z m40.94439651-3.24559304c0 4.53550763-5.20127033 7.78109952-11.06830222 7.15694763-5.86703189 0-10.40253952-3.24559189-10.40253952-7.15694763 0-4.53550763 4.53550763-7.78109952 11.06830222-7.15694648 5.86703189 0 10.40253952 3.24559189 10.40253952 7.15694648z m37.69880349 6.49118493c-0.6657627 3.91135459-5.86703189 6.49118493-11.69245412 5.86703303-5.86703189-1.28991459-9.73677682-5.20127033-9.11262492-9.73677796 0.6657627-3.91135459 5.86703189-6.49118493 11.69245411-5.20126918s9.73677682 5.20127033 9.11262493 9.11262492z" horiz-adv-x="1024" />
|
<glyph glyph-name="github" unicode="" d="M512 883.32190493c275.66730126 0 499.32190493-223.65460366 499.32190493-499.32190493 0-220.40901063-143.01411555-407.65472541-341.32813256-473.98131826-25.34058667-4.53550763-34.45321159 11.06830222-34.45321159 24.05067207 0 16.26957255 0.6657627 70.19633778 0.66576271 137.18869334 0 46.81142841-15.60380985 76.72913237-33.7874489 92.33294222 111.18234397 12.35821682 228.19011015 54.63413874 228.1901113 246.41536 0 54.63413874-19.51516445 98.82412715-51.34693604 133.9431003 5.20127033 13.02397952 22.09499477 63.70515285-5.20127033 132.61157604-41.61015922 13.02397952-137.18869333-51.34693603-137.18869333-51.34693604a469.36259015 469.36259015 0 0 1-249.6609519 0S291.63259904 689.58500523 250.02244096 676.56102571c-27.29626397-68.90642318-10.40253952-119.62920619-5.20127033-132.61157604-31.87338126-35.11897429-51.34693603-79.3089627-51.34693604-133.9431003 0-191.15706937 116.38361429-234.05714318 227.56595826-246.41536-14.31389411-13.02397952-27.29626397-35.11897429-31.87338126-66.95074588-28.62778937-13.02397952-101.44556715-35.11897429-144.96979285 41.61015921-27.29626397 47.47719111-76.72913237 51.34693603-76.72913351 51.34693604-48.76710571 0.6657627-3.24559189-30.54185699-3.2455919-30.541857 32.49753429-14.93804715 55.25829063-72.81777778 55.25829064-72.81777777 29.25194126-89.08735033 168.39631189-59.16964523 168.39631302-59.16964523 0-41.61015922 0.6657627-80.5988773 0.66576157-92.95709525 0-13.02397952-9.11262493-28.62778937-34.45321045-24.05067094C155.77543111-23.61311459000001 12.76131555 163.63259903999995 12.76131555 384.04160967c0 275.66730126 223.65460366 499.32190493 499.32190493 499.32190492zM201.87948715 166.21242937c1.28991459 2.62144-0.6657627 5.86703189-4.53550763 7.78109952-3.91135459 1.28991459-7.15694763 0.6657627-8.44686222-1.2899146-1.28991459-2.62144 0.6657627-5.86703189 4.53550763-7.78109952 3.24559189-1.9556773 7.15694763-1.28991459 8.44686222 1.2899146z m20.13931634-22.13660444c2.62144 1.9556773 1.9556773 6.49118493-1.2899146 10.40253952-3.24559189 3.24559189-7.78109952 4.53550763-10.40253952 1.95567729-2.62144-1.9556773-1.9556773-6.49118493 1.2899146-10.40253952 3.24559189-3.24559189 7.78109952-4.53550763 10.40253952-1.95567729z m19.51516444-29.25194127c3.24559189 2.62144 3.24559189 7.78109952 0 12.35821682-2.62144 4.53550763-7.78109952 6.49118493-11.06830222 3.91135459-3.24559189-1.9556773-3.24559189-7.15694763 0-11.69245411s8.44686222-6.49118493 11.06830222-4.53550763z m27.29626396-27.2962651c2.62144 2.62144 1.28991459 8.44686222-2.62144 12.35821795-4.53550763 4.53550763-10.40253952 5.20127033-13.02397952 1.9556773-3.24559189-2.62144-1.9556773-8.44686222 2.62144-12.35821682 4.53550763-4.53550763 10.40253952-5.20127033 13.02397952-1.95567843z m37.0746516-16.26957141c1.28991459 3.91135459-2.62144 8.44686222-8.44686223 10.40253952-5.20127033 1.28991459-11.06830222-0.6657627-12.35821681-4.53550763s2.62144-8.44686222 8.44686222-9.73677682c5.20127033-1.9556773 11.06830222 0 12.35821682 3.9113546z m40.94439651-3.24559304c0 4.53550763-5.20127033 7.78109952-11.06830222 7.15694763-5.86703189 0-10.40253952-3.24559189-10.40253952-7.15694763 0-4.53550763 4.53550763-7.78109952 11.06830222-7.15694648 5.86703189 0 10.40253952 3.24559189 10.40253952 7.15694648z m37.69880349 6.49118493c-0.6657627 3.91135459-5.86703189 6.49118493-11.69245412 5.86703303-5.86703189-1.28991459-9.73677682-5.20127033-9.11262492-9.73677796 0.6657627-3.91135459 5.86703189-6.49118493 11.69245411-5.20126918s9.73677682 5.20127033 9.11262493 9.11262492z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 326 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,25 +0,0 @@
|
|||||||
/** 根据访问路径对应左侧导航效果 */
|
|
||||||
layui.define(['view'], function (exports) {
|
|
||||||
var view = layui.view
|
|
||||||
, $ = layui.$;
|
|
||||||
layui.data.updateMainBreadcrumb = function () {
|
|
||||||
var breadcrumbElem = $('#LAY_app_body .layadmin-tabsbody-item.layui-show .layui-breadcrumb');
|
|
||||||
if (breadcrumbElem.length) {
|
|
||||||
var _html = [];
|
|
||||||
var navActive = $('#LAY-system-side-menu .layui-this');
|
|
||||||
do {
|
|
||||||
var texts = navActive.find('>a').first().text();
|
|
||||||
texts = texts.replace(/\s+/g, "");/*去掉字符串中的空格,因为我的左侧菜单,有加入空格*/
|
|
||||||
_html.unshift('<a><cite>' + texts + '</cite></a>');
|
|
||||||
navActive = navActive.parents('.layui-nav-itemed').first();
|
|
||||||
}
|
|
||||||
while (navActive.length);
|
|
||||||
breadcrumbElem.html('<a lay-href="">主页</a>' + _html.join(''));
|
|
||||||
breadcrumbElem.attr('lay-separator', '>>'); /*修改 修饰符*/
|
|
||||||
layui.element.render('breadcrumb', breadcrumbElem.attr('lay-filter'))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//对外暴露的接口
|
|
||||||
exports('breadcrumb', {});
|
|
||||||
});
|
|
||||||
@@ -12,8 +12,23 @@ layui.define(function (exports) {
|
|||||||
|
|
||||||
//公共业务的逻辑处理可以写在此处,切换任何页面都会执行
|
//公共业务的逻辑处理可以写在此处,切换任何页面都会执行
|
||||||
//……
|
//……
|
||||||
|
layui.data.updateMainBreadcrumb = function () {
|
||||||
|
var breadcrumbElem = $('#LAY_app_body .layadmin-tabsbody-item.layui-show .layui-breadcrumb');
|
||||||
|
if (breadcrumbElem.length) {
|
||||||
|
var _html = [];
|
||||||
|
var navActive = $('#LAY-system-side-menu .layui-this');
|
||||||
|
do {
|
||||||
|
var texts = navActive.find('>a').first().text();
|
||||||
|
texts = texts.replace(/\s+/g, "");/*去掉字符串中的空格,因为我的左侧菜单,有加入空格*/
|
||||||
|
_html.unshift('<a><cite>' + texts + '</cite></a>');
|
||||||
|
navActive = navActive.parents('.layui-nav-itemed').first();
|
||||||
|
}
|
||||||
|
while (navActive.length);
|
||||||
|
breadcrumbElem.html('<a lay-href="">主页</a>' + _html.join(''));
|
||||||
|
breadcrumbElem.attr('lay-separator', '>>'); /*修改 修饰符*/
|
||||||
|
layui.element.render('breadcrumb', breadcrumbElem.attr('lay-filter'))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//退出
|
//退出
|
||||||
admin.events.logout = function () {
|
admin.events.logout = function () {
|
||||||
@@ -31,7 +46,6 @@ layui.define(function (exports) {
|
|||||||
admin.exit();
|
admin.exit();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//对外暴露的接口
|
//对外暴露的接口
|
||||||
exports('common', {});
|
exports('common', {});
|
||||||
});
|
});
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
.layadmin-homepage-font{font-weight: 600;color: #2b425b;font-size: 1.2em;}
|
.layadmin-homepage-font{font-weight: 600;color: #2b425b;font-size: 1.2em;}
|
||||||
.layadmin-homepage-min-font{margin:5px 0 10px 0;font-size: 0.9em;color: #afb9c3;}
|
.layadmin-homepage-min-font{margin:5px 0 10px 0;font-size: 0.9em;color: #afb9c3;}
|
||||||
.layadmin-homepage-pad-ver a{line-height: 1.1em;font-size: 1.3em;vertical-align: middle; cursor: pointer;background-color: transparent;color: inherit;padding: 6px 12px;}
|
.layadmin-homepage-pad-ver a{line-height: 1.1em;font-size: 1.3em;vertical-align: middle; cursor: pointer;background-color: transparent;color: inherit;padding: 6px 12px;}
|
||||||
.layadmin-homepage-pad-ver a:hover{background: #5FB878; color:#fff;}
|
.layadmin-homepage-pad-ver a:hover{background: #16b777; color:#fff;}
|
||||||
|
|
||||||
.layadmin-homepage-about{padding: 15px;font-weight: 600;color: #2b425b;}
|
.layadmin-homepage-about{padding: 15px;font-weight: 600;color: #2b425b;}
|
||||||
.layadmin-homepage-list-group{font-size: 0.9em;line-height: 1.25;margin-bottom: 5px;}
|
.layadmin-homepage-list-group{font-size: 0.9em;line-height: 1.25;margin-bottom: 5px;}
|
||||||
|
|||||||
@@ -149,14 +149,11 @@
|
|||||||
layui.data(setter.tableName, { key: setter.request.tokenName, value: 'Bearer ' + res.data.token.token });
|
layui.data(setter.tableName, { key: setter.request.tokenName, value: 'Bearer ' + res.data.token.token });
|
||||||
var curTime = new Date();
|
var curTime = new Date();
|
||||||
var expiredate = new Date(curTime.setSeconds(curTime.getSeconds() + res.data.token.expires_in)); // 定义过期时间
|
var expiredate = new Date(curTime.setSeconds(curTime.getSeconds() + res.data.token.expires_in)); // 定义过期时间
|
||||||
console.log(expiredate);
|
//console.log(expiredate);
|
||||||
//layui.data(setter.tableName, { key: 'saveTokenExpire', value: coreHelper.getFullTime(expiredate) });
|
//layui.data(setter.tableName, { key: 'saveTokenExpire', value: coreHelper.getFullTime(expiredate) });
|
||||||
//window.localStorage.refreshtime = expiredate;
|
//window.localStorage.refreshtime = expiredate;
|
||||||
//window.localStorage.TokenExpire = expiredate;
|
//window.localStorage.TokenExpire = expiredate;
|
||||||
|
//console.log('登录:' + layui.data(setter.tableName)[setter.request.tokenName]);
|
||||||
console.log('登录:' + layui.data(setter.tableName)[setter.request.tokenName]);
|
|
||||||
|
|
||||||
|
|
||||||
layer.msg('登入成功,跳转中...', { time: 2000 },
|
layer.msg('登入成功,跳转中...', { time: 2000 },
|
||||||
function () {
|
function () {
|
||||||
location.hash = search.redirect ? decodeURIComponent(search.redirect) : '/';
|
location.hash = search.redirect ? decodeURIComponent(search.redirect) : '/';
|
||||||
|
|||||||
Reference in New Issue
Block a user