add mock api
parent
c8152b36d4
commit
892154248a
|
|
@ -1,115 +0,0 @@
|
|||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"count": 12,
|
||||
"data": [
|
||||
{
|
||||
"id": "001",
|
||||
"title": "LV降价了!宇宙大牌最值得买的包可以下手啦!",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/100",
|
||||
"readSize": 288,
|
||||
"publisher": "admin",
|
||||
"isTop": true,
|
||||
"status": true
|
||||
},
|
||||
{
|
||||
"id": "002",
|
||||
"title": "这颗彗星时速13.5万公里,有人想抓点样本带回地球",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/101",
|
||||
"readSize": 188,
|
||||
"publisher": "admin",
|
||||
"isTop": false,
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"id": "003",
|
||||
"title": "LV降价了!宇宙大牌最值得买的包可以下手啦!",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/100",
|
||||
"readSize": 288,
|
||||
"publisher": "admin",
|
||||
"isTop": true,
|
||||
"status": true
|
||||
},
|
||||
{
|
||||
"id": "004",
|
||||
"title": "这颗彗星时速13.5万公里,有人想抓点样本带回地球",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/101",
|
||||
"readSize": 188,
|
||||
"publisher": "admin",
|
||||
"isTop": false,
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"id": "005",
|
||||
"title": "LV降价了!宇宙大牌最值得买的包可以下手啦!",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/100",
|
||||
"readSize": 288,
|
||||
"publisher": "admin",
|
||||
"isTop": true,
|
||||
"status": true
|
||||
},
|
||||
{
|
||||
"id": "006",
|
||||
"title": "这颗彗星时速13.5万公里,有人想抓点样本带回地球",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/101",
|
||||
"readSize": 188,
|
||||
"publisher": "admin",
|
||||
"isTop": false,
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"id": "007",
|
||||
"title": "LV降价了!宇宙大牌最值得买的包可以下手啦!",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/100",
|
||||
"readSize": 288,
|
||||
"publisher": "admin",
|
||||
"isTop": true,
|
||||
"status": true
|
||||
},
|
||||
{
|
||||
"id": "008",
|
||||
"title": "这颗彗星时速13.5万公里,有人想抓点样本带回地球",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/101",
|
||||
"readSize": 188,
|
||||
"publisher": "admin",
|
||||
"isTop": false,
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"id": "009",
|
||||
"title": "LV降价了!宇宙大牌最值得买的包可以下手啦!",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/100",
|
||||
"readSize": 288,
|
||||
"publisher": "admin",
|
||||
"isTop": true,
|
||||
"status": true
|
||||
},
|
||||
{
|
||||
"id": "010",
|
||||
"title": "这颗彗星时速13.5万公里,有人想抓点样本带回地球",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/101",
|
||||
"readSize": 188,
|
||||
"publisher": "admin",
|
||||
"isTop": false,
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"id": "011",
|
||||
"title": "LV降价了!宇宙大牌最值得买的包可以下手啦!",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/100",
|
||||
"readSize": 288,
|
||||
"publisher": "admin",
|
||||
"isTop": true,
|
||||
"status": true
|
||||
},
|
||||
{
|
||||
"id": "012",
|
||||
"title": "这颗彗星时速13.5万公里,有人想抓点样本带回地球",
|
||||
"url": "http://ok-admin.xlbweb.cn/p/101",
|
||||
"readSize": 188,
|
||||
"publisher": "admin",
|
||||
"isTop": false,
|
||||
"status": false
|
||||
}
|
||||
]
|
||||
}
|
||||
197
data/log.json
197
data/log.json
|
|
@ -1,197 +0,0 @@
|
|||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"count": 12,
|
||||
"data": [
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
},
|
||||
{
|
||||
"id": "001",
|
||||
"url": "http://ok-admin.xlbweb.cn",
|
||||
"method": "GET",
|
||||
"ip": "127.0.0.1",
|
||||
"timeConsuming": 100,
|
||||
"status": true,
|
||||
"operator": "admin",
|
||||
"operatingTime": "2019-05-15 12:08:08"
|
||||
}
|
||||
]
|
||||
}
|
||||
405
data/menu.json
405
data/menu.json
|
|
@ -1,405 +0,0 @@
|
|||
{
|
||||
"status": 1000,
|
||||
"msg": "操作成功",
|
||||
"data": [
|
||||
{
|
||||
"title": "会员管理",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": true,
|
||||
"children": [
|
||||
{
|
||||
"title": "用户列表",
|
||||
"path": "pages/user/user.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "角色列表",
|
||||
"path": "pages/role/role.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "权限列表",
|
||||
"path": "pages/permission/permission.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "新闻管理",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "新闻列表",
|
||||
"path": "pages/article/article.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "留言管理",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "留言列表",
|
||||
"path": "pages/message/message.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "下载中心",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "下载列表",
|
||||
"path": "pages/download/download.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "友情链接",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "链接列表",
|
||||
"path": "pages/link/link.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "产品管理",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "产品列表",
|
||||
"path": "pages/product/product.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "图表页面",
|
||||
"path": "",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "柱状图",
|
||||
"path": "pages/map/map1.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "折线图",
|
||||
"path": "pages/map/map2.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "折线堆叠图",
|
||||
"path": "pages/map/map3.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "饼图",
|
||||
"path": "pages/map/map4.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "环形图",
|
||||
"path": "pages/map/map5.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "散布图",
|
||||
"path": "pages/map/map6.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "系统管理",
|
||||
"path": "",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "网站配置",
|
||||
"path": "pages/system/system-setting.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "系统日志",
|
||||
"path": "pages/system/system-log.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "屏蔽词",
|
||||
"path": "pages/system/system-shield.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "框架使用",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "okMenu使用",
|
||||
"path": "pages/use/use-okMenu.html",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "okTab使用",
|
||||
"path": "pages/use/use-okTab.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "okLayer使用",
|
||||
"path": "pages/use/use-okLayer.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "okUtils使用",
|
||||
"path": "pages/use/use-okUtils.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "Layui图标",
|
||||
"path": "https://www.layui.com/doc/element/icon.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "Iconfont图标",
|
||||
"path": "font/demo_index.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "其他页面",
|
||||
"path": "",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "登陆页面",
|
||||
"path": "pages/use/use-okTab.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "403页面",
|
||||
"path": "pages/use/use-okLayer.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "404页面",
|
||||
"path": "pages/use/use-okUtils.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "500页面",
|
||||
"path": "https://www.layui.com/doc/element/icon.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "捐赠列表",
|
||||
"path": "font/demo_index.html",
|
||||
"font": "iconfont",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "多级菜单",
|
||||
"path": "",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "购物网站",
|
||||
"path": "",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "苏宁",
|
||||
"path": "https://www.suning.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "京东",
|
||||
"path": "https://www.jd.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "阿里",
|
||||
"path": "",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "淘宝",
|
||||
"path": "https://www.taobao.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "天猫",
|
||||
"path": "https://www.tmall.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "聚划算",
|
||||
"path": "https://ju.taobao.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "新浪微博",
|
||||
"path": "https://www.sina.com.cn",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "搜索引擎",
|
||||
"path": "",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false,
|
||||
"children": [
|
||||
{
|
||||
"title": "百度",
|
||||
"path": "https://www.baidu.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "谷歌",
|
||||
"path": "https://www.google.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "360搜索",
|
||||
"path": "https://www.so.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "搜狐",
|
||||
"path": "http://www.sohu.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
},
|
||||
{
|
||||
"title": "网易",
|
||||
"path": "https://www.163.com",
|
||||
"font": "layui-icon",
|
||||
"icon": "",
|
||||
"spread": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"count": 3,
|
||||
"data": [
|
||||
{
|
||||
"id": "001",
|
||||
"name": "ADMIN",
|
||||
"remarks": "管理员",
|
||||
"createUser": "admin",
|
||||
"createTime": "2018-05-06 18:15:28"
|
||||
},
|
||||
{
|
||||
"id": "002",
|
||||
"name": "TEACHER",
|
||||
"remarks": "教师",
|
||||
"createUser": "admin",
|
||||
"createTime": "2018-05-06 19:15:28"
|
||||
},
|
||||
{
|
||||
"id": "003",
|
||||
"name": "STUDENT",
|
||||
"remarks": "学生",
|
||||
"createUser": "admin",
|
||||
"createTime": "2018-05-06 20:15:28"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"status": 1000,
|
||||
"msg": "操作成功",
|
||||
"data": {}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"status": 1000,
|
||||
"msg": "操作成功",
|
||||
"data": {}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"status": 1000,
|
||||
"msg": "操作成功",
|
||||
"data": {}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"status": 1000,
|
||||
"msg": "操作成功",
|
||||
"data": {}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"status": 1000,
|
||||
"msg": "操作成功",
|
||||
"data": {}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"status": 1000,
|
||||
"msg": "操作成功",
|
||||
"data": {
|
||||
"username": "bobi",
|
||||
"email": "bobi1234@foxmail.com"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
{
|
||||
"code": 0,
|
||||
"msg": "操作成功",
|
||||
"count": 11,
|
||||
"data": [
|
||||
{
|
||||
"id": "001",
|
||||
"username": "zhangsan",
|
||||
"reallyName": "张三",
|
||||
"password": "111111",
|
||||
"status": 0,
|
||||
"role": 0,
|
||||
"email": "zhangsan@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "002",
|
||||
"username": "lisi",
|
||||
"reallyName": "李四",
|
||||
"password": "111111",
|
||||
"status": 0,
|
||||
"role": 0,
|
||||
"email": "lisi@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "003",
|
||||
"username": "wangwu",
|
||||
"reallyName": "王五",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "wangwu@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "004",
|
||||
"username": "zhaoliu",
|
||||
"reallyName": "赵六",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "zhaoliu@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "005",
|
||||
"username": "sunqi",
|
||||
"reallyName": "孙七",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "sunqi@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "006",
|
||||
"username": "zhouba",
|
||||
"reallyName": "周八",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "zhouba@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "007",
|
||||
"username": "wujiu",
|
||||
"reallyName": "吴九",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "wujiu@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "008",
|
||||
"username": "zhengshi",
|
||||
"reallyName": "郑十",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "zhengshi@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "009",
|
||||
"username": "liubei",
|
||||
"reallyName": "刘备",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "liubei@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "010",
|
||||
"username": "zhangfei",
|
||||
"reallyName": "张飞",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "zhangfei@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
},
|
||||
{
|
||||
"id": "011",
|
||||
"username": "guanyu",
|
||||
"reallyName": "关羽",
|
||||
"password": "111111",
|
||||
"status": 1,
|
||||
"role": 1,
|
||||
"email": "guanyu@qq.com",
|
||||
"phone": "13222222222",
|
||||
"createTime": "2018-05-06 18:15:28",
|
||||
"logins": 24
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
layui.use(["element", "layer", "okTab", "okMenu"], function () {
|
||||
layui.use(["element", "layer", "okTab", "okMenu", "okUtils"], function () {
|
||||
var element = layui.element;
|
||||
var layer = layui.layer;
|
||||
var okTab = layui.okTab;
|
||||
var okMenu = layui.okMenu;
|
||||
var okUtils = layui.okUtils;
|
||||
var $ = layui.jquery;
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +33,7 @@ layui.use(["element", "layer", "okTab", "okMenu"], function () {
|
|||
/**
|
||||
* 生成左侧菜单树
|
||||
*/
|
||||
okMenu.generatorMenu("data/menu.json", "get");
|
||||
okMenu.generatorMenu(okUtils.mockApi.menu.list, "get");
|
||||
|
||||
/**
|
||||
* 监听导航菜单的点击
|
||||
|
|
|
|||
|
|
@ -138,6 +138,29 @@ layui.define("layer", function (exports) {
|
|||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
mockApi: {
|
||||
login: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/login",
|
||||
menu: {
|
||||
list: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/menu/list"
|
||||
},
|
||||
user: {
|
||||
list: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/user/list",
|
||||
batchNormal: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/user/batchNormal",
|
||||
batchStop: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/user/batchStop",
|
||||
batchDel: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/user/batchDel",
|
||||
add: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/user/add",
|
||||
edit: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/user/edit"
|
||||
},
|
||||
role: {
|
||||
list: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/role/list"
|
||||
},
|
||||
article: {
|
||||
list: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/article/list"
|
||||
},
|
||||
log: {
|
||||
list: "https://easy-mock.com/mock/5d0ce725424f15399a6c2068/okadmin/log/list"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
var articleTable = table.render({
|
||||
elem: "#tableId",
|
||||
url: "../../data/article.json",
|
||||
url: okUtils.mockApi.article.list,
|
||||
limit: 10,
|
||||
page: true,
|
||||
even: true,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
var roleTable = table.render({
|
||||
elem: "#tableId",
|
||||
url: "../../data/role.json",
|
||||
url: okUtils.mockApi.role.list,
|
||||
limit: 10,
|
||||
page: true,
|
||||
toolbar: "#toolbarTpl",
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
var logTable = table.render({
|
||||
elem: "#tableId",
|
||||
url: "../../data/log.json",
|
||||
url: okUtils.mockApi.log.list,
|
||||
limit: 10,
|
||||
page: true,
|
||||
toolbar: true,
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function detail (id) {
|
||||
okLayer.open("日志详情", "system-log-detail.html?id=" + id, "90%", "90%")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
// 登陆逻辑
|
||||
form.on('submit(login)', function (data) {
|
||||
okUtils.ajax("../../data/user/login.json", "get", data.field).done(function (response) {
|
||||
okUtils.ajax(okUtils.mockApi.login, "post", data.field).done(function (response) {
|
||||
console.log(response)
|
||||
okLayer.msg.greenTick("登陆成功", function () {
|
||||
window.location = "../../index.html";
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
});
|
||||
|
||||
form.on("submit(add)", function (data) {
|
||||
okUtils.ajax("../../data/user/add.json", "get", data.field).done(function (response) {
|
||||
okUtils.ajax(okUtils.mockApi.user.add, "post", data.field).done(function (response) {
|
||||
console.log(response)
|
||||
okLayer.msg.greenTick("添加成功", function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
|
|
|
|||
|
|
@ -105,21 +105,21 @@
|
|||
<!--js逻辑-->
|
||||
<script src="../../lib/layui/layui.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var initData;
|
||||
function initForm(data) {
|
||||
var jsonString = JSON.stringify(data)
|
||||
initData = JSON.parse(jsonString);
|
||||
}
|
||||
|
||||
|
||||
layui.use(["element", "form", "laydate", "okLayer", "okUtils"], function () {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var okLayer = layui.okLayer;
|
||||
var okUtils = layui.okUtils;
|
||||
|
||||
|
||||
form.val("filter", initData);
|
||||
|
||||
|
||||
laydate.render({elem: "#birthday", type: "datetime"});
|
||||
|
||||
form.verify({
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
});
|
||||
|
||||
form.on("submit(edit)", function (data) {
|
||||
okUtils.ajax("../../data/user/edit.json", "get", data.field).done(function (response) {
|
||||
okUtils.ajax(okUtils.mockApi.user.edit, "put", data.field).done(function (response) {
|
||||
console.log(response)
|
||||
okLayer.msg.greenTick("编辑成功", function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
var userTable = table.render({
|
||||
elem: "#tableId",
|
||||
url: "../../data/user/user.json",
|
||||
url: okUtils.mockApi.user.list,
|
||||
method: "get",
|
||||
limit: 10,
|
||||
page: true,
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
layer.close(index);
|
||||
var idsStr = okUtils.table.batchCheck(table);
|
||||
if (idsStr) {
|
||||
okUtils.ajax("../../data/user/batchNormal.json", "get", {idsStr: idsStr}).done(function (response) {
|
||||
okUtils.ajax(okUtils.mockApi.user.batchNormal, "put", {idsStr: idsStr}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("批量启用成功");
|
||||
}).fail(function (error) {
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
layer.close(index);
|
||||
var idsStr = okUtils.table.batchCheck(table);
|
||||
if (idsStr) {
|
||||
okUtils.ajax("../../data/user/batchStop.json", "get", {idsStr: idsStr}).done(function (response) {
|
||||
okUtils.ajax(okUtils.mockApi.user.batchStop, "put", {idsStr: idsStr}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("批量停用成功");
|
||||
}).fail(function (error) {
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
layer.close(index);
|
||||
var idsStr = okUtils.table.batchCheck(table);
|
||||
if (idsStr) {
|
||||
okUtils.ajax("../../data/user/batchDel.json", "get", {idsStr: idsStr}).done(function (response) {
|
||||
okUtils.ajax(okUtils.mockApi.user.batchDel, "delete", {idsStr: idsStr}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("批量删除成功");
|
||||
}).fail(function (error) {
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
|
||||
function del (id) {
|
||||
okLayer.confirm("确定要删除吗?", function () {
|
||||
okUtils.ajax("../../data/user/batchDel.json", "get", {idsStr: id}).done(function (response) {
|
||||
okUtils.ajax(okUtils.mockApi.user.batchDel, "delete", {idsStr: id}).done(function (response) {
|
||||
console.log(response)
|
||||
okUtils.table.successMsg("删除成功");
|
||||
}).fail(function (error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue