You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
8.0 KiB

6 months ago
var projectName = '基于大数据的应届生求职系统';
/**
* 轮播图配置
*/
var swiper = {
// 设定轮播容器宽度,支持像素和百分比
width: '100%',
height: '400px',
// hover悬停显示
// always始终显示
// none始终不显示
arrow: 'none',
// default左右切换
// updown上下切换
// fade渐隐渐显切换
anim: 'default',
// 自动切换的时间间隔
// 默认3000
interval: 2000,
// 指示器位置
// inside容器内部
// outside容器外部
// none不显示
indicator: 'outside'
}
/**
* 个人中心菜单
*/
var centerMenu = [{
name: '个人中心',
url: '../' + localStorage.getItem('userTable') + '/center.html'
},
{
name: '我的收藏',
url: '../storeup/list.html'
}
]
var indexNav = [
{
name: '公司信息',
url: './pages/gongsixinxi/list.html'
},
{
name: '招聘信息',
url: './pages/zhaopinxinxi/list.html'
},
{
name: '通知公告',
url: './pages/tongzhigonggao/list.html'
},
]
var adminurl = "http://localhost:8080/django3qu6u/admin/dist/index.html";
var cartFlag = false
var chatFlag = false
var menu = [{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-addressbook","buttons":["新增","查看","修改","删除"],"menu":"求职者","menuJump":"列表","tableName":"qiuzhizhe"}],"menu":"求职者管理"},{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["新增","查看","修改","删除"],"menu":"公司","menuJump":"列表","tableName":"gongsi"}],"menu":"公司管理"},{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["查看","删除"],"menu":"公司信息","menuJump":"列表","tableName":"gongsixinxi"}],"menu":"公司信息管理"},{"child":[{"appFrontIcon":"cuIcon-goods","buttons":["查看","删除"],"menu":"招聘信息","menuJump":"列表","tableName":"zhaopinxinxi"}],"menu":"招聘信息管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除"],"menu":"投递简历","menuJump":"列表","tableName":"toudijianli"}],"menu":"投递简历管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除"],"menu":"面试邀请","menuJump":"列表","tableName":"mianshiyaoqing"}],"menu":"面试邀请管理"},{"child":[{"appFrontIcon":"cuIcon-pay","buttons":["查看","删除"],"menu":"面试结果","menuJump":"列表","tableName":"mianshijieguo"}],"menu":"面试结果管理"},{"child":[{"appFrontIcon":"cuIcon-clothes","buttons":["新增","查看","修改","删除"],"menu":"通知公告","menuJump":"列表","tableName":"tongzhigonggao"}],"menu":"通知公告管理"},{"child":[{"appFrontIcon":"cuIcon-paint","buttons":["查看","删除"],"menu":"可视化","menuJump":"列表","tableName":"keshihua"}],"menu":"可视化管理"},{"child":[{"appFrontIcon":"cuIcon-similar","buttons":["查看","修改","删除"],"menu":"轮播图管理","tableName":"config"}],"menu":"系统管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-goodsnew","buttons":["查看"],"menu":"公司信息列表","menuJump":"列表","tableName":"gongsixinxi"}],"menu":"公司信息模块"},{"child":[{"appFrontIcon":"cuIcon-pay","buttons":["查看","投递简历"],"menu":"招聘信息列表","menuJump":"列表","tableName":"zhaopinxinxi"}],"menu":"招聘信息模块"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看"],"menu":"通知公告列表","menuJump":"列表","tableName":"tongzhigonggao"}],"menu":"通知公告模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"否","hasFrontRegister":"否","roleName":"管理员","tableName":"users"},{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-flashlightopen","buttons":["新增","查看","修改","删除","导出"],"menu":"个人简历","menuJump":"列表","tableName":"gerenjianli"}],"menu":"个人简历管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除"],"menu":"投递简历","menuJump":"列表","tableName":"toudijianli"}],"menu":"投递简历管理"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看","删除","审核"],"menu":"面试邀请","menuJump":"列表","tableName":"mianshiyaoqing"}],"menu":"面试邀请管理"},{"child":[{"appFrontIcon":"cuIcon-pay","buttons":["查看","删除"],"menu":"面试结果","menuJump":"列表","tableName":"mianshijieguo"}],"menu":"面试结果管理"},{"child":[{"appFrontIcon":"cuIcon-paint","buttons":["查看"],"menu":"可视化","menuJump":"列表","tableName":"keshihua"}],"menu":"可视化管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-goodsnew","buttons":["查看"],"menu":"公司信息列表","menuJump":"列表","tableName":"gongsixinxi"}],"menu":"公司信息模块"},{"child":[{"appFrontIcon":"cuIcon-pay","buttons":["查看","投递简历"],"menu":"招聘信息列表","menuJump":"列表","tableName":"zhaopinxinxi"}],"menu":"招聘信息模块"},{"child":[{"appFrontIcon":"cuIcon-time","buttons":["查看"],"menu":"通知公告列表","menuJump":"列表","tableName":"tongzhigonggao"}],"menu":"通知公告模块"}],"hasBackLogin":"是","hasBackRegister":"是","hasFrontLogin":"是","hasFrontRegister":"是","roleName":"求职者","tableName":"qiuzhizhe"},{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-camera","buttons":["新增","查看","修改","删除"],"men
var isAuth = function (tableName,key) {
let role = localStorage.getItem("userTable");
let menus = menu;
for(let i=0;i<menus.length;i++){
if(menus[i].tableName==role){
for(let j=0;j<menus[i].backMenu.length;j++){
for(let k=0;k<menus[i].backMenu[j].child.length;k++){
if(tableName==menus[i].backMenu[j].child[k].tableName){
let buttons = menus[i].backMenu[j].child[k].buttons.join(',');
return buttons.indexOf(key) !== -1 || false
}
}
}
}
}
return false;
}
var isFrontAuth = function (tableName,key) {
let role = localStorage.getItem("userTable");
let menus = menu;
for(let i=0;i<menus.length;i++){
if(menus[i].tableName==role){
for(let j=0;j<menus[i].frontMenu.length;j++){
for(let k=0;k<menus[i].frontMenu[j].child.length;k++){
if(tableName==menus[i].frontMenu[j].child[k].tableName){
let buttons = menus[i].frontMenu[j].child[k].buttons.join(',');
return buttons.indexOf(key) !== -1 || false
}
}
}
}
}
return false;
}