增加单页应用的layui-admin
1
iframe/src/res/adminui/dist/css/admin.css
vendored
Normal file
1
iframe/src/res/adminui/dist/css/login.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
#LAY_app,body,html{height:100%}.layui-layout-body{overflow:auto}#LAY-user-login,.layadmin-user-display-show{display:block!important}.layadmin-user-login{position:relative;left:0;top:0;padding:110px 0;min-height:100%;box-sizing:border-box}.layadmin-user-login-main{width:375px;margin:0 auto;box-sizing:border-box}.layadmin-user-login-box{padding:20px}.layadmin-user-login-header{text-align:center}.layadmin-user-login-header h2{margin-bottom:10px;font-weight:300;font-size:30px;color:#000}.layadmin-user-login-header p{font-weight:300;color:#999}.layadmin-user-login-body .layui-form-item{position:relative}.layadmin-user-login-icon{position:absolute;left:1px;top:1px;width:38px;line-height:36px;text-align:center;color:#d2d2d2}.layadmin-user-login-body .layui-form-item .layui-input{padding-left:38px}.layadmin-user-login-codeimg{max-height:38px;width:100%;cursor:pointer;box-sizing:border-box}.layadmin-user-login-other{position:relative;font-size:0;line-height:38px;padding-top:20px}.layadmin-user-login-other>*{display:inline-block;vertical-align:middle;margin-right:10px;font-size:14px}.layadmin-user-login-other .layui-icon{position:relative;top:2px;font-size:26px}.layadmin-user-login-other a:hover{opacity:.8}.layadmin-user-jump-change{float:right}.layadmin-user-login-footer{position:absolute;left:0;bottom:0;width:100%;line-height:30px;padding:20px;text-align:center;box-sizing:border-box;color:rgba(0,0,0,.5)}.layadmin-user-login-footer span{padding:0 5px}.layadmin-user-login-footer a{padding:0 5px;color:rgba(0,0,0,.5)}.layadmin-user-login-footer a:hover{color:#000}.layadmin-user-login-main[bgimg]{background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.05)}.ladmin-user-login-theme{position:fixed;bottom:0;left:0;width:100%;text-align:center}.ladmin-user-login-theme ul{display:inline-block;padding:5px;background-color:#fff}.ladmin-user-login-theme ul li{display:inline-block;vertical-align:top;width:64px;height:43px;cursor:pointer;transition:all .3s;-webkit-transition:all .3s;background-color:#f2f2f2}.ladmin-user-login-theme ul li:hover{opacity:.9}@media screen and (max-width:768px){.layadmin-user-login{padding-top:60px}.layadmin-user-login-main{width:300px}.layadmin-user-login-box{padding:10px}}
|
||||
1
iframe/src/res/adminui/dist/modules/admin.js
vendored
Normal file
1
iframe/src/res/adminui/dist/modules/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/** The Web UI Theme-v2.3.2 */;layui.define("admin",function(a){function n(e){function a(){r.tabChange(o,e.url),d.tabsBodyChange(s.index,{url:e.url,title:e.title})}e=c.extend({url:"",escape:!0},e);var i,t=c("#LAY_app_tabsheader>li"),n=e.url.replace(/(^http(s*):)|(\?[\s\S]*$)/g,"");t.each(function(a){c(this).attr("lay-id")===e.url&&(i=!0,s.index=a)}),e.title=e.title||(0===s.index?"":"\u65b0\u6807\u7b7e\u9875"),l.pageTabs?i||(setTimeout(function(){c("#LAY_app_body").append(['<div class="layadmin-tabsbody-item layui-show">','<iframe src="'+e.url+'" frameborder="0" class="layadmin-iframe"></iframe>',"</div>"].join("")),a()},10),s.index=t.length,r.tabAdd(o,{title:"<span>"+(t=u.escape(e.title),e.highlight?'<span style="'+e.highlight+'">'+t+"</span>":t)+"</span>",id:e.url,attr:n})):d.tabsBody(d.tabsPage.index).find(".layadmin-iframe")[0].contentWindow.location.href=e.url,a()}var l=layui.setter,r=layui.element,d=layui.admin,s=d.tabsPage,e=layui.view,u=layui.util,o="layadmin-layout-tabs",c=layui.$,e=(c(window),d.screen()<2&&d.sideFlexible(),e().autoRender(),function a(){var e=layui.url().hash,i=l.record||{},e=e.path.join("/"),t=(layui.data(l.tableName).record||{})[e]||"";return i.url&&e&&(i=c.trim(e),/^(\w*:)*\/\/.+/.test(i)&&-1===i.indexOf(location.hostname)||n({url:e,title:t})),setTimeout(function(){c("#"+l.container).css("visibility","visible")},300),a}(),{openTabsPage:n});c.extend(d,e),a("adminIndex",e)});
|
||||
1
iframe/src/res/adminui/dist/modules/view.js
vendored
Normal file
@@ -0,0 +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(e){layui.data(s.tableName,{key:s.request.tokenName,remove:!0}),e&&e()},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.autoRender=function(e,t){var n=this;c(e||"body").find("*[template]").each(function(e,t){var a=c(this);n.container=a,n.parse(a,"refresh")})},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)});
|
||||
157
iframe/src/res/config.js
Normal file
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
* setter
|
||||
*/
|
||||
|
||||
// 初始化配置
|
||||
layui.define(['all'], function(exports){
|
||||
exports('setter', {
|
||||
paths: { // v1.9.0 及以上版本的写法
|
||||
core: layui.cache.base + 'adminui/dist/', // 核心库所在目录
|
||||
views: layui.cache.base + 'views/', // 动态模板所在目录
|
||||
modules: layui.cache.base + 'modules/', // 业务模块所在目录
|
||||
base: layui.cache.base // 记录静态资源所在基础目录
|
||||
},
|
||||
/* v1.9.0 之前的写法
|
||||
// views: layui.cache.base + 'views/', // 业务视图所在目录
|
||||
// base: layui.cache.base, // 记录静态资源所在基础目录
|
||||
*/
|
||||
|
||||
container: 'LAY_app', // 容器 ID
|
||||
entry: 'index', // 默认视图文件名
|
||||
engine: '.html', // 视图文件后缀名
|
||||
pageTabs: true, // 是否开启页面选项卡功能。 iframe 版推荐开启
|
||||
refreshCurrPage: true, // 当跳转页面 url 与当前页 url 相同时,是否自动执行刷新 --- 2.0+
|
||||
|
||||
name: 'layuiAdmin', // 系统名称
|
||||
tableName: 'layuiAdmin', // 本地存储表名
|
||||
MOD_NAME: 'admin', // 模块事件名
|
||||
|
||||
// 记录
|
||||
record: {
|
||||
url: false // 是否开启 iframe 跳转时 url 记忆功能
|
||||
},
|
||||
|
||||
debug: true, // 是否开启调试模式。如开启,接口异常时会抛出异常 URL 等信息
|
||||
|
||||
// 自定义请求字段
|
||||
request: {
|
||||
tokenName: false // 自动携带 token 的字段名(如:access_token)。可设置 false 不携带。
|
||||
},
|
||||
|
||||
// 自定义响应字段
|
||||
response: {
|
||||
statusName: 'code', // 数据状态的字段名称
|
||||
statusCode: {
|
||||
ok: 0, // 数据状态一切正常的状态码
|
||||
logout: 1001 // 登录状态失效的状态码
|
||||
},
|
||||
msgName: 'msg', // 状态信息的字段名称
|
||||
dataName: 'data' // 数据详情的字段名称
|
||||
},
|
||||
|
||||
// 配置业务模块目录中的特殊模块
|
||||
extend: {
|
||||
layim: 'layim/layim' // layim
|
||||
},
|
||||
|
||||
// 主题配置
|
||||
theme: {
|
||||
// 内置主题配色方案
|
||||
color: [{
|
||||
main: '#20222A', // 主题色
|
||||
selected: '#16baaa', // 选中色
|
||||
alias: 'default' // 默认别名
|
||||
},{
|
||||
main: '#03152A',
|
||||
selected: '#3B91FF',
|
||||
alias: 'dark-blue' // 藏蓝
|
||||
},{
|
||||
main: '#2E241B',
|
||||
selected: '#A48566',
|
||||
alias: 'coffee' // 咖啡
|
||||
},{
|
||||
main: '#50314F',
|
||||
selected: '#7A4D7B',
|
||||
alias: 'purple-red' // 紫红
|
||||
},{
|
||||
main: '#344058',
|
||||
logo: '#1E9FFF',
|
||||
selected: '#1E9FFF',
|
||||
alias: 'ocean' // 海洋
|
||||
},{
|
||||
main: '#3A3D49',
|
||||
logo: '#2F9688',
|
||||
selected: '#16b777',
|
||||
alias: 'green' // 墨绿
|
||||
},{
|
||||
main: '#20222A',
|
||||
logo: '#F78400',
|
||||
selected: '#F78400',
|
||||
alias: 'red' // 橙色
|
||||
},{
|
||||
main: '#28333E',
|
||||
logo: '#AA3130',
|
||||
selected: '#AA3130',
|
||||
alias: 'fashion-red' // 时尚红
|
||||
},{
|
||||
main: '#24262F',
|
||||
logo: '#3A3D49',
|
||||
selected: '#16baaa',
|
||||
alias: 'classic-black' // 经典黑
|
||||
},{
|
||||
logo: '#226A62',
|
||||
header: '#2F9688',
|
||||
alias: 'green-header' // 墨绿头
|
||||
},{
|
||||
main: '#344058',
|
||||
logo: '#0085E8',
|
||||
selected: '#1E9FFF',
|
||||
header: '#1E9FFF',
|
||||
alias: 'ocean-header' // 海洋头
|
||||
},{
|
||||
header: '#393D49',
|
||||
alias: 'classic-black-header' // 经典黑头
|
||||
},{
|
||||
main: '#50314F',
|
||||
logo: '#50314F',
|
||||
selected: '#7A4D7B',
|
||||
header: '#50314F',
|
||||
alias: 'purple-red-header' // 紫红头
|
||||
},{
|
||||
main: '#28333E',
|
||||
logo: '#28333E',
|
||||
selected: '#AA3130',
|
||||
header: '#AA3130',
|
||||
alias: 'fashion-red-header' // 时尚红头
|
||||
},{
|
||||
main: '#28333E',
|
||||
logo: '#16baaa',
|
||||
selected: '#16baaa',
|
||||
header: '#16baaa',
|
||||
alias: 'green-header' // 墨绿头
|
||||
},{
|
||||
main: '#393D49',
|
||||
logo: '#393D49',
|
||||
selected: '#16baaa',
|
||||
header: '#23262E',
|
||||
alias: 'Classic-style1' // 经典风格1
|
||||
},{
|
||||
main: '#001529',
|
||||
logo: '#001529',
|
||||
selected: '#1890FF',
|
||||
header: '#1890FF',
|
||||
alias: 'Classic-style2' // 经典风格2
|
||||
},{
|
||||
main: '#25282A',
|
||||
logo: '#25282A',
|
||||
selected: '#35BDB2',
|
||||
header: '#35BDB2',
|
||||
alias: 'Classic-style3' // 经典风格3
|
||||
}],
|
||||
|
||||
// 初始的颜色索引,对应上面的配色方案数组索引
|
||||
// 如果本地已经有主题色记录,则以本地记录为优先,除非请求本地数据(localStorage)
|
||||
initColorIndex: 0
|
||||
}
|
||||
});
|
||||
});
|
||||
40
iframe/src/res/index.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* 初始化主题入口模块
|
||||
*/
|
||||
|
||||
layui.extend({
|
||||
setter: 'config' // 将 config.js 扩展到 layui 模块
|
||||
}).define(['setter'], function(exports){
|
||||
var setter = layui.setter;
|
||||
|
||||
// 将核心库扩展到 layui 模块
|
||||
layui.each({
|
||||
admin: 'admin',
|
||||
view: 'view',
|
||||
adminIndex: 'index'
|
||||
}, function(modName, fileName){
|
||||
var libs = {};
|
||||
libs[modName] = '{/}'+ setter.paths.core +'/modules/'+ fileName;
|
||||
layui.extend(libs);
|
||||
});
|
||||
|
||||
// 指定业务模块基础目录
|
||||
layui.config({
|
||||
base: setter.paths.modules
|
||||
});
|
||||
|
||||
// 将业务模块中的特殊模块扩展到 layui 模块
|
||||
layui.each(setter.extend, function(key, value){
|
||||
var mods = {};
|
||||
mods[key] = '{/}' + layui.cache.base + value;
|
||||
layui.extend(mods);
|
||||
});
|
||||
|
||||
// 加载主题核心库入口模块
|
||||
layui.use('adminIndex', function(){
|
||||
layui.use('common'); // 加载公共业务模块,如不需要可剔除
|
||||
|
||||
// 输出模块 / 模块加载完毕标志
|
||||
exports('index', layui.admin);
|
||||
});
|
||||
});
|
||||
36
iframe/src/res/json/console/prograss.js
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"prograss": "开会"
|
||||
,"time": "一小时"
|
||||
,"complete": "已完成"
|
||||
,"LAY_CHECKED": true
|
||||
},{
|
||||
"prograss": "项目开发"
|
||||
,"time": "两小时"
|
||||
,"complete": "进行中"
|
||||
,"LAY_CHECKED": true
|
||||
},{
|
||||
"prograss": "陪吃饭"
|
||||
,"time": "一小时"
|
||||
,"complete": "未完成"
|
||||
},{
|
||||
"prograss": "修改小bug"
|
||||
,"time": "半小时"
|
||||
,"complete": "未完成"
|
||||
},{
|
||||
"prograss": "修改大bug"
|
||||
,"time": "两小时"
|
||||
,"complete": "未完成"
|
||||
},{
|
||||
"prograss": "修改小bug"
|
||||
,"time": "半小时"
|
||||
,"complete": "未完成"
|
||||
},{
|
||||
"prograss": "修改大bug"
|
||||
,"time": "两小时"
|
||||
,"complete": "未完成"
|
||||
}]
|
||||
}
|
||||
76
iframe/src/res/json/console/top-card.js
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": 111
|
||||
,"title": "热帖测试"
|
||||
,"username": "test"
|
||||
,"channel": "公告"
|
||||
,"href": "http://www.baidu.com/jie/15697/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 222
|
||||
,"title": "一周年"
|
||||
,"username": "猫吃"
|
||||
,"channel": "讨论"
|
||||
,"href": "http://www.baidu.com/jie/16622/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "四个月的前端"
|
||||
,"username": "fd"
|
||||
,"channel": "分享"
|
||||
,"href": "http://www.baidu.com/jie/16651/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "如何评价前端 UI 框架"
|
||||
,"username": "张三"
|
||||
,"channel": "提问"
|
||||
,"href": "http://www.baidu.com/jie/9352/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "如何评价前端 UI 框架"
|
||||
,"username": "张三"
|
||||
,"channel": "提问"
|
||||
,"href": "http://www.baidu.com/jie/9352/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "如何评价前端 UI 框架"
|
||||
,"username": "张三"
|
||||
,"channel": "提问"
|
||||
,"href": "http://www.baidu.com/jie/9352/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "如何评价前端 UI 框架"
|
||||
,"username": "张三"
|
||||
,"channel": "提问"
|
||||
,"href": "http://www.baidu.com/jie/9352/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "如何评价前端 UI 框架"
|
||||
,"username": "张三"
|
||||
,"channel": "提问"
|
||||
,"href": "http://www.baidu.com/jie/9352/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "如何评价前端 UI 框架"
|
||||
,"username": "张三"
|
||||
,"channel": "提问"
|
||||
,"href": "http://www.baidu.com/jie/9352/"
|
||||
,"crt": 61632
|
||||
},{
|
||||
"id": 333
|
||||
,"title": "如何评价前端 UI 框架"
|
||||
,"username": "张三"
|
||||
,"channel": "提问"
|
||||
,"href": "http://www.baidu.com/jie/9352/"
|
||||
,"crt": 61632
|
||||
}]
|
||||
}
|
||||
46
iframe/src/res/json/console/top-search.js
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"keywords": "UI"
|
||||
,"frequency": 8520
|
||||
,"userNums": 2216
|
||||
},{
|
||||
"keywords": "layer 弹出层组件"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "此表格是静态模拟数据"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "前端 UI"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "前端 UI"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "前端 UI"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "前端 UI"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "前端 UI"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "前端 UI"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
},{
|
||||
"keywords": "前端 UI"
|
||||
,"frequency": 777
|
||||
,"userNums": 333
|
||||
}]
|
||||
}
|
||||
56
iframe/src/res/json/content/comment.js
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "001"
|
||||
,"reviewers": "赵"
|
||||
,"content": "我又爱上编程了"
|
||||
,"commtime": 20160312
|
||||
},{
|
||||
"id": "002"
|
||||
,"reviewers": "钱"
|
||||
,"content": "女生出门要小心"
|
||||
,"commtime": 20160821
|
||||
},{
|
||||
"id": "003"
|
||||
,"reviewers": "孙"
|
||||
,"content": "框架就用layui"
|
||||
,"commtime": 20161212
|
||||
},{
|
||||
"id": "004"
|
||||
,"reviewers": "李"
|
||||
,"content": "心姐么么哒"
|
||||
,"commtime": 20170311
|
||||
},{
|
||||
"id": "005"
|
||||
,"reviewers": "周"
|
||||
,"content": "希望明天是个好天气"
|
||||
,"commtime": 20170612
|
||||
},{
|
||||
"id": "006"
|
||||
,"reviewers": "吴"
|
||||
,"content": "我又爱上编程了"
|
||||
,"commtime": 20171112
|
||||
},{
|
||||
"id": "007"
|
||||
,"reviewers": "郑"
|
||||
,"content": "女生出门要小心"
|
||||
,"commtime": 20171230
|
||||
},{
|
||||
"id": "008"
|
||||
,"reviewers": "王"
|
||||
,"content": "框架就用layui"
|
||||
,"commtime": 20180112
|
||||
},{
|
||||
"id": "009"
|
||||
,"reviewers": "冯"
|
||||
,"content": "心姐么么哒"
|
||||
,"commtime": 20180221
|
||||
},{
|
||||
"id": "010"
|
||||
,"reviewers": "陈"
|
||||
,"content": "希望明天是个好天气"
|
||||
,"commtime": 20180312
|
||||
}]
|
||||
}
|
||||
62
iframe/src/res/json/content/list.js
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "001"
|
||||
,"label": "美食"
|
||||
,"title": "舌尖上的中国第一季"
|
||||
,"author": "作者-1"
|
||||
,"content": "通过中华美食的多个侧面,来展现食物给中国人生活带来的仪式、伦理等方面的文化;见识中国特色食材以及与食物相关、构成中国美食特有气质的一系列元素;了解中华饮食文化的精致和源远流长"
|
||||
,"uploadtime": 20121204
|
||||
,"status": true
|
||||
},{
|
||||
"id": "002"
|
||||
,"label": "美食"
|
||||
,"title": "舌尖上的中国第二季"
|
||||
,"author": "作者-2"
|
||||
,"content": "以食物为窗口,读懂中国——通过美食,使人们可以有滋有味地认知这个古老的东方国度。“一方水土一方人”,本片将通过展示人们日常生活中与美食相关的多重侧面,描绘与感知中国人的文化传统、家族观念、生活态度与故土难离。人们收获、保存、烹饪、生产美食,并在其过程中留存和传承食物所承载的味觉记忆、饮食习俗、文化样态与家常情感。"
|
||||
,"uploadtime": 20141204
|
||||
,"status": false
|
||||
},{
|
||||
"id": "003"
|
||||
,"label": "美食"
|
||||
,"title": "舌尖上的中国第三季"
|
||||
,"author": "作者-3"
|
||||
,"content": "以食物为窗口,读懂中国——通过美食,使人们可以有滋有味地认知这个古老的东方国度。“一方水土一方人”,本片将通过展示人们日常生活中与美食相关的多重侧面,描绘与感知中国人的文化传统、家族观念、生活态度与故土难离。人们收获、保存、烹饪、生产美食,并在其过程中留存和传承食物所承载的味觉记忆、饮食习俗、文化样态与家常情感将世界美食和中国美食进行比照。春耕、夏耘、秋收、冬藏,天人合一的东方哲学让中国饮食依时而变,智慧灵动,中医营养摄生学说创造了食材运用的新天地,儒家人伦道德则把心意和家的味道端上我们的餐桌。淘洗历史,糅合时光,一代又一代的中国人在天地间升起烟火,用至精至诚的心意烹制食物,一餐一食之间,中国人展示个性,确认归属,构建文明,理解和把握着世界的奥妙。"
|
||||
,"uploadtime": 20161204
|
||||
,"status": false
|
||||
},{
|
||||
"id": "004"
|
||||
,"label": "历史"
|
||||
,"title": "诸葛亮骂王朗"
|
||||
,"author": "作者-1"
|
||||
,"content": "皓首匹夫!苍髯老贼!你即将命归于九泉之下,届时,有何面目见汉朝二十四代先帝?二臣贼子!你枉活七十有六,一生未立寸功,只会摇唇舞舌,助曹为虐!一条断脊之犬,还敢在我军阵前狺狺狂吠!我从未见过如此厚颜无耻之人!!!"
|
||||
,"uploadtime": 20180201
|
||||
,"status": false
|
||||
},{
|
||||
"id": "005"
|
||||
,"label": "新闻"
|
||||
,"title": "新时代特色中国梦"
|
||||
,"author": "作者-1"
|
||||
,"content": "今天,我们比历史上任何时期都更接近、更有信心和能力实现中华民族伟大复兴的目标。新时代已经到来,蓝图已经绘就,中国梦离我们越来越近了。"
|
||||
,"uploadtime": 20180512
|
||||
,"status": false
|
||||
},{
|
||||
"id": "006"
|
||||
,"label": "新闻"
|
||||
,"title": "新时代特色中国梦"
|
||||
,"author": "作者-2"
|
||||
,"content": "梦想不会主动走向我们,只有我们去主动实现梦想。行百里者半九十。虽然中国梦离我们越来越近了,但是要实现中国梦,还要靠我们以永不懈怠的精神状态、功在不舍的坚强意志,不忘初心,继续前进。"
|
||||
,"uploadtime": 20180514
|
||||
,"status": false
|
||||
},{
|
||||
"id": "007"
|
||||
,"label": "体育"
|
||||
,"title": "皇马大战利物浦"
|
||||
,"author": "作者-3"
|
||||
,"content": "对欧足联而言,更想要产生个新冠军。连续三年都是同一个冠军队,这会毁掉欧冠……”格里姆表态,“皇马有梦幻般的阵容,但从促进竞争的角度而言,另一支球队获胜会更好。"
|
||||
,"uploadtime": 20180515
|
||||
,"status": false
|
||||
}]
|
||||
}
|
||||
21
iframe/src/res/json/content/tags.js
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "001"
|
||||
,"tags": "美食"
|
||||
},{
|
||||
"id": "002"
|
||||
,"tags": "新闻"
|
||||
},{
|
||||
"id": "003"
|
||||
,"tags": "八卦"
|
||||
},{
|
||||
"id": "004"
|
||||
,"tags": "体育"
|
||||
},{
|
||||
"id": "005"
|
||||
,"tags": "音乐"
|
||||
}]
|
||||
}
|
||||
62
iframe/src/res/json/forum/list.js
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "1001"
|
||||
,"poster": "赵"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "为什么花儿这么么红"
|
||||
,"posttime": 20160805
|
||||
,"top": false
|
||||
},{
|
||||
"id": "1002"
|
||||
,"poster": "钱"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "喜欢张三,赞赞赞"
|
||||
,"posttime": 20161205
|
||||
,"top": true
|
||||
},{
|
||||
"id": "1003"
|
||||
,"poster": "孙"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "明天就要考试了,好紧张,求保佑"
|
||||
,"posttime": 20170405
|
||||
,"top": false
|
||||
},{
|
||||
"id": "1004"
|
||||
,"poster": "李"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "希望明天是个好天气"
|
||||
,"posttime": 20171005
|
||||
,"top": false
|
||||
},{
|
||||
"id": "1005"
|
||||
,"poster": "周"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "女追男隔层纱,是不是真的"
|
||||
,"posttime": 20180205
|
||||
,"top": false
|
||||
},{
|
||||
"id": "1006"
|
||||
,"poster": "吴"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "竟然有人!"
|
||||
,"posttime": 20180512
|
||||
,"top": false
|
||||
},{
|
||||
"id": "1007"
|
||||
,"poster": "郑"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "咋了"
|
||||
,"posttime": 20180512
|
||||
,"top": false
|
||||
},{
|
||||
"id": "1008"
|
||||
,"poster": "王"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "想知道南昌哪里有好吃的西安肉夹馍"
|
||||
,"posttime": 20180514
|
||||
,"top": false
|
||||
}]
|
||||
}
|
||||
69
iframe/src/res/json/forum/replys.js
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "001"
|
||||
,"replyer": "吴"
|
||||
,"cardid": "1002"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "有眼光,我也喜欢张三!"
|
||||
,"replytime": 20161205
|
||||
},{
|
||||
"id": "002"
|
||||
,"replyer": "郑"
|
||||
,"cardid": "1002"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "同上同上。"
|
||||
,"replytime": 20161205
|
||||
},{
|
||||
"id": "003"
|
||||
,"replyer": "王"
|
||||
,"cardid": "1003"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "能过一定过,不能过紧张也没用"
|
||||
,"replytime": 20170405
|
||||
},{
|
||||
"id": "004"
|
||||
,"replyer": "冯"
|
||||
,"cardid": "1001"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "可能因为你。"
|
||||
,"replytime": 20170405
|
||||
},{
|
||||
"id": "005"
|
||||
,"replyer": "陈"
|
||||
,"cardid": "1003"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "加油加油,看好你"
|
||||
,"replytime": 20170405
|
||||
},{
|
||||
"id": "006"
|
||||
,"replyer": "褚"
|
||||
,"cardid": "1005"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "纯属喜爱"
|
||||
,"replytime": 20180207
|
||||
},{
|
||||
"id": "007"
|
||||
,"replyer": "卫"
|
||||
,"cardid": "1005"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "可以试试"
|
||||
,"replytime": 20180207
|
||||
},{
|
||||
"id": "006"
|
||||
,"replyer": "蒋"
|
||||
,"cardid": "1006"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "是啊是啊,太棒了。"
|
||||
,"replytime": 20180512
|
||||
},{
|
||||
"id": "007"
|
||||
,"replyer": "沈"
|
||||
,"cardid": "1008"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"content": "魏家凉皮不错奥。"
|
||||
,"replytime": 20180515
|
||||
}]
|
||||
}
|
||||
96
iframe/src/res/json/layim/getList.js
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"data": {
|
||||
"mine": {
|
||||
"username": "测试名称"
|
||||
,"id": "100000"
|
||||
,"status": "online"
|
||||
,"sign": "测试"
|
||||
,"avatar": ""
|
||||
}
|
||||
,"friend": [{
|
||||
"groupname": "测试分组一"
|
||||
,"id": 0
|
||||
,"list": [{
|
||||
"username": "测试1"
|
||||
,"id": "100001"
|
||||
,"avatar": ""
|
||||
,"sign": "测试内容1"
|
||||
,"status": "online"
|
||||
},{
|
||||
"username": "测试2"
|
||||
,"id": "100001222"
|
||||
,"sign": "测试内容2"
|
||||
,"avatar": ""
|
||||
},{
|
||||
"username": "测试3"
|
||||
,"id": "10034001"
|
||||
,"avatar": ""
|
||||
,"sign": ""
|
||||
},{
|
||||
"username": "测试4"
|
||||
,"id": "168168"
|
||||
,"avatar": ""
|
||||
,"sign": "测试内容4"
|
||||
},{
|
||||
"username": "测试5"
|
||||
,"id": "777777"
|
||||
,"avatar": ""
|
||||
,"sign": "测试内容5"
|
||||
}]
|
||||
},{
|
||||
"groupname": "测试分组二"
|
||||
,"id": 1
|
||||
,"list": [{
|
||||
"username": "测试6"
|
||||
,"id": "121286"
|
||||
,"avatar": ""
|
||||
,"sign": "测试内容6"
|
||||
},{
|
||||
"username": "测试7"
|
||||
,"id": "108101"
|
||||
,"avatar": ""
|
||||
,"sign": "微电商达人"
|
||||
},{
|
||||
"username": "测试8"
|
||||
,"id": "12123454"
|
||||
,"avatar": ""
|
||||
,"sign": "测试内容8"
|
||||
},{
|
||||
"username": "测试9"
|
||||
,"id": "102101"
|
||||
,"avatar": ""
|
||||
,"sign": ""
|
||||
},{
|
||||
"username": "测试10"
|
||||
,"id": "3435343"
|
||||
,"avatar": ""
|
||||
,"sign": ""
|
||||
}]
|
||||
},{
|
||||
"groupname": "测试分组三"
|
||||
,"id": 2
|
||||
,"list": [{
|
||||
"username": "测试11"
|
||||
,"id": "76543"
|
||||
,"avatar": ""
|
||||
,"sign": "测试内容11"
|
||||
},{
|
||||
"username": "测试12"
|
||||
,"id": "4803920"
|
||||
,"avatar": ""
|
||||
,"sign": "测试内容12"
|
||||
}]
|
||||
}]
|
||||
,"group": [{
|
||||
"groupname": "测试群组一"
|
||||
,"id": "101"
|
||||
,"avatar": ""
|
||||
},{
|
||||
"groupname": "测试群组二"
|
||||
,"id": "102"
|
||||
,"avatar": ""
|
||||
}]
|
||||
}
|
||||
}
|
||||
46
iframe/src/res/json/message/all.js
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": 60
|
||||
,"data": [{
|
||||
"id": 123
|
||||
,"title": "Hello World"
|
||||
,"time": 1510363800000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1507447570000
|
||||
}]
|
||||
}
|
||||
46
iframe/src/res/json/message/direct.js
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": 60
|
||||
,"data": [{
|
||||
"id": 123
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510363800000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1507447570000
|
||||
}]
|
||||
}
|
||||
46
iframe/src/res/json/message/notice.js
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": 60
|
||||
,"data": [{
|
||||
"id": 123
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510363800000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1510212370000
|
||||
}, {
|
||||
"id": 111
|
||||
,"title": "一段模拟的测试私信"
|
||||
,"time": 1507447570000
|
||||
}]
|
||||
}
|
||||
216
iframe/src/res/json/table/demo.js
Normal file
@@ -0,0 +1,216 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": 1000
|
||||
,"data": [{
|
||||
"id": "10001"
|
||||
,"username": "李白"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。"
|
||||
,"experience": "12"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
,"LAY_CHECKED": true
|
||||
}, {
|
||||
"id": "10002"
|
||||
,"username": "杜甫"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "舍南舍北皆春水,但见群鸥日日来。花径不曾缘客扫,蓬门今始为君开。盘飧市远无兼味,樽酒家贫只旧醅。肯与邻翁相对饮,隔篱呼取尽余杯。"
|
||||
,"experience": "116"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "108"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10003"
|
||||
,"username": "苏轼"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "大江东去,浪淘尽,千古风流人物。故垒西边,人道是,三国周郎赤壁。乱石穿空,惊涛拍岸,卷起千堆雪。江山如画,一时多少豪杰。遥想公瑾当年,小乔初嫁了,雄姿英发。羽扇纶巾,谈笑间,樯橹灰飞烟灭。故国神游,多情应笑我,早生华发。人生如梦,一尊还酹江月。"
|
||||
,"experience": "65"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10004"
|
||||
,"username": "李清照"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "女"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "777"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10005"
|
||||
,"username": "冰心"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "女"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "86"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10006"
|
||||
,"username": "张三"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "12"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10007"
|
||||
,"username": "张三7"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "16"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10008"
|
||||
,"username": "张三8"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10009"
|
||||
,"username": "张三9"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10010"
|
||||
,"username": "张三10"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10011"
|
||||
,"username": "张三11"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10012"
|
||||
,"username": "张三12"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10013"
|
||||
,"username": "张三13"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10014"
|
||||
,"username": "张三14"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10015"
|
||||
,"username": "张三15"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10016"
|
||||
,"username": "张三16"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10017"
|
||||
,"username": "张三17"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10018"
|
||||
,"username": "张三18"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10019"
|
||||
,"username": "张三19"
|
||||
,"email": "test@email.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "保持真善美,温和待人"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"checkin": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}]
|
||||
}
|
||||
61
iframe/src/res/json/table/demo2.js
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": 66
|
||||
,"data": [{
|
||||
"username": "张小三"
|
||||
,"amount": 18
|
||||
,"province": "浙江"
|
||||
,"city": "杭州"
|
||||
,"zone": "西湖区"
|
||||
,"street": "西溪街道"
|
||||
,"address": "西溪花园"
|
||||
,"house": "x栋x单元"
|
||||
}, {
|
||||
"username": "李小四"
|
||||
,"amount": 39
|
||||
,"province": "江苏"
|
||||
,"city": "苏州"
|
||||
,"zone": "姑苏区"
|
||||
,"street": "丝绸路"
|
||||
,"address": "天墅之城"
|
||||
,"house": "x幢x单元"
|
||||
}, {
|
||||
"username": "王小五"
|
||||
,"amount": 8
|
||||
,"province": "江西"
|
||||
,"city": "南昌"
|
||||
,"zone": "青山湖区"
|
||||
,"street": "艾溪湖办事处"
|
||||
,"address": "中兴和园"
|
||||
,"house": "x幢x单元"
|
||||
}, {
|
||||
"username": "赵小六"
|
||||
,"amount": 16
|
||||
,"province": "福建"
|
||||
,"city": "泉州"
|
||||
,"zone": "丰泽区"
|
||||
,"street": "南洋街道"
|
||||
,"address": "南洋村"
|
||||
,"house": "x幢x单元"
|
||||
}, {
|
||||
"username": "孙小七"
|
||||
,"amount": 12
|
||||
,"province": "湖北"
|
||||
,"city": "武汉"
|
||||
,"zone": "武昌区"
|
||||
,"street": "武昌大道"
|
||||
,"address": "两湖花园"
|
||||
,"house": "x幢x单元"
|
||||
}, {
|
||||
"username": "周小八"
|
||||
,"amount": 11
|
||||
,"province": "安徽"
|
||||
,"city": "黄山"
|
||||
,"zone": "黄山区"
|
||||
,"street": "汤口镇"
|
||||
,"address": "温泉村"
|
||||
,"house": "x号"
|
||||
}]
|
||||
}
|
||||
96
iframe/src/res/json/table/demo3.js
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"status": 200
|
||||
,"message": ""
|
||||
,"total": 8
|
||||
,"rows": {
|
||||
"item": [{
|
||||
"id": "10001"
|
||||
,"username": "杜甫"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "点击此处,显示更多。当内容超出时,点击单元格会自动显示更多内容。"
|
||||
,"experience": "116"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "108"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10002"
|
||||
,"username": "李白"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。"
|
||||
,"experience": "12"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10003"
|
||||
,"username": "王勃"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "人生恰似一场修行"
|
||||
,"experience": "65"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10004"
|
||||
,"username": "李清照"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "女"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "人生恰似一场修行"
|
||||
,"experience": "777"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10005"
|
||||
,"username": "冰心"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "女"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "人生恰似一场修行"
|
||||
,"experience": "86"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10006"
|
||||
,"username": "tester"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "人生恰似一场修行"
|
||||
,"experience": "12"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10007"
|
||||
,"username": "tester"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "人生恰似一场修行"
|
||||
,"experience": "16"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}, {
|
||||
"id": "10008"
|
||||
,"username": "tester"
|
||||
,"email": "xianxin@baidu.com"
|
||||
,"sex": "男"
|
||||
,"city": "浙江杭州"
|
||||
,"sign": "人生恰似一场修行"
|
||||
,"experience": "106"
|
||||
,"ip": "192.168.0.8"
|
||||
,"logins": "106"
|
||||
,"joinTime": "2016-10-14"
|
||||
}]
|
||||
}
|
||||
}
|
||||
2
iframe/src/res/json/table/user.js
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
{"code":0,"msg":"","count":1000,"data":[{"id":10000,"username":"user-0","sex":"女","city":"城市-0","sign":"签名-0","experience":255,"logins":24,"wealth":82830700,"classify":"作家","score":57},{"id":10001,"username":"user-1","sex":"男","city":"城市-1","sign":"签名-1","experience":884,"logins":58,"wealth":64928690,"classify":"词人","score":27},{"id":10002,"username":"user-2","sex":"女","city":"城市-2","sign":"签名-2","experience":650,"logins":77,"wealth":6298078,"classify":"酱油","score":31},{"id":10003,"username":"user-3","sex":"女","city":"城市-3","sign":"签名-3","experience":362,"logins":157,"wealth":37117017,"classify":"诗人","score":68},{"id":10004,"username":"user-4","sex":"男","city":"城市-4","sign":"签名-4","experience":807,"logins":51,"wealth":76263262,"classify":"作家","score":6},{"id":10005,"username":"user-5","sex":"女","city":"城市-5","sign":"签名-5","experience":173,"logins":68,"wealth":60344147,"classify":"作家","score":87},{"id":10006,"username":"user-6","sex":"女","city":"城市-6","sign":"签名-6","experience":982,"logins":37,"wealth":57768166,"classify":"作家","score":34},{"id":10007,"username":"user-7","sex":"男","city":"城市-7","sign":"签名-7","experience":727,"logins":150,"wealth":82030578,"classify":"作家","score":28},{"id":10008,"username":"user-8","sex":"男","city":"城市-8","sign":"签名-8","experience":951,"logins":133,"wealth":16503371,"classify":"词人","score":14},{"id":10009,"username":"user-9","sex":"女","city":"城市-9","sign":"签名-9","experience":484,"logins":25,"wealth":86801934,"classify":"词人","score":75}]}
|
||||
5
iframe/src/res/json/treeTable/demo-1.json
Normal file
7
iframe/src/res/json/user/login.js
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": "登入成功"
|
||||
,"data": {
|
||||
"access_token": "c262e61cd13ad99fc650e6908c7e5e65b63d2f32185ecfed6b801ee3fbdd5c0a"
|
||||
}
|
||||
}
|
||||
5
iframe/src/res/json/user/logout.js
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": "退出成功"
|
||||
,"data": null
|
||||
}
|
||||
78
iframe/src/res/json/useradmin/mangadmin.js
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "1001"
|
||||
,"loginname": "admin"
|
||||
,"telphone": "11111111111"
|
||||
,"email": "111@qq.com"
|
||||
,"role": "超级管理员"
|
||||
,"jointime": "20150217"
|
||||
,"check": true
|
||||
},{
|
||||
"id": "1002"
|
||||
,"loginname": "common-1"
|
||||
,"telphone": "22222222222"
|
||||
,"email": "222@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20160217"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "1003"
|
||||
,"loginname": "common-2"
|
||||
,"telphone": "33333333333"
|
||||
,"email": "333@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20161012"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "1004"
|
||||
,"loginname": "common-3"
|
||||
,"telphone": "44444444444"
|
||||
,"email": "444@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20170518"
|
||||
,"check": true
|
||||
},{
|
||||
"id": "1005"
|
||||
,"loginname": "common-4"
|
||||
,"telphone": "55555555555"
|
||||
,"email": "555@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20180101"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "1006"
|
||||
,"loginname": "common-5"
|
||||
,"telphone": "123123123123"
|
||||
,"email": "123@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20160217"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "1007"
|
||||
,"loginname": "common-6"
|
||||
,"telphone": "77777777777"
|
||||
,"email": "777@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20161012"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "1008"
|
||||
,"loginname": "common-7"
|
||||
,"telphone": "88888888888"
|
||||
,"email": "888@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20170518"
|
||||
,"check": true
|
||||
},{
|
||||
"id": "1009"
|
||||
,"loginname": "common-8"
|
||||
,"telphone": "99999999999"
|
||||
,"email": "999@qq.com"
|
||||
,"role": "管理员"
|
||||
,"jointime": "20180101"
|
||||
,"check": false
|
||||
}]
|
||||
}
|
||||
54
iframe/src/res/json/useradmin/role.js
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "1"
|
||||
,"rolename": "超级管理员"
|
||||
,"limits": "管理所有的管理员"
|
||||
,"descr": "拥有至高无上的权利"
|
||||
,"check": true
|
||||
},{
|
||||
"id": "2"
|
||||
,"rolename": "管理员"
|
||||
,"limits": "所有列表的管理"
|
||||
,"descr": "事情很多,权力很大"
|
||||
,"check": true
|
||||
},{
|
||||
"id": "3"
|
||||
,"rolename": "文章撰写员"
|
||||
,"limits": "负责文章的编写"
|
||||
,"descr": "文采第一的人才集合"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "4"
|
||||
,"rolename": "纠错员"
|
||||
,"limits": "负责文章内容的修改"
|
||||
,"descr": "暂无"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "5"
|
||||
,"rolename": "统计人员"
|
||||
,"limits": "对数据进行统计"
|
||||
,"descr": "暂无"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "6"
|
||||
,"rolename": "评估员"
|
||||
,"limits": "对统计数据进行评估"
|
||||
,"descr": "及时捕捉市场发展动态"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "7"
|
||||
,"rolename": "采购员"
|
||||
,"limits": "负责员工的伙食"
|
||||
,"descr": "暂无"
|
||||
,"check": false
|
||||
},{
|
||||
"id": "8"
|
||||
,"rolename": "推销员"
|
||||
,"limits": "介绍销售公司产品"
|
||||
,"descr": "暂无"
|
||||
,"check": false
|
||||
}]
|
||||
}
|
||||
143
iframe/src/res/json/useradmin/webuser.js
Normal file
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"id": "001"
|
||||
,"username": "用户-1"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "002"
|
||||
,"username": "用户-2"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "003"
|
||||
,"username": "用户-3"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "女"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171011
|
||||
,"LAY_CHECKED": true
|
||||
},{
|
||||
"id": "004"
|
||||
,"username": "用户-4"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20160505
|
||||
},{
|
||||
"id": "005"
|
||||
,"username": "用户-5"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "006"
|
||||
,"username": "用户-6"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "007"
|
||||
,"username": "用户-7"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20180210
|
||||
},{
|
||||
"id": "008"
|
||||
,"username": "用户-8"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "女"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "009"
|
||||
,"username": "用户-9"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "女"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "010"
|
||||
,"username": "用户-10"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20170719
|
||||
},{
|
||||
"id": "011"
|
||||
,"username": "用户-11"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "012"
|
||||
,"username": "用户-12"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "女"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "013"
|
||||
,"username": "用户-13"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "女"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
,"LAY_CHECKED": true
|
||||
},{
|
||||
"id": "014"
|
||||
,"username": "用户-14"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
},{
|
||||
"id": "015"
|
||||
,"username": "用户-15"
|
||||
,"avatar": "https://unpkg.com/outeres/demo/avatar/0.png"
|
||||
,"phone": 12345678901
|
||||
,"email": "11111@qq.com"
|
||||
,"sex": "男"
|
||||
,"ip": "1111111"
|
||||
,"jointime": 20171204
|
||||
}]
|
||||
}
|
||||
78
iframe/src/res/json/workorder/demo.js
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"code": 0
|
||||
,"msg": ""
|
||||
,"count": "100"
|
||||
,"data": [{
|
||||
"orderid": 111
|
||||
,"title": "移动支付踏入马来西亚,聚合支付紧随其后"
|
||||
,"attr": "公告"
|
||||
,"progress": "25%"
|
||||
,"submit": "tester"
|
||||
,"accept": "员工-1"
|
||||
,"state": "处理中"
|
||||
},{
|
||||
"orderid": 222
|
||||
,"title": "凡科拖拽式免费建站神器,享双重优惠!"
|
||||
,"attr": "讨论"
|
||||
,"progress": "100%"
|
||||
,"submit": "猫吃"
|
||||
,"accept": "员工-1"
|
||||
,"state": "已处理"
|
||||
},{
|
||||
"orderid": 333
|
||||
,"title": "看着别人的老板给员工送汽车有感"
|
||||
,"attr": "分享"
|
||||
,"progress": "0%"
|
||||
,"submit": "张三"
|
||||
,"accept": ""
|
||||
,"state": "未分配"
|
||||
},{
|
||||
"orderid": 444
|
||||
,"title": "DISCUZ的云平台还有戏吗"
|
||||
,"attr": "提问"
|
||||
,"progress": "0%"
|
||||
,"submit": "张三"
|
||||
,"accept": ""
|
||||
,"state": "未分配"
|
||||
},{
|
||||
"orderid": 555
|
||||
,"title": "现在个人网站还有必要长期坚持下去吗?"
|
||||
,"attr": "提问"
|
||||
,"progress": "50%"
|
||||
,"submit": "张三"
|
||||
,"accept": "员工-2"
|
||||
,"state": "处理中"
|
||||
},{
|
||||
"orderid": 55555
|
||||
,"title": "求安排一个技术客服?"
|
||||
,"attr": "公告"
|
||||
,"progress": "25%"
|
||||
,"submit": "张三"
|
||||
,"accept": "员工-3"
|
||||
,"state": "处理中"
|
||||
},{
|
||||
"orderid": 777
|
||||
,"title": "游戏 网页美工,一个月多少工资才正常?"
|
||||
,"attr": "提问"
|
||||
,"progress": "100%"
|
||||
,"submit": "张三"
|
||||
,"accept": "员工-1"
|
||||
,"state": "已处理"
|
||||
},{
|
||||
"orderid": 888
|
||||
,"title": "几年没来了,蓝色理想帖子这么少了啊"
|
||||
,"attr": "提问"
|
||||
,"progress": "0%"
|
||||
,"submit": "张三"
|
||||
,"accept": ""
|
||||
,"state": "未分配"
|
||||
},{
|
||||
"orderid": 999
|
||||
,"title": "我的天,求推荐靠谱的学习网站"
|
||||
,"attr": "提问"
|
||||
,"progress": "50%"
|
||||
,"submit": "张三"
|
||||
,"accept": "员工-2"
|
||||
,"state": "处理中"
|
||||
}]
|
||||
}
|
||||
1
iframe/src/res/layui/css/layui.css
Normal file
BIN
iframe/src/res/layui/font/iconfont.eot
Normal file
405
iframe/src/res/layui/font/iconfont.svg
Normal file
|
After Width: | Height: | Size: 322 KiB |
BIN
iframe/src/res/layui/font/iconfont.ttf
Normal file
BIN
iframe/src/res/layui/font/iconfont.woff
Normal file
BIN
iframe/src/res/layui/font/iconfont.woff2
Normal file
1
iframe/src/res/layui/layui.js
Normal file
38
iframe/src/res/modules/common.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* common demo
|
||||
*/
|
||||
|
||||
layui.define(function(exports){
|
||||
var $ = layui.$
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,setter = layui.setter
|
||||
,view = layui.view
|
||||
,admin = layui.admin
|
||||
|
||||
//公共业务的逻辑处理可以写在此处,切换任何页面都会执行
|
||||
//……
|
||||
|
||||
|
||||
|
||||
//退出
|
||||
admin.events.logout = function(){
|
||||
//执行退出接口
|
||||
admin.req({
|
||||
url: layui.setter.paths.base + 'json/user/logout.js'
|
||||
,type: 'get'
|
||||
,data: {}
|
||||
,done: function(res){ //这里要说明一下:done 是只有 response 的 code 正常才会执行。而 succese 则是只要 http 为 200 就会执行
|
||||
|
||||
//清空本地记录的 token,并跳转到登入页
|
||||
admin.exit(function(){
|
||||
location.href = 'user/login.html';
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//对外暴露的接口
|
||||
exports('common', {});
|
||||
});
|
||||
324
iframe/src/res/modules/console.js
Normal file
@@ -0,0 +1,324 @@
|
||||
/**
|
||||
* console demo
|
||||
*/
|
||||
|
||||
layui.define(function(exports){
|
||||
|
||||
/*
|
||||
下面通过 layui.use 分段加载不同的模块,实现不同区域的同时渲染,从而保证视图的快速呈现
|
||||
*/
|
||||
|
||||
|
||||
//区块轮播切换
|
||||
layui.use(['admin', 'carousel'], function(){
|
||||
var $ = layui.$
|
||||
,admin = layui.admin
|
||||
,carousel = layui.carousel
|
||||
,element = layui.element
|
||||
,device = layui.device();
|
||||
|
||||
//轮播切换
|
||||
$('.layadmin-carousel').each(function(){
|
||||
var othis = $(this);
|
||||
carousel.render({
|
||||
elem: this
|
||||
,width: '100%'
|
||||
,arrow: 'none'
|
||||
,interval: othis.data('interval')
|
||||
,autoplay: othis.data('autoplay') === true
|
||||
,trigger: (device.ios || device.android) ? 'click' : 'hover'
|
||||
,anim: othis.data('anim')
|
||||
});
|
||||
});
|
||||
|
||||
element.render('progress');
|
||||
|
||||
});
|
||||
|
||||
//数据概览
|
||||
layui.use(['admin', 'carousel', 'echarts'], function(){
|
||||
var $ = layui.$
|
||||
,admin = layui.admin
|
||||
,carousel = layui.carousel
|
||||
,echarts = layui.echarts;
|
||||
|
||||
var echartsApp = [], options = [
|
||||
//今日流量趋势
|
||||
{
|
||||
title: {
|
||||
text: '今日流量趋势',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data:['','']
|
||||
},
|
||||
xAxis : [{
|
||||
type : 'category',
|
||||
boundaryGap : false,
|
||||
data: ['06:00','06:30','07:00','07:30','08:00','08:30','09:00','09:30','10:00','11:30','12:00','12:30','13:00','13:30','14:00','14:30','15:00','15:30','16:00','16:30','17:00','17:30','18:00','18:30','19:00','19:30','20:00','20:30','21:00','21:30','22:00','22:30','23:00','23:30']
|
||||
}],
|
||||
yAxis : [{
|
||||
type : 'value'
|
||||
}],
|
||||
series : [{
|
||||
name:'PV',
|
||||
type:'line',
|
||||
smooth:true,
|
||||
itemStyle: {normal: {areaStyle: {type: 'default'}}},
|
||||
data: [111,222,333,444,555,888,3333,33333,55555,88888,33333,3333,8888,11888,28888,38888,58888,42222,39999,28888,17777,9555,6555,5555,3333,2222,3111,6999,5888,2777,1777,999,888,777]
|
||||
},{
|
||||
name:'UV',
|
||||
type:'line',
|
||||
smooth:true,
|
||||
itemStyle: {normal: {areaStyle: {type: 'default'}}},
|
||||
data: [11,22,33,44,55,66,333,3333,5555,12888,3333,333,888,1188,2888,3888,8888,4222,3999,2888,1777,966,655,555,333,222,311,699,588,277,166,99,88,77]
|
||||
}]
|
||||
},
|
||||
|
||||
/*
|
||||
//访客浏览器分布
|
||||
{
|
||||
title : {
|
||||
text: '访客浏览器分布',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient : 'vertical',
|
||||
x : 'left',
|
||||
data:['Chrome','Firefox','IE 8.0','Safari','其它浏览器']
|
||||
},
|
||||
series : [{
|
||||
name:'访问来源',
|
||||
type:'pie',
|
||||
radius : '55%',
|
||||
center: ['50%', '50%'],
|
||||
data:[
|
||||
{value:9052, name:'Chrome'},
|
||||
{value:1610, name:'Firefox'},
|
||||
{value:3200, name:'IE 8.0'},
|
||||
{value:535, name:'Safari'},
|
||||
{value:1700, name:'其它浏览器'}
|
||||
]
|
||||
}]
|
||||
},
|
||||
*/
|
||||
|
||||
//新增的用户量
|
||||
{
|
||||
title: {
|
||||
text: '最近一周新增的用户量',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
tooltip : { //提示框
|
||||
trigger: 'axis',
|
||||
formatter: "{b}<br>新增用户:{c}"
|
||||
},
|
||||
xAxis : [{ //X轴
|
||||
type : 'category',
|
||||
data : ['11-07', '11-08', '11-09', '11-10', '11-11', '11-12', '11-13']
|
||||
}],
|
||||
yAxis : [{ //Y轴
|
||||
type : 'value'
|
||||
}],
|
||||
series : [{ //内容
|
||||
type: 'line',
|
||||
data:[200, 300, 400, 610, 150, 270, 380],
|
||||
}]
|
||||
}
|
||||
]
|
||||
,elemDataView = $('#LAY-index-dataview').children('div')
|
||||
,renderDataView = function(index){
|
||||
echartsApp[index] = echarts.init(elemDataView[index], layui.echartsTheme);
|
||||
echartsApp[index].setOption(options[index]);
|
||||
//window.onresize = echartsApp[index].resize;
|
||||
admin.resize(function(){
|
||||
echartsApp[index].resize();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//没找到DOM,终止执行
|
||||
if(!elemDataView[0]) return;
|
||||
|
||||
|
||||
|
||||
renderDataView(0);
|
||||
|
||||
//触发数据概览轮播
|
||||
var carouselIndex = 0;
|
||||
carousel.on('change(LAY-index-dataview)', function(obj){
|
||||
renderDataView(carouselIndex = obj.index);
|
||||
});
|
||||
|
||||
//触发侧边伸缩
|
||||
layui.admin.on('side', function(){
|
||||
setTimeout(function(){
|
||||
renderDataView(carouselIndex);
|
||||
}, 300);
|
||||
});
|
||||
|
||||
//触发路由
|
||||
layui.admin.on('hash(tab)', function(){
|
||||
layui.router().path.join('') || renderDataView(carouselIndex);
|
||||
});
|
||||
});
|
||||
|
||||
//地图
|
||||
layui.use(['carousel', 'echarts'], function(){
|
||||
var $ = layui.$
|
||||
,carousel = layui.carousel
|
||||
,echarts = layui.echarts;
|
||||
|
||||
var echartsApp = [], options = [
|
||||
{
|
||||
title : {
|
||||
text: '访客地区分布',
|
||||
subtext: '不完全统计'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item'
|
||||
},
|
||||
dataRange: {
|
||||
orient: 'horizontal',
|
||||
min: 0,
|
||||
max: 60000,
|
||||
text:['高','低'],
|
||||
splitNumber:0
|
||||
},
|
||||
series : [
|
||||
{
|
||||
name: '访客地区分布',
|
||||
type: 'map',
|
||||
mapType: 'china',
|
||||
selectedMode : 'multiple',
|
||||
itemStyle:{
|
||||
normal:{label:{show:true}},
|
||||
emphasis:{label:{show:true}}
|
||||
},
|
||||
data:[
|
||||
{name:'西藏', value:60},
|
||||
{name:'青海', value:167},
|
||||
{name:'宁夏', value:210},
|
||||
{name:'海南', value:252},
|
||||
{name:'甘肃', value:502},
|
||||
{name:'贵州', value:570},
|
||||
{name:'新疆', value:661},
|
||||
{name:'云南', value:8890},
|
||||
{name:'重庆', value:10010},
|
||||
{name:'吉林', value:5056},
|
||||
{name:'山西', value:2123},
|
||||
{name:'天津', value:9130},
|
||||
{name:'江西', value:10170},
|
||||
{name:'广西', value:6172},
|
||||
{name:'陕西', value:9251},
|
||||
{name:'黑龙江', value:5125},
|
||||
{name:'内蒙古', value:1435},
|
||||
{name:'安徽', value:9530},
|
||||
{name:'北京', value:51919},
|
||||
{name:'福建', value:3756},
|
||||
{name:'上海', value:59190},
|
||||
{name:'湖北', value:37109},
|
||||
{name:'湖南', value:8966},
|
||||
{name:'四川', value:31020},
|
||||
{name:'辽宁', value:7222},
|
||||
{name:'河北', value:3451},
|
||||
{name:'河南', value:9693},
|
||||
{name:'浙江', value:62310},
|
||||
{name:'山东', value:39231},
|
||||
{name:'江苏', value:35911},
|
||||
{name:'广东', value:55891}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
,elemDataView = $('#LAY-index-pagethree-home').children('div')
|
||||
,renderDataView = function(index){
|
||||
echartsApp[index] = echarts.init(elemDataView[index], layui.echartsTheme);
|
||||
echartsApp[index].setOption(options[index]);
|
||||
window.onresize = echartsApp[index].resize;
|
||||
};
|
||||
//没找到DOM,终止执行
|
||||
if(!elemDataView[0]) return;
|
||||
|
||||
renderDataView(0);
|
||||
});
|
||||
|
||||
//最新订单
|
||||
layui.use('table', function(){
|
||||
var $ = layui.$
|
||||
,table = layui.table;
|
||||
|
||||
//今日热搜
|
||||
table.render({
|
||||
elem: '#LAY-index-topSearch'
|
||||
,url: layui.setter.paths.base + 'json/console/top-search.js' //模拟接口
|
||||
,page: true
|
||||
,cols: [[
|
||||
{type: 'numbers', fixed: 'left'}
|
||||
,{field: 'keywords', title: '关键词', minWidth: 300, templet: '<div><a href="https://www.baidu.com/s?wd={{ d.keywords }}" target="_blank" class="layui-table-link">{{ d.keywords }}</div>'}
|
||||
,{field: 'frequency', title: '搜索次数', minWidth: 120, sort: true}
|
||||
,{field: 'userNums', title: '用户数', sort: true}
|
||||
]]
|
||||
,skin: 'line'
|
||||
});
|
||||
|
||||
//今日热贴
|
||||
table.render({
|
||||
elem: '#LAY-index-topCard'
|
||||
,url: layui.setter.paths.base + 'json/console/top-card.js' //模拟接口
|
||||
,page: true
|
||||
,cellMinWidth: 120
|
||||
,cols: [[
|
||||
{type: 'numbers', fixed: 'left'}
|
||||
,{field: 'title', title: '标题', minWidth: 300, templet: '<div><a href="{{ d.href }}" target="_blank" class="layui-table-link">{{ d.title }}</div>'}
|
||||
,{field: 'username', title: '发帖者'}
|
||||
,{field: 'channel', title: '类别'}
|
||||
,{field: 'crt', title: '点击率', sort: true}
|
||||
]]
|
||||
,skin: 'line'
|
||||
});
|
||||
|
||||
//项目进展
|
||||
table.render({
|
||||
elem: '#LAY-home-homepage-console'
|
||||
,url: layui.setter.paths.base + 'json/console/prograss.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'prograss', title: '任务'}
|
||||
,{field: 'time', title: '所需时间'}
|
||||
,{field: 'complete', title: '完成情况'
|
||||
,templet: function(d){
|
||||
if(d.complete == '已完成'){
|
||||
return '<del style="color: #16b777;">'+ d.complete +'</del>'
|
||||
}else if(d.complete == '进行中'){
|
||||
return '<span style="color: #FFB800;">'+ d.complete +'</span>'
|
||||
}else{
|
||||
return '<span style="color: #FF5722;">'+ d.complete +'</span>'
|
||||
}
|
||||
}
|
||||
}
|
||||
]]
|
||||
,skin: 'line'
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
exports('console', {})
|
||||
});
|
||||
189
iframe/src/res/modules/contlist.js
Normal file
@@ -0,0 +1,189 @@
|
||||
/**
|
||||
* 内容系统 demo
|
||||
*/
|
||||
|
||||
|
||||
layui.define(['table', 'form'], function(exports){
|
||||
var $ = layui.$
|
||||
,table = layui.table
|
||||
,form = layui.form;
|
||||
|
||||
//文章管理
|
||||
table.render({
|
||||
elem: '#LAY-app-content-list'
|
||||
,url: layui.setter.paths.base + 'json/content/list.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 100, title: '文章ID', sort: true}
|
||||
,{field: 'label', title: '文章标签', minWidth: 100}
|
||||
,{field: 'title', title: '文章标题'}
|
||||
,{field: 'author', title: '作者'}
|
||||
,{field: 'uploadtime', title: '上传时间', sort: true}
|
||||
,{field: 'status', title: '发布状态', templet: '#buttonTpl', minWidth: 80, align: 'center'}
|
||||
,{title: '操作', minWidth: 150, align: 'center', fixed: 'right', toolbar: '#table-content-list'}
|
||||
]]
|
||||
,page: true
|
||||
,limit: 10
|
||||
,limits: [10, 15, 20, 25, 30]
|
||||
,text: '对不起,加载出现异常!'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-app-content-list)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定删除此文章?', function(index){
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
} else if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑文章'
|
||||
,content: '../../../views/app/content/listform.html?id='+ data.id
|
||||
,maxmin: true
|
||||
,area: ['550px', '550px']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find("#layuiadmin-app-form-edit");
|
||||
|
||||
//事件-提交
|
||||
iframeWindow.layui.form.on('submit(layuiadmin-app-form-edit)', function(data){
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
//$.ajax({});
|
||||
obj.update({
|
||||
label: field.label
|
||||
,title: field.title
|
||||
,author: field.author
|
||||
,status: field.status
|
||||
}); //数据更新
|
||||
|
||||
form.render();
|
||||
layer.close(index); //关闭弹层
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//分类管理
|
||||
table.render({
|
||||
elem: '#LAY-app-content-tags'
|
||||
,url: layui.setter.paths.base + 'json/content/tags.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'numbers', fixed: 'left'}
|
||||
,{field: 'id', width: 100, title: 'ID', sort: true}
|
||||
,{field: 'tags', title: '分类名', minWidth: 100}
|
||||
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#layuiadmin-app-cont-tagsbar'}
|
||||
]]
|
||||
,text: '对不起,加载出现异常!'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-app-content-tags)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定删除此分类?', function(index){
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
} else if(obj.event === 'edit'){
|
||||
var tr = $(obj.tr);
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑分类'
|
||||
,content: '../../../views/app/content/tagsform.html?id='+ data.id
|
||||
,area: ['450px', '200px']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
//获取iframe元素的值
|
||||
var othis = layero.find('iframe').contents().find("#layuiadmin-app-form-tags")
|
||||
,tags = othis.find('input[name="tags"]').val();
|
||||
|
||||
if(!tags.replace(/\s/g, '')) return;
|
||||
|
||||
obj.update({
|
||||
tags: tags
|
||||
});
|
||||
layer.close(index);
|
||||
}
|
||||
,success: function(layero, index){
|
||||
//给iframe元素赋值
|
||||
var othis = layero.find('iframe').contents().find("#layuiadmin-app-form-tags").click();
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']];
|
||||
|
||||
iframeWin.layui.use('form', function(form){
|
||||
form.val('layuiadmin-form-tags', {
|
||||
tags: data.tags
|
||||
})
|
||||
});
|
||||
//othis.find('input[name="tags"]').val(data.tags);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//评论管理
|
||||
table.render({
|
||||
elem: '#LAY-app-content-comm'
|
||||
,url: layui.setter.paths.base + 'json/content/comment.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 100, title: 'ID', sort: true}
|
||||
,{field: 'reviewers', title: '评论者', minWidth: 100}
|
||||
,{field: 'content', title: '评论内容', minWidth: 100}
|
||||
,{field: 'commtime', title: '评论时间', minWidth: 100, sort: true}
|
||||
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-content-com'}
|
||||
]]
|
||||
,page: true
|
||||
,limit: 10
|
||||
,limits: [10, 15, 20, 25, 30]
|
||||
,text: '对不起,加载出现异常!'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-app-content-comm)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定删除此条评论?', function(index){
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
} else if(obj.event === 'edit') {
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑评论'
|
||||
,content: '../../../views/app/content/contform.html'
|
||||
,area: ['450px', '300px']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'layuiadmin-app-comm-submit'
|
||||
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
||||
|
||||
//事件-提交
|
||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
//$.ajax({});
|
||||
table.reload('LAY-app-content-comm'); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
,success: function(layero, index){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
exports('contlist', {})
|
||||
});
|
||||
39
iframe/src/res/modules/echarts.js
Normal file
262
iframe/src/res/modules/echartsTheme.js
Normal file
@@ -0,0 +1,262 @@
|
||||
/**
|
||||
* Set echarts theme
|
||||
*/
|
||||
|
||||
|
||||
layui.define(function(exports) {
|
||||
exports('echartsTheme', {
|
||||
// 默认色板
|
||||
color: [
|
||||
'#16baaa','#1E9FFF','#16b777','#FFB980','#D87A80',
|
||||
'#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',
|
||||
'#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',
|
||||
'#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'
|
||||
],
|
||||
|
||||
// 图表标题
|
||||
title: {
|
||||
textStyle: {
|
||||
fontWeight: 'normal',
|
||||
color: '#666' // 主标题文字颜色
|
||||
}
|
||||
},
|
||||
|
||||
// 值域
|
||||
dataRange: {
|
||||
itemWidth: 15,
|
||||
color: ['#16baaa','#e0ffff']
|
||||
},
|
||||
|
||||
// 工具箱
|
||||
toolbox: {
|
||||
color : ['#1e90ff', '#1e90ff', '#1e90ff', '#1e90ff'],
|
||||
effectiveColor : '#ff4500'
|
||||
},
|
||||
|
||||
// 提示框
|
||||
tooltip: {
|
||||
backgroundColor: 'rgba(50,50,50,0.5)', // 提示背景颜色,默认为透明度为0.7的黑色
|
||||
axisPointer : { // 坐标轴指示器,坐标轴触发有效
|
||||
type : 'line', // 默认为直线,可选为:'line' | 'shadow'
|
||||
lineStyle : { // 直线指示器样式设置
|
||||
color: '#16baaa'
|
||||
},
|
||||
crossStyle: {
|
||||
color: '#008acd'
|
||||
},
|
||||
shadowStyle : { // 阴影指示器样式设置
|
||||
color: 'rgba(200,200,200,0.2)'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 区域缩放控制器
|
||||
dataZoom: {
|
||||
dataBackgroundColor: '#efefff', // 数据背景颜色
|
||||
fillerColor: 'rgba(182,162,222,0.2)', // 填充颜色
|
||||
handleColor: '#008acd' // 手柄颜色
|
||||
},
|
||||
|
||||
// 网格
|
||||
grid: {
|
||||
borderColor: '#eee'
|
||||
},
|
||||
|
||||
// 类目轴 - X轴
|
||||
categoryAxis: {
|
||||
axisLine: { // 坐标轴线
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: '#16baaa'
|
||||
}
|
||||
},
|
||||
axisTick: { //小标记
|
||||
show: false
|
||||
},
|
||||
splitLine: { // 分隔线
|
||||
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
|
||||
color: ['#eee']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 数值型坐标轴默认参数 - Y轴
|
||||
valueAxis: {
|
||||
axisLine: { // 坐标轴线
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: '#16baaa'
|
||||
}
|
||||
},
|
||||
splitArea : {
|
||||
show : true,
|
||||
areaStyle : {
|
||||
color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
|
||||
}
|
||||
},
|
||||
splitLine: { // 分隔线
|
||||
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
|
||||
color: ['#eee']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
polar : {
|
||||
axisLine: { // 坐标轴线
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: '#ddd'
|
||||
}
|
||||
},
|
||||
splitArea : {
|
||||
show : true,
|
||||
areaStyle : {
|
||||
color: ['rgba(250,250,250,0.2)','rgba(200,200,200,0.2)']
|
||||
}
|
||||
},
|
||||
splitLine : {
|
||||
lineStyle : {
|
||||
color : '#ddd'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
timeline : {
|
||||
lineStyle : {
|
||||
color : '#16baaa'
|
||||
},
|
||||
controlStyle : {
|
||||
normal : { color : '#16baaa'},
|
||||
emphasis : { color : '#16baaa'}
|
||||
},
|
||||
symbol : 'emptyCircle',
|
||||
symbolSize : 3
|
||||
},
|
||||
|
||||
// 柱形图默认参数
|
||||
bar: {
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 2
|
||||
},
|
||||
emphasis: {
|
||||
barBorderRadius: 2
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 折线图默认参数
|
||||
line: {
|
||||
smooth : true,
|
||||
symbol: 'emptyCircle', // 拐点图形类型
|
||||
symbolSize: 3 // 拐点图形大小
|
||||
},
|
||||
|
||||
// K线图默认参数
|
||||
k: {
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#d87a80', // 阳线填充颜色
|
||||
color0: '#2ec7c9', // 阴线填充颜色
|
||||
lineStyle: {
|
||||
color: '#d87a80', // 阳线边框颜色
|
||||
color0: '#2ec7c9' // 阴线边框颜色
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 散点图默认参数
|
||||
scatter: {
|
||||
symbol: 'circle', // 图形类型
|
||||
symbolSize: 4 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
|
||||
},
|
||||
|
||||
// 雷达图默认参数
|
||||
radar : {
|
||||
symbol: 'emptyCircle', // 图形类型
|
||||
symbolSize:3
|
||||
//symbol: null, // 拐点图形类型
|
||||
//symbolRotate : null, // 图形旋转控制
|
||||
},
|
||||
|
||||
map: {
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
color: '#ddd'
|
||||
},
|
||||
label: {
|
||||
textStyle: {
|
||||
color: '#d87a80'
|
||||
}
|
||||
}
|
||||
},
|
||||
emphasis: { // 也是选中样式
|
||||
areaStyle: {
|
||||
color: '#fe994e'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
force : {
|
||||
itemStyle: {
|
||||
normal: {
|
||||
linkStyle : {
|
||||
color : '#1e90ff'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
chord : {
|
||||
itemStyle : {
|
||||
normal : {
|
||||
borderWidth: 1,
|
||||
borderColor: 'rgba(128, 128, 128, 0.5)',
|
||||
chordStyle : {
|
||||
lineStyle : {
|
||||
color : 'rgba(128, 128, 128, 0.5)'
|
||||
}
|
||||
}
|
||||
},
|
||||
emphasis : {
|
||||
borderWidth: 1,
|
||||
borderColor: 'rgba(128, 128, 128, 0.5)',
|
||||
chordStyle : {
|
||||
lineStyle : {
|
||||
color : 'rgba(128, 128, 128, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
gauge : {
|
||||
axisLine: { // 坐标轴线
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']],
|
||||
width: 10
|
||||
}
|
||||
},
|
||||
axisTick: { // 坐标轴小标记
|
||||
splitNumber: 10, // 每份split细分多少段
|
||||
length :15, // 属性length控制线长
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: 'auto'
|
||||
}
|
||||
},
|
||||
splitLine: { // 分隔线
|
||||
length :22, // 属性length控制线长
|
||||
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
|
||||
color: 'auto'
|
||||
}
|
||||
},
|
||||
pointer : {
|
||||
width : 5
|
||||
}
|
||||
},
|
||||
|
||||
textStyle: {
|
||||
fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
|
||||
}
|
||||
});
|
||||
});
|
||||
130
iframe/src/res/modules/forum.js
Normal file
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
* forum demo
|
||||
*/
|
||||
|
||||
layui.define(['table', 'form'], function(exports){
|
||||
var $ = layui.$
|
||||
,table = layui.table
|
||||
,form = layui.form;
|
||||
|
||||
//帖子管理
|
||||
table.render({
|
||||
elem: '#LAY-app-forum-list'
|
||||
,url: layui.setter.paths.base + 'json/forum/list.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 100, title: 'ID', sort: true}
|
||||
,{field: 'poster', title: '发帖人'}
|
||||
,{field: 'avatar', title: '头像', width: 100, templet: '#imgTpl'}
|
||||
,{field: 'content', title: '发帖内容'}
|
||||
,{field: 'posttime', title: '发帖时间', sort: true}
|
||||
,{field: 'top', title: '置顶', templet: '#buttonTpl', minWidth: 80, align: 'center'}
|
||||
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-forum-list'}
|
||||
]]
|
||||
,page: true
|
||||
,limit: 10
|
||||
,limits: [10, 15, 20, 25, 30]
|
||||
,text: '加载出现异常'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-app-forum-list)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定删除此条帖子?', function(index){
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
} else if(obj.event === 'edit'){
|
||||
var tr = $(obj.tr);
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑帖子'
|
||||
,content: '../../../views/app/forum/listform.html'
|
||||
,area: ['550px', '400px']
|
||||
,btn: ['确定', '取消']
|
||||
,resize: false
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'LAY-app-forum-submit'
|
||||
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
||||
|
||||
//事件-提交
|
||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
//$.ajax({});
|
||||
table.reload('LAY-app-forum-list'); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
,success: function(layero, index){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//回帖管理
|
||||
table.render({
|
||||
elem: '#LAY-app-forumreply-list'
|
||||
,url: layui.setter.paths.base + 'json/forum/replys.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 100, title: 'ID', sort: true}
|
||||
,{field: 'replyer', title: '回帖人'}
|
||||
,{field: 'cardid', title: '回帖ID', sort: true}
|
||||
,{field: 'avatar', title: '头像', width: 100, templet: '#imgTpl'}
|
||||
,{field: 'content', title: '回帖内容', width: 200}
|
||||
,{field: 'replytime', title: '回帖时间', sort: true}
|
||||
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-forum-replys'}
|
||||
]]
|
||||
,page: true
|
||||
,limit: 10
|
||||
,limits: [10, 15, 20, 25, 30]
|
||||
,text: '对不起,加载出现异常!'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-app-forumreply-list)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定删除此条评论?', function(index){
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
} else if(obj.event === 'edit'){
|
||||
var tr = $(obj.tr);
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑评论'
|
||||
,content: '../../../views/app/forum/replysform.html'
|
||||
,area: ['550px', '350px']
|
||||
,btn: ['确定', '取消']
|
||||
,resize: false
|
||||
,yes: function(index, layero){
|
||||
//获取iframe元素的值
|
||||
var othis = layero.find('iframe').contents().find("#layuiadmin-form-replys");
|
||||
var content = othis.find('textarea[name="content"]').val();
|
||||
|
||||
//数据更新
|
||||
obj.update({
|
||||
content: content
|
||||
});
|
||||
layer.close(index);
|
||||
}
|
||||
,success: function(layero, index){
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
exports('forum', {})
|
||||
});
|
||||
1
iframe/src/res/modules/layim/layim.js
Normal file
44
iframe/src/res/modules/layim/res/html/find.html
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>发现</title>
|
||||
|
||||
<link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="margin: 15px;">
|
||||
<blockquote class="layui-elem-quote">
|
||||
通过 find 参数指向的自定义页面
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
layimPath: '../../' //配置 layim.js 所在目录
|
||||
,layimResPath: '../' //layim 资源文件所在目录
|
||||
}).extend({
|
||||
layim: layui.cache.layimPath + 'layim' //配置 layim 组件所在的路径
|
||||
}).use(['layim', 'laypage'], function(){
|
||||
var layim = layui.layim
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,$ = layui.jquery
|
||||
,laypage = layui.laypage;
|
||||
|
||||
//一些添加好友请求之类的交互参见文档
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
72
iframe/src/res/modules/layim/res/html/getmsg.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"code": 0,
|
||||
"pages": 1,
|
||||
"data": [
|
||||
{
|
||||
"id": 76,
|
||||
"content": "申请添加你为好友",
|
||||
"uid": 168,
|
||||
"from": 166488,
|
||||
"from_group": 0,
|
||||
"type": 1,
|
||||
"remark": "test1",
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "刚刚",
|
||||
"user": {
|
||||
"id": 166488,
|
||||
"avatar": "http://q.qlogo.cn/qqapp/101235792/B704597964F9BD0DB648292D1B09F7E8/100",
|
||||
"username": "测试A",
|
||||
"sign": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"content": "申请添加你为好友",
|
||||
"uid": 168,
|
||||
"from": 347592,
|
||||
"from_group": 0,
|
||||
"type": 1,
|
||||
"remark": "test2",
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "刚刚",
|
||||
"user": {
|
||||
"id": 347592,
|
||||
"avatar": "http://q.qlogo.cn/qqapp/101235792/B78751375E0531675B1272AD994BA875/100",
|
||||
"username": "测试B",
|
||||
"sign": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"content": "测试C 拒绝了你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"content": "测试D 已经同意你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
220
iframe/src/res/modules/layim/res/html/msgbox.html
Normal file
@@ -0,0 +1,220 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>消息盒子</title>
|
||||
|
||||
<link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
|
||||
<style>
|
||||
.layim-msgbox{margin: 15px;}
|
||||
.layim-msgbox li{position: relative; margin-bottom: 10px; padding: 0 130px 10px 60px; padding-bottom: 10px; line-height: 22px; border-bottom: 1px dotted #e2e2e2;}
|
||||
.layim-msgbox .layim-msgbox-tips{margin: 0; padding: 10px 0; border: none; text-align: center; color: #999;}
|
||||
.layim-msgbox .layim-msgbox-system{padding: 0 10px 10px 10px;}
|
||||
.layim-msgbox li p span{padding-left: 5px; color: #999;}
|
||||
.layim-msgbox li p em{font-style: normal; color: #FF5722;}
|
||||
|
||||
.layim-msgbox-avatar{position: absolute; left: 0; top: 0; width: 50px; height: 50px;}
|
||||
.layim-msgbox-user{padding-top: 5px;}
|
||||
.layim-msgbox-content{margin-top: 3px;}
|
||||
.layim-msgbox .layui-btn-small{padding: 0 15px; margin-left: 5px;}
|
||||
.layim-msgbox-btn{position: absolute; right: 0; top: 12px; color: #999;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<ul class="layim-msgbox" id="LAY_view"></ul>
|
||||
|
||||
<div style="margin: 0 15px;">
|
||||
<blockquote class="layui-elem-quote">
|
||||
注意:该页面为 msgbox 参数指向的自定义页面。
|
||||
<br> 此页为消息盒子的模拟数据,实际使用时请进行相应修改。
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
<textarea title="消息模版" id="LAY_tpl" style="display:none;">
|
||||
{{# layui.each(d.data, function(index, item){
|
||||
if(item.from){ }}
|
||||
<li data-uid="{{ item.from }}" data-fromGroup="{{ item.from_group }}">
|
||||
<a href="/u/{{ item.from }}/" target="_blank">
|
||||
<img src="{{ item.user.avatar }}" class="layui-circle layim-msgbox-avatar">
|
||||
</a>
|
||||
<p class="layim-msgbox-user">
|
||||
<a href="/u/{{ item.from }}/" target="_blank">{{ item.user.username||'' }}</a>
|
||||
<span>{{ item.time }}</span>
|
||||
</p>
|
||||
<p class="layim-msgbox-content">
|
||||
{{ item.content }}
|
||||
<span>{{ item.remark ? '附言: '+item.remark : '' }}</span>
|
||||
</p>
|
||||
<p class="layim-msgbox-btn">
|
||||
<button class="layui-btn layui-btn-small" data-type="agree">同意</button>
|
||||
<button class="layui-btn layui-btn-small layui-btn-primary" data-type="refuse">拒绝</button>
|
||||
</p>
|
||||
</li>
|
||||
{{# } else { }}
|
||||
<li class="layim-msgbox-system">
|
||||
<p><em>系统:</em>{{ item.content }}<span>{{ item.time }}</span></p>
|
||||
</li>
|
||||
{{# }
|
||||
}); }}
|
||||
</textarea>
|
||||
|
||||
<!--
|
||||
上述模版采用了 laytpl 语法
|
||||
-->
|
||||
|
||||
|
||||
<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
layimPath: '../../' //配置 layim.js 所在目录
|
||||
,layimResPath: '../' //layim 资源文件所在目录
|
||||
}).extend({
|
||||
layim: layui.cache.layimPath + 'layim' //配置 layim 组件所在的路径
|
||||
}).use(['layim', 'flow'], function(){
|
||||
var layim = layui.layim
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,$ = layui.jquery
|
||||
,flow = layui.flow;
|
||||
|
||||
var cache = {}; //用于临时记录请求到的数据
|
||||
|
||||
//请求消息
|
||||
var renderMsg = function(page, callback){
|
||||
|
||||
//实际部署时,请将下述 getmsg.json 改为你的接口地址
|
||||
|
||||
$.get('getmsg.json', {
|
||||
page: page || 1
|
||||
}, function(res){
|
||||
if(res.code != 0){
|
||||
return layer.msg(res.msg);
|
||||
}
|
||||
|
||||
//记录来源用户信息
|
||||
layui.each(res.data, function(index, item){
|
||||
cache[item.from] = item.user;
|
||||
});
|
||||
|
||||
callback && callback(res.data, res.pages);
|
||||
});
|
||||
};
|
||||
|
||||
//消息信息流
|
||||
flow.load({
|
||||
elem: '#LAY_view' //流加载容器
|
||||
,isAuto: false
|
||||
,end: '<li class="layim-msgbox-tips">暂无更多新消息</li>'
|
||||
,done: function(page, next){ //加载下一页
|
||||
renderMsg(page, function(data, pages){
|
||||
var html = laytpl(LAY_tpl.value).render({
|
||||
data: data
|
||||
,page: page
|
||||
});
|
||||
next(html, page < pages);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//打开页面即把消息标记为已读
|
||||
/*
|
||||
$.post('/message/read', {
|
||||
type: 1
|
||||
});
|
||||
*/
|
||||
|
||||
//操作
|
||||
var active = {
|
||||
//同意
|
||||
agree: function(othis){
|
||||
var li = othis.parents('li')
|
||||
,uid = li.data('uid')
|
||||
,from_group = li.data('fromGroup')
|
||||
,user = cache[uid];
|
||||
|
||||
//选择分组
|
||||
parent.layui.layim.setFriendGroup({
|
||||
type: 'friend'
|
||||
,username: user.username
|
||||
,avatar: user.avatar
|
||||
,group: parent.layui.layim.cache().friend //获取好友分组数据
|
||||
,submit: function(group, index){
|
||||
|
||||
//将好友追加到主面板
|
||||
parent.layui.layim.addList({
|
||||
type: 'friend'
|
||||
,avatar: user.avatar //好友头像
|
||||
,username: user.username //好友昵称
|
||||
,groupid: group //所在的分组id
|
||||
,id: uid //好友ID
|
||||
,sign: user.sign //好友签名
|
||||
});
|
||||
parent.layer.close(index);
|
||||
othis.parent().html('已同意');
|
||||
|
||||
|
||||
//实际部署时,请开启下述注释,并改成你的接口地址
|
||||
/*
|
||||
$.post('/im/agreeFriend', {
|
||||
uid: uid //对方用户ID
|
||||
,from_group: from_group //对方设定的好友分组
|
||||
,group: group //我设定的好友分组
|
||||
}, function(res){
|
||||
if(res.code != 0){
|
||||
return layer.msg(res.msg);
|
||||
}
|
||||
|
||||
//将好友追加到主面板
|
||||
parent.layui.layim.addList({
|
||||
type: 'friend'
|
||||
,avatar: user.avatar //好友头像
|
||||
,username: user.username //好友昵称
|
||||
,groupid: group //所在的分组id
|
||||
,id: uid //好友ID
|
||||
,sign: user.sign //好友签名
|
||||
});
|
||||
parent.layer.close(index);
|
||||
othis.parent().html('已同意');
|
||||
});
|
||||
*/
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//拒绝
|
||||
,refuse: function(othis){
|
||||
var li = othis.parents('li')
|
||||
,uid = li.data('uid');
|
||||
|
||||
layer.confirm('确定拒绝吗?', function(index){
|
||||
layer.close(index);
|
||||
othis.parent().html('<em>已拒绝</em>');
|
||||
|
||||
/*
|
||||
$.post('/im/refuseFriend', {
|
||||
uid: uid //对方用户ID
|
||||
}, function(res){
|
||||
if(res.code != 0){
|
||||
return layer.msg(res.msg);
|
||||
}
|
||||
layer.close(index);
|
||||
othis.parent().html('<em>已拒绝</em>');
|
||||
});
|
||||
*/
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$('body').on('click', '.layui-btn', function(){
|
||||
var othis = $(this), type = othis.data('type');
|
||||
active[type] ? active[type].call(this, othis) : '';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
iframe/src/res/modules/layim/res/images/default.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
1
iframe/src/res/modules/layim/res/layim.css
Normal file
BIN
iframe/src/res/modules/layim/res/skin/1.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
iframe/src/res/modules/layim/res/skin/2.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
iframe/src/res/modules/layim/res/skin/3.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
iframe/src/res/modules/layim/res/skin/4.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
iframe/src/res/modules/layim/res/skin/5.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
iframe/src/res/modules/layim/res/voice/default.mp3
Normal file
127
iframe/src/res/modules/message.js
Normal file
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* message
|
||||
*/
|
||||
|
||||
|
||||
layui.define(['admin', 'table', 'util'], function(exports){
|
||||
var $ = layui.$
|
||||
,admin = layui.admin
|
||||
,table = layui.table
|
||||
,element = layui.element;
|
||||
|
||||
var DISABLED = 'layui-btn-disabled'
|
||||
|
||||
//区分各选项卡中的表格
|
||||
,tabs = {
|
||||
all: {
|
||||
text: '全部消息'
|
||||
,id: 'LAY-app-message-all'
|
||||
}
|
||||
,notice: {
|
||||
text: '通知'
|
||||
,id: 'LAY-app-message-notice'
|
||||
}
|
||||
,direct: {
|
||||
text: '私信'
|
||||
,id: 'LAY-app-message-direct'
|
||||
}
|
||||
};
|
||||
|
||||
//标题内容模板
|
||||
var tplTitle = function(d){
|
||||
return '<a href="detail.html?id='+ d.id +'">'+ d.title;
|
||||
};
|
||||
|
||||
//全部消息
|
||||
table.render({
|
||||
elem: '#LAY-app-message-all'
|
||||
,url: layui.setter.paths.base + 'json/message/all.js' //模拟接口
|
||||
,page: true
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'title', title: '标题内容', minWidth: 300, templet: tplTitle}
|
||||
,{field: 'time', title: '时间', width: 170, templet: '<div>{{ layui.util.timeAgo(d.time) }}</div>'}
|
||||
]]
|
||||
,skin: 'line'
|
||||
});
|
||||
|
||||
//通知
|
||||
table.render({
|
||||
elem: '#LAY-app-message-notice'
|
||||
,url: layui.setter.paths.base + 'json/message/notice.js' //模拟接口
|
||||
,page: true
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'title', title: '标题内容', minWidth: 300, templet: tplTitle}
|
||||
,{field: 'time', title: '时间', width: 170, templet: '<div>{{ layui.util.timeAgo(d.time) }}</div>'}
|
||||
]]
|
||||
,skin: 'line'
|
||||
});
|
||||
|
||||
//私信
|
||||
table.render({
|
||||
elem: '#LAY-app-message-direct'
|
||||
,url: layui.setter.paths.base + 'json/message/direct.js' //模拟接口
|
||||
,page: true
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'title', title: '标题内容', minWidth: 300, templet: tplTitle}
|
||||
,{field: 'time', title: '时间', width: 170, templet: '<div>{{ layui.util.timeAgo(d.time) }}</div>'}
|
||||
]]
|
||||
,skin: 'line'
|
||||
});
|
||||
|
||||
|
||||
//事件处理
|
||||
var events = {
|
||||
del: function(othis, type){
|
||||
var thisTabs = tabs[type]
|
||||
,checkStatus = table.checkStatus(thisTabs.id)
|
||||
,data = checkStatus.data; //获得选中的数据
|
||||
if(data.length === 0) return layer.msg('未选中行');
|
||||
|
||||
layer.confirm('确定删除选中的数据吗?', function(){
|
||||
/*
|
||||
admin.req('url', {}, function(){ //请求接口
|
||||
//do somethin
|
||||
});
|
||||
*/
|
||||
//此处只是演示,实际应用需把下述代码放入上述Ajax回调中
|
||||
layer.msg('删除成功', {
|
||||
icon: 1
|
||||
});
|
||||
table.reload(thisTabs.id); //刷新表格
|
||||
});
|
||||
}
|
||||
,ready: function(othis, type){
|
||||
var thisTabs = tabs[type]
|
||||
,checkStatus = table.checkStatus(thisTabs.id)
|
||||
,data = checkStatus.data; //获得选中的数据
|
||||
if(data.length === 0) return layer.msg('未选中行');
|
||||
|
||||
//此处只是演示
|
||||
layer.msg('标记已读成功', {
|
||||
icon: 1
|
||||
});
|
||||
table.reload(thisTabs.id); //刷新表格
|
||||
}
|
||||
,readyAll: function(othis, type){
|
||||
var thisTabs = tabs[type];
|
||||
|
||||
//do somethin
|
||||
|
||||
layer.msg(thisTabs.text + ':全部已读', {
|
||||
icon: 1
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$('.LAY-app-message-btns .layui-btn').on('click', function(){
|
||||
var othis = $(this)
|
||||
,thisEvent = othis.data('events')
|
||||
,type = othis.data('type');
|
||||
events[thisEvent] && events[thisEvent].call(this, othis, type);
|
||||
});
|
||||
|
||||
exports('message', {});
|
||||
});
|
||||
294
iframe/src/res/modules/sample.js
Normal file
@@ -0,0 +1,294 @@
|
||||
/**
|
||||
* console - homepage demo
|
||||
*/
|
||||
|
||||
|
||||
layui.define(function(exports){
|
||||
var admin = layui.admin;
|
||||
|
||||
//区块轮播切换
|
||||
layui.use(['admin', 'carousel'], function(){
|
||||
var $ = layui.$
|
||||
,admin = layui.admin
|
||||
,carousel = layui.carousel
|
||||
,element = layui.element
|
||||
,device = layui.device();
|
||||
|
||||
//轮播切换
|
||||
$('.layadmin-carousel').each(function(){
|
||||
var othis = $(this);
|
||||
carousel.render({
|
||||
elem: this
|
||||
,width: '100%'
|
||||
,arrow: 'none'
|
||||
,interval: othis.data('interval')
|
||||
,autoplay: othis.data('autoplay') === true
|
||||
,trigger: (device.ios || device.android) ? 'click' : 'hover'
|
||||
,anim: othis.data('anim')
|
||||
});
|
||||
});
|
||||
|
||||
element.render('progress');
|
||||
|
||||
});
|
||||
|
||||
//八卦新闻
|
||||
layui.use(['carousel', 'echarts'], function(){
|
||||
var $ = layui.$
|
||||
,carousel = layui.carousel
|
||||
,echarts = layui.echarts;
|
||||
|
||||
var echartsApp = [], options = [
|
||||
{
|
||||
title : {
|
||||
subtext: '完全实况球员数据',
|
||||
textStyle: {
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
x : 'left',
|
||||
data:['罗纳尔多','舍普琴科']
|
||||
},
|
||||
polar : [
|
||||
{
|
||||
indicator : [
|
||||
{text : '进攻', max : 100},
|
||||
{text : '防守', max : 100},
|
||||
{text : '体能', max : 100},
|
||||
{text : '速度', max : 100},
|
||||
{text : '力量', max : 100},
|
||||
{text : '技巧', max : 100}
|
||||
],
|
||||
radius : 130
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
type: 'radar',
|
||||
center : ['50%', '50%'],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: 'default'
|
||||
}
|
||||
}
|
||||
},
|
||||
data:[
|
||||
{value : [97, 42, 88, 94, 90, 86], name : '舍普琴科'},
|
||||
{value : [97, 32, 74, 95, 88, 92], name : '罗纳尔多'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
,elemDataView = $('#LAY-index-pageone').children('div')
|
||||
,renderDataView = function(index){
|
||||
echartsApp[index] = echarts.init(elemDataView[index], layui.echartsTheme);
|
||||
echartsApp[index].setOption(options[index]);
|
||||
window.onresize = echartsApp[index].resize;
|
||||
};
|
||||
//没找到DOM,终止执行
|
||||
if(!elemDataView[0]) return;
|
||||
|
||||
renderDataView(0);
|
||||
});
|
||||
|
||||
//访问量
|
||||
layui.use(['carousel', 'echarts'], function(){
|
||||
var $ = layui.$
|
||||
,carousel = layui.carousel
|
||||
,echarts = layui.echarts;
|
||||
|
||||
var echartsApp = [], options = [
|
||||
{
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
calculable : true,
|
||||
legend: {
|
||||
data:['访问量','下载量','平均访问量']
|
||||
},
|
||||
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : '访问量',
|
||||
axisLabel : {
|
||||
formatter: '{value} 万'
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'value',
|
||||
name : '下载量',
|
||||
axisLabel : {
|
||||
formatter: '{value} 万'
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'访问量',
|
||||
type:'line',
|
||||
data:[900, 850, 950, 1000, 1100, 1050, 1000, 1150, 1250, 1370, 1250, 1100]
|
||||
},
|
||||
{
|
||||
name:'下载量',
|
||||
type:'line',
|
||||
yAxisIndex: 1,
|
||||
data:[850, 850, 800, 950, 1000, 950, 950, 1150, 1100, 1240, 1000, 950]
|
||||
},
|
||||
{
|
||||
name:'平均访问量',
|
||||
type:'line',
|
||||
data:[870, 850, 850, 950, 1050, 1000, 980, 1150, 1000, 1300, 1150, 1000]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
,elemDataView = $('#LAY-index-pagetwo').children('div')
|
||||
,renderDataView = function(index){
|
||||
echartsApp[index] = echarts.init(elemDataView[index], layui.echartsTheme);
|
||||
echartsApp[index].setOption(options[index]);
|
||||
window.onresize = echartsApp[index].resize;
|
||||
};
|
||||
//没找到DOM,终止执行
|
||||
if(!elemDataView[0]) return;
|
||||
renderDataView(0);
|
||||
|
||||
});
|
||||
|
||||
//地图
|
||||
layui.use(['carousel', 'echarts'], function(){
|
||||
var $ = layui.$
|
||||
,carousel = layui.carousel
|
||||
,echarts = layui.echarts;
|
||||
|
||||
var echartsApp = [], options = [
|
||||
{
|
||||
title : {
|
||||
text: '访客地区分布',
|
||||
subtext: '不完全统计'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item'
|
||||
},
|
||||
dataRange: {
|
||||
orient: 'horizontal',
|
||||
min: 0,
|
||||
max: 60000,
|
||||
text:['高','低'],
|
||||
splitNumber:0
|
||||
},
|
||||
series : [
|
||||
{
|
||||
name: '访客地区分布',
|
||||
type: 'map',
|
||||
mapType: 'china',
|
||||
selectedMode : 'multiple',
|
||||
itemStyle:{
|
||||
normal:{label:{show:true}},
|
||||
emphasis:{label:{show:true}}
|
||||
},
|
||||
data:[
|
||||
{name:'西藏', value:60},
|
||||
{name:'青海', value:167},
|
||||
{name:'宁夏', value:210},
|
||||
{name:'海南', value:252},
|
||||
{name:'甘肃', value:502},
|
||||
{name:'贵州', value:570},
|
||||
{name:'新疆', value:661},
|
||||
{name:'云南', value:8890},
|
||||
{name:'重庆', value:10010},
|
||||
{name:'吉林', value:5056},
|
||||
{name:'山西', value:2123},
|
||||
{name:'天津', value:9130},
|
||||
{name:'江西', value:10170},
|
||||
{name:'广西', value:6172},
|
||||
{name:'陕西', value:9251},
|
||||
{name:'黑龙江', value:5125},
|
||||
{name:'内蒙古', value:1435},
|
||||
{name:'安徽', value:9530},
|
||||
{name:'北京', value:51919},
|
||||
{name:'福建', value:3756},
|
||||
{name:'上海', value:59190},
|
||||
{name:'湖北', value:37109},
|
||||
{name:'湖南', value:8966},
|
||||
{name:'四川', value:31020},
|
||||
{name:'辽宁', value:7222},
|
||||
{name:'河北', value:3451},
|
||||
{name:'河南', value:9693},
|
||||
{name:'浙江', value:62310},
|
||||
{name:'山东', value:39231},
|
||||
{name:'江苏', value:35911},
|
||||
{name:'广东', value:55891}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
,elemDataView = $('#LAY-index-pagethree').children('div')
|
||||
,renderDataView = function(index){
|
||||
echartsApp[index] = echarts.init(elemDataView[index], layui.echartsTheme);
|
||||
echartsApp[index].setOption(options[index]);
|
||||
window.onresize = echartsApp[index].resize;
|
||||
};
|
||||
//没找到DOM,终止执行
|
||||
if(!elemDataView[0]) return;
|
||||
|
||||
renderDataView(0);
|
||||
});
|
||||
|
||||
//项目进展
|
||||
layui.use('table', function(){
|
||||
var $ = layui.$
|
||||
,table = layui.table;
|
||||
|
||||
table.render({
|
||||
elem: '#LAY-index-prograss'
|
||||
,url: layui.setter.paths.base + 'json/console/prograss.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'prograss', title: '任务'}
|
||||
,{field: 'time', title: '所需时间'}
|
||||
,{field: 'complete', title: '完成情况'
|
||||
,templet: function(d){
|
||||
if(d.complete == '已完成'){
|
||||
return '<del style="color: #16b777;">'+ d.complete +'</del>'
|
||||
}else if(d.complete == '进行中'){
|
||||
return '<span style="color: #FFB800;">'+ d.complete +'</span>'
|
||||
}else{
|
||||
return '<span style="color: #FF5722;">'+ d.complete +'</span>'
|
||||
}
|
||||
}
|
||||
}
|
||||
]]
|
||||
,skin: 'line'
|
||||
});
|
||||
});
|
||||
|
||||
//回复留言
|
||||
admin.events.replyNote = function(othis){
|
||||
var nid = othis.data('id');
|
||||
layer.prompt({
|
||||
title: '回复留言 ID:'+ nid
|
||||
,formType: 2
|
||||
}, function(value, index){
|
||||
//这里可以请求 Ajax
|
||||
//…
|
||||
layer.msg('得到:'+ value);
|
||||
layer.close(index);
|
||||
});
|
||||
};
|
||||
|
||||
exports('sample', {})
|
||||
});
|
||||
1160
iframe/src/res/modules/senior.js
Normal file
150
iframe/src/res/modules/set.js
Normal file
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* set demo
|
||||
*/
|
||||
|
||||
layui.define(['form', 'upload'], function(exports){
|
||||
var $ = layui.$
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,setter = layui.setter
|
||||
,view = layui.view
|
||||
,admin = layui.admin
|
||||
,form = layui.form
|
||||
,upload = layui.upload;
|
||||
|
||||
var $body = $('body');
|
||||
|
||||
//自定义验证
|
||||
form.verify({
|
||||
nickname: function(value, item){ //value:表单的值、item:表单的DOM对象
|
||||
if(!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(value)){
|
||||
return '用户名不能有特殊字符';
|
||||
}
|
||||
if(/(^\_)|(\__)|(\_+$)/.test(value)){
|
||||
return '用户名首尾不能出现下划线\'_\'';
|
||||
}
|
||||
if(/^\d+\d+\d$/.test(value)){
|
||||
return '用户名不能全为数字';
|
||||
}
|
||||
}
|
||||
|
||||
//我们既支持上述函数式的方式,也支持下述数组的形式
|
||||
//数组的两个值分别代表:[正则匹配、匹配不符时的提示文字]
|
||||
,pass: [
|
||||
/^[\S]{6,12}$/
|
||||
,'密码必须6到12位,且不能出现空格'
|
||||
]
|
||||
|
||||
//确认密码
|
||||
,repass: function(value){
|
||||
if(value !== $('#LAY_password').val()){
|
||||
return '两次密码输入不一致';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//网站设置
|
||||
form.on('submit(set_website)', function(obj){
|
||||
layer.alert(layui.util.escape(JSON.stringify(obj.field)));
|
||||
|
||||
//提交修改
|
||||
/*
|
||||
admin.req({
|
||||
url: ''
|
||||
,data: obj.field
|
||||
,success: function(){
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
return false;
|
||||
});
|
||||
|
||||
//邮件服务
|
||||
form.on('submit(set_system_email)', function(obj){
|
||||
layer.alert(layui.util.escape(JSON.stringify(obj.field)));
|
||||
|
||||
//提交修改
|
||||
/*
|
||||
admin.req({
|
||||
url: ''
|
||||
,data: obj.field
|
||||
,success: function(){
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
//设置我的资料
|
||||
form.on('submit(setmyinfo)', function(obj){
|
||||
layer.alert(layui.util.escape(JSON.stringify(obj.field)));
|
||||
|
||||
//提交修改
|
||||
/*
|
||||
admin.req({
|
||||
url: ''
|
||||
,data: obj.field
|
||||
,success: function(){
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
return false;
|
||||
});
|
||||
|
||||
//上传头像
|
||||
var avatarSrc = $('#LAY_avatarSrc');
|
||||
upload.render({
|
||||
url: '/api/upload/'
|
||||
,elem: '#LAY_avatarUpload'
|
||||
,done: function(res){
|
||||
if(res.status == 0){
|
||||
avatarSrc.val(res.url);
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 5});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//查看头像
|
||||
admin.events.avartatPreview = function(othis){
|
||||
var src = avatarSrc.val();
|
||||
layer.photos({
|
||||
photos: {
|
||||
"title": "查看头像" //相册标题
|
||||
,"data": [{
|
||||
"src": src //原图地址
|
||||
}]
|
||||
}
|
||||
,shade: 0.01
|
||||
,closeBtn: 1
|
||||
,anim: 5
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//设置密码
|
||||
form.on('submit(setmypass)', function(obj){
|
||||
var field = obj.field; //获取表单字段
|
||||
|
||||
layer.msg('ok');
|
||||
|
||||
//提交修改
|
||||
/*
|
||||
admin.req({
|
||||
url: ''
|
||||
,data: obj.field
|
||||
,success: function(){
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
return false;
|
||||
});
|
||||
|
||||
//对外暴露的接口
|
||||
exports('set', {});
|
||||
});
|
||||
60
iframe/src/res/modules/user.js
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* user demo
|
||||
*/
|
||||
|
||||
layui.define('form', function(exports){
|
||||
var $ = layui.$
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,setter = layui.setter
|
||||
,view = layui.view
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
|
||||
var $body = $('body');
|
||||
|
||||
//自定义验证
|
||||
form.verify({
|
||||
nickname: function(value, item){ //value:表单的值、item:表单的DOM对象
|
||||
if(!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(value)){
|
||||
return '用户名不能有特殊字符';
|
||||
}
|
||||
if(/(^\_)|(\__)|(\_+$)/.test(value)){
|
||||
return '用户名首尾不能出现下划线\'_\'';
|
||||
}
|
||||
if(/^\d+\d+\d$/.test(value)){
|
||||
return '用户名不能全为数字';
|
||||
}
|
||||
}
|
||||
|
||||
//我们既支持上述函数式的方式,也支持下述数组的形式
|
||||
//数组的两个值分别代表:[正则匹配、匹配不符时的提示文字]
|
||||
,pass: [
|
||||
/^[\S]{6,12}$/
|
||||
,'密码必须6到12位,且不能出现空格'
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
//发送短信验证码
|
||||
admin.sendAuthCode({
|
||||
elem: '#LAY-user-getsmscode'
|
||||
,elemPhone: '#LAY-user-login-cellphone'
|
||||
,elemVercode: '#LAY-user-login-vercode'
|
||||
,ajax: {
|
||||
url: layui.setter.paths.base + 'json/user/sms.js' //实际使用请改成服务端真实接口
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
//更换图形验证码
|
||||
$body.on('click', '#LAY-user-get-vercode', function(){
|
||||
var othis = $(this);
|
||||
this.src = 'https://www.oschina.net/action/user/captcha?t='+ new Date().getTime()
|
||||
});
|
||||
|
||||
//对外暴露的接口
|
||||
exports('user', {});
|
||||
});
|
||||
204
iframe/src/res/modules/useradmin.js
Normal file
@@ -0,0 +1,204 @@
|
||||
/**
|
||||
* useradmin demo
|
||||
*/
|
||||
|
||||
|
||||
layui.define(['table', 'form'], function(exports){
|
||||
var $ = layui.$
|
||||
,table = layui.table
|
||||
,form = layui.form;
|
||||
|
||||
//用户管理
|
||||
table.render({
|
||||
elem: '#LAY-user-manage'
|
||||
,url: layui.setter.paths.base + 'json/useradmin/webuser.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 100, title: 'ID', sort: true}
|
||||
,{field: 'username', title: '用户名', minWidth: 100}
|
||||
,{field: 'avatar', title: '头像', width: 100, templet: '#imgTpl'}
|
||||
,{field: 'phone', title: '手机'}
|
||||
,{field: 'email', title: '邮箱'}
|
||||
,{field: 'sex', width: 80, title: '性别'}
|
||||
,{field: 'ip', title: 'IP'}
|
||||
,{field: 'jointime', title: '加入时间', sort: true}
|
||||
,{title: '操作', width: 150, align:'center', fixed: 'right', toolbar: '#table-useradmin-webuser'}
|
||||
]]
|
||||
,page: true
|
||||
,limit: 30
|
||||
,height: 'full-220'
|
||||
,text: '对不起,加载出现异常!'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-user-manage)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.prompt({
|
||||
formType: 1
|
||||
,title: '敏感操作,请验证口令'
|
||||
}, function(value, index){
|
||||
layer.close(index);
|
||||
|
||||
layer.confirm('真的删除行么', function(index){
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
} else if(obj.event === 'edit'){
|
||||
var tr = $(obj.tr);
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑用户'
|
||||
,content: '../../../views/user/user/userform.html'
|
||||
,maxmin: true
|
||||
,area: ['500px', '450px']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'LAY-user-front-submit'
|
||||
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
||||
|
||||
//事件-提交
|
||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
//$.ajax({});
|
||||
table.reload('LAY-user-manage'); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
,success: function(layero, index){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//管理员管理
|
||||
table.render({
|
||||
elem: '#LAY-user-back-manage'
|
||||
,url: layui.setter.paths.base + 'json/useradmin/mangadmin.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 80, title: 'ID', sort: true}
|
||||
,{field: 'loginname', title: '登录名'}
|
||||
,{field: 'telphone', title: '手机'}
|
||||
,{field: 'email', title: '邮箱'}
|
||||
,{field: 'role', title: '角色'}
|
||||
,{field: 'jointime', title: '加入时间', sort: true}
|
||||
,{field: 'check', title:'审核状态', templet: '#buttonTpl', minWidth: 80, align: 'center'}
|
||||
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-useradmin-admin'}
|
||||
]]
|
||||
,text: '对不起,加载出现异常!'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-user-back-manage)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.prompt({
|
||||
formType: 1
|
||||
,title: '敏感操作,请验证口令'
|
||||
}, function(value, index){
|
||||
layer.close(index);
|
||||
layer.confirm('确定删除此管理员?', function(index){
|
||||
console.log(obj)
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
var tr = $(obj.tr);
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑管理员'
|
||||
,content: '../../../views/user/administrators/adminform.html'
|
||||
,area: ['420px', '420px']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'LAY-user-back-submit'
|
||||
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
||||
|
||||
//事件-提交
|
||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
//$.ajax({});
|
||||
table.reload('LAY-user-back-manage'); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
,success: function(layero, index){
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
//角色管理
|
||||
table.render({
|
||||
elem: '#LAY-user-back-role'
|
||||
,url: layui.setter.paths.base + 'json/useradmin/role.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox', fixed: 'left'}
|
||||
,{field: 'id', width: 80, title: 'ID', sort: true}
|
||||
,{field: 'rolename', title: '角色名'}
|
||||
,{field: 'limits', title: '拥有权限'}
|
||||
,{field: 'descr', title: '具体描述'}
|
||||
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-useradmin-admin'}
|
||||
]]
|
||||
,text: '对不起,加载出现异常!'
|
||||
});
|
||||
|
||||
//事件-工具条
|
||||
table.on('tool(LAY-user-back-role)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('确定删除此角色?', function(index){
|
||||
obj.del();
|
||||
layer.close(index);
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
var tr = $(obj.tr);
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑角色'
|
||||
,content: '../../../views/user/administrators/roleform.html'
|
||||
,area: ['500px', '480px']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find("#LAY-user-role-submit");
|
||||
|
||||
//事件-提交
|
||||
iframeWindow.layui.form.on('submit(LAY-user-role-submit)', function(data){
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
//$.ajax({});
|
||||
table.reload('LAY-user-back-role'); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
,success: function(layero, index){
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
exports('useradmin', {})
|
||||
});
|
||||
71
iframe/src/res/modules/workorder.js
Normal file
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* workorder demo
|
||||
*/
|
||||
|
||||
|
||||
layui.define(['table', 'form', 'element'], function(exports){
|
||||
var $ = layui.$
|
||||
,table = layui.table
|
||||
,form = layui.form
|
||||
,element = layui.element;
|
||||
|
||||
table.render({
|
||||
elem: '#LAY-app-system-order'
|
||||
,url: layui.setter.paths.base + 'json/workorder/demo.js' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'numbers', fixed: 'left'}
|
||||
,{field: 'orderid', width: 100, title: '工单号', sort: true}
|
||||
,{field: 'attr', width: 100, title: '业务性质'}
|
||||
,{field: 'title', width: 100, title: '工单标题', width: 300}
|
||||
,{field: 'progress', title: '进度', width: 200, align: 'center', templet: '#progressTpl'}
|
||||
,{field: 'submit', width: 100, title: '提交者'}
|
||||
,{field: 'accept', width: 100, title: '受理人员'}
|
||||
,{field: 'state', title: '工单状态', templet: '#buttonTpl', minWidth: 80, align: 'center'}
|
||||
,{title: '操作', align: 'center', fixed: 'right', toolbar: '#table-system-order'}
|
||||
]]
|
||||
,page: true
|
||||
,limit: 10
|
||||
,limits: [10, 15, 20, 25, 30]
|
||||
,text: '对不起,加载出现异常!'
|
||||
,done: function(){
|
||||
element.render('progress')
|
||||
}
|
||||
});
|
||||
|
||||
//工具条事件
|
||||
table.on('tool(LAY-app-system-order)', function(obj){
|
||||
var data = obj.data;
|
||||
if(obj.event === 'edit'){
|
||||
var tr = $(obj.tr);
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑工单'
|
||||
,content: '../../../views/app/workorder/listform.html'
|
||||
,area: ['450px', '450px']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'LAY-app-workorder-submit'
|
||||
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
||||
|
||||
//事件-提交
|
||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
//$.ajax({});
|
||||
table.reload('LAY-user-front-submit'); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
,success: function(layero, index){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
exports('workorder', {})
|
||||
});
|
||||
BIN
iframe/src/res/style/imgs/layui-logo.jpg
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
iframe/src/res/style/imgs/template/character.jpg
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
iframe/src/res/style/imgs/template/huge.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
iframe/src/res/style/imgs/template/portrait.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
179
iframe/src/res/style/template.css
Normal file
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* admin.templte.css
|
||||
*/
|
||||
|
||||
/********************************
|
||||
|
||||
模板开始
|
||||
|
||||
*******************************/
|
||||
|
||||
|
||||
/* 产品版本选择面板 */
|
||||
.layadmin-panel-selection{width: 768px; margin: 30px auto;}
|
||||
.layadmin-panel-selection .layui-panel-window{padding: 30px 50px; border-top-color: #ddd; text-align: center;}
|
||||
.layadmin-panel-selection .layui-panel-window h2{padding-bottom: 15px; font-size: 18px;}
|
||||
.layadmin-panel-selection .layui-panel-window ul{margin-top: 15px; text-align: left;}
|
||||
.layadmin-panel-selection .layui-btn-container{margin-top: 30px;}
|
||||
.layadmin-panel-selection .layui-btn-container .layui-btn{width: 100%;}
|
||||
|
||||
/* 通讯录面板 */
|
||||
.layadmin-maillist-fluid .layadmin-contact-box{padding:20px;background-color: #fff;
|
||||
border: 1px solid #e7eaec;overflow: hidden;}
|
||||
.layadmin-maillist-fluid .layadmin-text-center{text-align: center;}
|
||||
.layadmin-maillist-fluid .layadmin-text-center img{max-width: 80%;border-radius: 50%;margin-top: 5px;}
|
||||
.layadmin-maillist-fluid .layadmin-font-blod{font-weight: 600;}
|
||||
.layadmin-maillist-fluid .layadmin-maillist-img{margin-top: 5px;}
|
||||
.layadmin-maillist-fluid .layadmin-title{margin:5px 0 10px 0;}
|
||||
.layadmin-maillist-fluid .layadmin-textimg{line-height: 25px;margin-bottom: 10px;}
|
||||
.layadmin-maillist-fluid .layadmin-address{line-height: 1.5;margin-bottom: 20px;}
|
||||
.layadmin-maillist-fluid .layadmin-padding-left20{padding-left: 20px;}
|
||||
|
||||
/* 个人主页 */
|
||||
.layadmin-homepage-shadow{box-shadow: 0 1px 1px rgba(0,0,0,.05);background-color: #fff;border-bottom: 1px solid rgba(0,0,0,0.17);border-radius: 0;border: 1px solid #e7ecf3;}
|
||||
.layadmin-homepage-panel{margin-bottom: 15px;}
|
||||
.layadmin-homepage-panel .text-center{text-align: center;}
|
||||
.layadmin-homepage-information{padding: 15px; border-bottom: 1px solid #e9e9e9;}
|
||||
.layadmin-homepage-pad-ver{ padding-top: 15px;padding-bottom: 15px;}
|
||||
.layadmin-homepage-pad-img{box-shadow: 0 0 0 4px rgba(0,0,0,0.1);border-radius: 50%;}
|
||||
.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-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: #16b777; color:#fff;}
|
||||
|
||||
.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 li{ padding: 5px 15px;border: 1px solid #ddd;margin-bottom: -1px;border-width: 1px 0;border-radius: 0; background-color: transparent;border-color: transparent;color: inherit;}
|
||||
.layadmin-homepage-list-group li i{font-size: 1.333em;line-height: 1.095em;vertical-align: middle; margin-right: 4px;}
|
||||
.layadmin-homepage-list-group li a.color{color:#337ab7;}
|
||||
.layadmin-homepage-pad-hor{ padding-left: 15px; padding-right: 15px;border-bottom: 15px;color: #758697; text-indent:20px;}
|
||||
.layadmin-homepage-list-inline{margin-left: 15px;margin-right: 15px;padding-bottom: 20px}
|
||||
.layadmin-homepage-list-inline a{display: inline-block;}
|
||||
.layadmin-homepage-list-inline .layui-btn{font-size: .9em;line-height: 1.42857;vertical-align: middle;height: auto;padding:4px 7px;margin-left: 0px;margin:0 10px 10px 0;}
|
||||
|
||||
/* 左侧个人信息区域 */
|
||||
.layadmin-homepage-text-center{text-align: center;margin-bottom: 15px;}
|
||||
.layadmin-homepage-padding15{padding:15px;margin-bottom: 15px;}
|
||||
.layadmin-homepage-padding8{padding: 0 8px;}
|
||||
.layadmin-homepage-paddingmb{margin-bottom: 15px;margin: 0 -7.5px;}
|
||||
.layadmin-homepage-content{margin-left: 15px;padding: 0;}
|
||||
.layadmin-homepage-content .new-section-xs{margin: 12px 0;color: inherit;border: 0!important;height: 0px;box-sizing: content-box;}
|
||||
.layadmin-homepage-content .h4{font-size: 16px;font-weight: 600;color: #2b425b;}
|
||||
.layadmin-homepage-content small{color: #afb9c3}
|
||||
.layadmin-homepage-text-center .layui-icon{color:#FFB800;padding-right:5px;}
|
||||
.layadmin-homepage-padding15 .layui-col-sm5 a{font-size: 11px;height: auto;line-height: 1.5;padding:5px 10px;float: right;}
|
||||
.layadmin-homepage-padding15 .layui-btn-normal{margin:0 15px;}
|
||||
.layadmin-homepage-list-imgtxt .layui-col-sm10,.layadmin-homepage-list-imgtxt .layui-col-sm2{background: none}
|
||||
.layadmin-homepage-list-imgtxt .panel-body{padding: 15px 20px 25px;overflow: hidden;margin-bottom: 15px;}
|
||||
.layadmin-homepage-list-imgtxt .panel-body .media-left{display: block;float: left;vertical-align: top;padding-right: 10px;}
|
||||
.layadmin-homepage-list-imgtxt .panel-body .media-left img{border-radius: 50%;}
|
||||
.layadmin-homepage-list-imgtxt .media-body{width: auto;display: block;overflow: hidden;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .pad-btm{padding-bottom: 15px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .pad-btm p:first-child{padding-bottom: 5px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .min-font{margin-bottom: 10px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .min-font .layui-breadcrumb a{font-size: 11px;}
|
||||
.layui-breadcrumb span[lay-separator]{margin:0 5px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .pad-btm .fontColor a{font-weight: 600;color: #337ab7;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .pad-btm .fontColor span{color: #758697;font-weight: 600;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .h-img{display: block;max-width: 100%;height: auto;margin-top: 10px;}
|
||||
.layadmin-homepage-list-imgtxt .img-xs{width: 32px;height: 32px;border-radius: 50%;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media{margin-top: 15px;overflow: hidden;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media .media-right{float: right;padding-top: 10px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media .media-right .list-inline{margin-bottom: 10px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media .list-inline li{padding:0 5px;display: inline-block;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media .media-right .list-inline li span{font-weight: 600;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media .media-left{display: block;overflow: hidden;width: auto;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media .media-left .font-blod{font-weight: 700;color: #758697;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list{padding-top: 15px;margin-top: 15px;border-top: 1px solid #e9e9e9;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .media-item{padding-bottom: 15px;margin-top: 15px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .media-item-left{display:inline-block;padding-right: 10px;margin-bottom: 5px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .media-item-left img{display: block;float: left;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .media-text{overflow: hidden;width: auto;display: inline-block;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .media-text a{margin-right: 10px;font-weight: 600;display: inline-block;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .media-text div:nth-child(2){margin-top: 5px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .layui-btn{height: 24px;line-height: 24px;font-size: 12px;padding:0 20px;margin-bottom: 10px;}
|
||||
.layadmin-homepage-list-imgtxt .media-body .media-list .layui-btn{height: 24px;line-height: 24px;font-size: 12px;padding:0 20px;margin-bottom: 10px;}
|
||||
|
||||
/* 个人内容区域 */
|
||||
|
||||
.homepage-top .layui-card-body img{width: 100%}
|
||||
.homepage-top .layui-card-body .margin-top10{margin-top: 10px;}
|
||||
.homepage-top .layui-card-body .layui-btn{width: 100%;display: block;}
|
||||
.homepage-top{padding-bottom: 20px;}
|
||||
.layadmin-privateletterlist-item{position: relative;display: block;padding: 10px 15px;}
|
||||
.homepage-bottom .layui-card-body{padding:0;}
|
||||
.homepage-bottom .layui-card-body img{width: 32px;height: 32px;border-radius: 50%;margin-top: 10px;}
|
||||
.homepage-bottom .layui-card-body .meida-left{display: table-cell;padding-right: 10px;}
|
||||
.homepage-bottom .layui-card-body .meida-right{display: table-cell;vertical-align: top;}
|
||||
.homepage-bottom .layui-card-body a:hover{background: #F2F2F2;}
|
||||
.homepage-bottom .layui-card-body{background: #fff;}
|
||||
.layui-card-header .panel-title .layui-icon{position: relative;left: 0;right: 0px;}
|
||||
|
||||
/* 右侧信息栏 */
|
||||
.layadmin-cmdlist-fluid{padding-bottom: 60px;}
|
||||
.cmdlist-container{background: #fff;border:1px solid transparent;}
|
||||
.cmdlist-container:hover{border:1px solid #e8e8e8;}
|
||||
.cmdlist-container img{width: 100%;}
|
||||
.cmdlist-text{padding:20px;}
|
||||
.cmdlist-text .info{height: 40px;font-size: 14px;line-height: 20px;width: 100%;overflow: hidden;color: #5F5F5F;margin-bottom:10px;}
|
||||
.cmdlist-text .price{font-size: 14px;}
|
||||
.cmdlist-text .price b{margin-right: 20px;}
|
||||
.cmdlist-text .price p{display: inline-block;}
|
||||
.cmdlist-text .flow{text-align: right;float: right;}
|
||||
#demo0{text-align: center;}
|
||||
|
||||
/* 商品列表 */
|
||||
.layadmin-message-fluid .layui-col-md12{background: #fff;height: auto;padding-bottom: 50px;}
|
||||
.layadmin-message-fluid .layui-input-block{margin-left: 0;}
|
||||
.layadmin-message-fluid .layui-form{padding:45px 40px 0 40px;}
|
||||
.layadmin-message-fluid .layui-form-label{text-align: left;font-size: 18px;padding-left: 10px;}
|
||||
.layadmin-message-fluid .layui-textarea{min-height: 100px;font-size: 16px;}
|
||||
.layadmin-message-fluid .layui-input-right{float: right;}
|
||||
.layadmin-messag-icon{overflow: hidden;float: left;}
|
||||
.layadmin-messag-icon .layui-icon{font-size: 24px;line-height: 30px;margin-right: 15px;color: #C4CBCF;}
|
||||
.layadmin-messag-icon{margin-top: 4px;}
|
||||
.message-content{padding:0 40px;}
|
||||
.message-content .media-body{margin-bottom: 60px;}
|
||||
.message-content .media-body .pad-btm{padding-bottom: 0;}
|
||||
.message-content .media-left{float: left;margin-right: 10px;}
|
||||
.message-content .media-left img{border-radius: 50%;}
|
||||
.message-text{padding-top: 10px;}
|
||||
.message-content-btn{text-align: center;}
|
||||
.message-content .layui-btn{height: auto;line-height: 26px; padding: 5px 30px; font-size: 16px;}
|
||||
|
||||
/* 搜索结果页面 */
|
||||
.layadmin-serach-main .layui-card-header{height: auto; line-height: 24px; padding: 15px;}
|
||||
.layadmin-serach-list{margin-bottom: 10px; padding: 10px 0; border-bottom: 1px solid #f6f6f6;}
|
||||
.layadmin-serach-list h3{padding: 10px 0;}
|
||||
.layadmin-serach-list h3 .layui-badge{top: -2px;}
|
||||
.layadmin-serach-list p{color: #5F5F5F;}
|
||||
.layadmin-serach-list li{margin-bottom: 20px; padding-bottom: 20px; clear: both;}
|
||||
.layui-serachlist-cover{float: left; margin-right: 15px;}
|
||||
.layui-serachlist-cover img{width: 90px; height: 90px;}
|
||||
|
||||
|
||||
|
||||
/* 用户列表开始 */
|
||||
.layadmin-caller{background: #fff;padding: 30px;}
|
||||
.layadmin-caller em{font-style: normal;}
|
||||
.layadmin-caller .caller-fl{float: left;}
|
||||
.layadmin-caller .caller-fr{float: right;}
|
||||
.layadmin-caller .caller-seach{position: relative;padding-bottom:40px;}
|
||||
.layadmin-caller .caller-seach .caller-icon{font-size: 18px;position: absolute;top: 9px;}
|
||||
.layadmin-caller .caller-seach-icon{left: 6px;}
|
||||
.layadmin-caller .caller-dump-icon{right: 6px;cursor: pointer;}
|
||||
.layadmin-caller .caller-pl32{padding:0 32px;}
|
||||
.layadmin-caller .caller-tab{margin:0;}
|
||||
.layadmin-caller .caller-contar{padding-bottom:20px;}
|
||||
.layadmin-caller .caller-contar .caller-item{padding:25px 0;overflow: hidden;border-bottom: 1px solid #e0e0e0;}
|
||||
.layadmin-caller .caller-contar .caller-item .caller-main{margin-left: 20px;}
|
||||
.layadmin-caller .caller-contar .caller-item .caller-main p{line-height: 100%;padding:8px 0;}
|
||||
.layadmin-caller .caller-contar .caller-item .caller-main p:first-child{padding-top:0;}
|
||||
.layadmin-caller .caller-contar .caller-item .caller-main em{margin-left: 5px;}
|
||||
.layadmin-caller .caller-contar .caller-item .caller-main .caller-adds i{padding-right: 5px;margin:0;}
|
||||
.layadmin-caller .caller-contar .caller-item .caller-main .caller-adds{padding-bottom:12px;}
|
||||
.layadmin-caller .caller-contar .caller-iconset i{margin:0 5px;}
|
||||
.layadmin-caller .caller-contar .caller-iconset i:first-child{margin-left: 0;}
|
||||
.layadmin-caller .caller-contar button{margin-top: 22px;}
|
||||
.layadmin-caller .caller-contar .caller-img{width: 40px;height: 40px;border-radius: 100%;}
|
||||
/****** 模板结束 ******/
|
||||
18
iframe/src/res/views/system/about.html
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
<div class="layui-card-header">版本</div>
|
||||
<div class="layui-card-body layui-text layadmin-about">
|
||||
<blockquote class="layui-elem-quote" style="border: none;">
|
||||
<script type="text/html" template>
|
||||
<p>当前版本:v{{ layui.admin.v }}</p>
|
||||
</script>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
<div class="layui-card-header">关于</div>
|
||||
<div class="layui-card-body layui-text layadmin-about">
|
||||
<blockquote class="layui-elem-quote" style="border: none;">
|
||||
一套纯静态的 HTML 网页界面模板,以开源免费的 Layui 基础组件和页面模板 Demo 为组成,没有任何后端程序及数据库存储等服务端代码。
|
||||
<br><br>开发者使用该网页模板,可省去前端的大量工作,从而更高效地开发 Web 应用系统。
|
||||
<br><br>该主题受国家计算机软件著作权保护(登记号:2018SR410669),只在 Layui 官方授权合作平台提供获取入口,禁止在其他第三方平台公开及传播主题源文件、盗版及非法倒卖等,违者将自行承担相应的法律责任。
|
||||
</blockquote>
|
||||
</div>
|
||||
85
iframe/src/res/views/system/theme.html
Normal file
@@ -0,0 +1,85 @@
|
||||
<!-- 主题设置模板 -->
|
||||
|
||||
<script type="text/html" template lay-done="layui.data.theme();">
|
||||
{{#
|
||||
var local = layui.data(layui.setter.tableName);
|
||||
var theme = local.theme || {};
|
||||
var color = theme.color || {};
|
||||
var themeColorIndex = parseInt((theme && theme.color) ? theme.color.index : 0) || 0;
|
||||
}}
|
||||
|
||||
<div class="layui-card-header">
|
||||
<strong>主题设置</strong>
|
||||
</div>
|
||||
<div class="layui-card-body layadmin-setTheme">
|
||||
<h5><strong>配色方案</strong></h5>
|
||||
<ul class="layadmin-setTheme-color">
|
||||
{{# layui.each(layui.setter.theme.color, function(index, item){ }}
|
||||
<li layadmin-event="setTheme" data-index="{{ index }}" data-alias="{{ item.alias }}"
|
||||
{{- index === themeColorIndex ? 'class="layui-this"' : '' }} title="{{ item.alias }}">
|
||||
<div class="layadmin-setTheme-header" style="background-color: {{ item.header }};"></div>
|
||||
<div class="layadmin-setTheme-side" style="background-color: {{ item.main }};">
|
||||
<div class="layadmin-setTheme-logo" style="background-color: {{ item.logo }};"></div>
|
||||
</div>
|
||||
</li>
|
||||
{{# }); }}
|
||||
</ul>
|
||||
<h5><strong>自定义配色</strong></h5>
|
||||
<ul class="layadmin-setTheme-custom">
|
||||
<li>主题色 <div class="set-custom-theme" data-name="main" lay-options="{color: '{{= color.main }}'}"></div></li>
|
||||
<li>选中色 <div class="set-custom-theme" data-name="selected" lay-options="{color: '{{= color.selected }}'}"></div></li>
|
||||
<li>LOGO 背景色 <div class="set-custom-theme" data-name="logo" lay-options="{color: '{{= color.logo }}'}"></div></li>
|
||||
<li>头部拦背景色 <div class="set-custom-theme" data-name="header" lay-options="{color: '{{= color.header }}'}"></div></li>
|
||||
<li>恢复默认主题 <div class="set-default-theme"><button class="layui-btn layui-btn-primary"><i class="layui-icon layui-icon-refresh-1"></i></button></div></li>
|
||||
</ul>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
layui.data.theme = function(){
|
||||
layui.use(['form', 'colorpicker'], function(){
|
||||
var $ = layui.$;
|
||||
var layer = layui.layer;
|
||||
var form = layui.form
|
||||
var colorpicker = layui.colorpicker
|
||||
var admin = layui.admin;
|
||||
var view = layui.view;
|
||||
|
||||
|
||||
var local = layui.data(layui.setter.tableName);
|
||||
var theme = local.theme || {};
|
||||
var color = theme.color || {};
|
||||
|
||||
// 自定义配色
|
||||
colorpicker.render({
|
||||
elem: '.set-custom-theme',
|
||||
done: function(value){
|
||||
var elem = this.elem;
|
||||
var NAME = elem.data('name');
|
||||
|
||||
color[NAME] = value;
|
||||
|
||||
admin.theme({
|
||||
color: color
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 恢复默认主题
|
||||
$('.set-default-theme').on('click', function() {
|
||||
layer.confirm('确认恢复默认主题吗?', function(i) {
|
||||
layer.close(i);
|
||||
admin.events.setTheme($('.layadmin-setTheme-color>li:eq(0)'));
|
||||
admin.initTheme(0);
|
||||
view('LAY_adminPopupTheme').render('system/theme');
|
||||
})
|
||||
});
|
||||
|
||||
// 事件-隐藏开关
|
||||
form.on('switch(system-theme-sideicon)', function(){
|
||||
admin.theme({
|
||||
hideSideIcon: this.checked
|
||||
})
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||