提交 efade0d5 编写于 作者: doc_wei's avatar doc_wei

静态主题完成

上级 a3224028
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/eve?characterEncoding=utf-8
jdbc.username=root
jdbc.password=123456
jdbc.password=admin
validationQuery=SELECT 1
jdbc.maxActive=10
......
/**
@Name:主题设置
@Author:Leo
@License:MIT
*/
layui.use(['layer', 'form'], function (exports) {
var $ = layui.jquery, form = layui.form, unfinished = '暂未实现';
$(function () {
winui.renderColor();
winui.tab.init();
//设置预览背景为当前背景
$('.background-preview').css('background-image', layui.jquery('body').css('background-image'));
//设置锁屏预览背景为当前锁屏预览背景
$('.lockscreen-preview').css('background-image', 'url(' + winui.getSetting('lockBgSrc') + ')');
//设置主题预览中任务栏位置
var taskbarMode = winui.getSetting('taskbarMode');
$('.taskbar-position input[value=' + taskbarMode + ']').prop('checked', true);
//设置主题预览中开始菜单尺寸
var startSize = winui.getSetting('startSize');
$('.start-size input[value=' + startSize + ']').prop('checked', true);
$('.preview-start').removeClass('xs sm lg');
$('.preview-start').addClass(startSize);
form.render();
//预览锁屏界面
var Week = ['', '', '', '', '', '', ''];
var dateTime = new Date();
$('.lockscreen-preview-time').html('<p id="time">' + (dateTime.getHours() > 9 ? dateTime.getHours().toString() : '0' + dateTime.getHours()) + ':' + (dateTime.getMinutes() > 9 ? dateTime.getMinutes().toString() : '0' + dateTime.getMinutes()) + '</p><p id="date">' + (dateTime.getMonth() + 1) + '' + dateTime.getDate() + '日,星期' + Week[dateTime.getDay()] + '</p>');
});
//背景图片点击
$('.background-choose>img').on('click', function () {
//获取当前图片路径
var bgSrc = $(this).prop('src');
//改变预览背景
$('.background-preview').css('background-image', 'url(' + bgSrc + ')');
//改变父页面背景
winui.resetBg(bgSrc);
})
//背景图片上传
$('.background-upload').on('click', function () {
var input = $(this).prev('input[type=file]');
input.trigger('click');
input.on('change', function () {
var src = $(this).val();
if (src) {
layer.msg('选择了路径【' + src + '】下的图片,返回一张性感的Girl给你')
//改变预览背景
$('.background-preview').css('background-image', 'url(images/sexy_girl.jpg)');
//改变父页面背景
winui.resetBg('images/sexy_girl.jpg');
$(this).val('').off('change');
}
})
});
//锁屏界面点击
$('.lockscreen-choose>img').on('click', function () {
//获取当前图片路径
var bgSrc = $(this).prop('src');
//改变锁屏预览
$('.lockscreen-preview').css('background-image', 'url(' + bgSrc + ')');
//设置锁屏背景
winui.resetLockBg(bgSrc);
})
//锁屏界面图片上传
$('.lockscreen-upload').on('click', function () {
var input = $(this).prev('input[type=file]');
input.trigger('click');
input.on('change', function () {
var src = $(this).val();
if (src) {
layer.msg('选择了路径【' + src + '】下的图片,返回一张性感的Girl给你')
//改变锁屏预览
$('.lockscreen-preview').css('background-image', 'url(images/sexy_girl.jpg');
//设置锁屏背景
winui.resetLockBg('images/sexy_girl.jpg');
$(this).val('').off('change');
}
})
});
//颜色选择
$('.color-choose>div').on('click', function () {
var color = Number($(this)[0].classList[0].replace('theme-color-', ''));
winui.resetColor(color);
});
form.on('switch(toggleTransparent)', function (data) {
if (data.elem.checked) {
$(data.elem).siblings('span').text('');
} else {
$(data.elem).siblings('span').text('');
}
layer.msg(unfinished);
});
form.on('switch(toggleTaskbar)', function (data) {
if (data.elem.checked) {
$(data.elem).siblings('span').text('');
} else {
$(data.elem).siblings('span').text('');
}
});
//任务栏位置
form.on('radio(taskPosition)', function (data) {
switch (data.value) {
case 'top':
winui.resetTaskbar(data.value);
break;
case 'bottom':
winui.resetTaskbar(data.value);
break;
case 'left':
winui.window.msg(unfinished);
break;
case 'right':
winui.window.msg(unfinished);
break;
default:
}
});
//开始菜单尺寸
form.on('radio(startSize)', function (data) {
winui.resetStartSize(data.value);
});
});
\ No newline at end of file
......@@ -530,7 +530,7 @@ layui.define(['layer', 'winui'], function (exports) {
//打开主题设置窗口
winLayer.openTheme = function () {
var that = this;
$.get(winui.path + '../../../tpl/index/theme.html', {}, function (content) {
$.get(winui.path + '../../../tpl/systheme/systheme.html', {}, function (content) {
that.open({
id: 'winui-theme',
type: 1,
......
{
"code": 1,
"message": "成功",
"data": [
{
"title": "主题",
"pageURL": "theme",
"name": "主题",
"icon": "fa-television",
"openType": 1,
"extend": false,
"childs": null,
"id": 1
},
{
"title": "打赏作者",
"pageURL": "/home/reward",
"name": "打赏作者",
"icon": "fa-qrcode",
"openType": 1,
"extend": false,
"childs": null,
"id": 3
},
{
"title": "基本说明",
"pageURL": "demo/introduce.html",
"name": "基本说明",
"icon": "fa-info-circle",
"openType": 2,
"extend": false,
"childs": null,
"id": 4
},
{
"title": "点赞",
"pageURL": "http://fly.layui.com/case/u/3547992",
"name": "点赞",
"icon": "fa-thumbs-up",
"openType": 2,
"extend": false,
"childs": null,
"id": 62
},
{
"title": "不落阁",
"pageURL": "http://www.lyblogs.cn",
"name": "作者博客",
"icon": "http://www.lyblogs.cn/Images/Global/Logo_40.png",
"openType": 2,
"extend": false,
"childs": null,
"id": 66
},
{
"title": "系统设置",
"pageURL": null,
"name": "系统设置",
"icon": "fa-cog",
"openType": 1,
"extend": false,
"childs": [
{
"title": "系统菜单",
"pageURL": "menu/list_iframe.html",
"name": "系统菜单",
"icon": "fa-navicon",
"openType": 2,
"extend": false,
"childs": null,
"id": 2
},
{
"title": "操作员管理",
"pageURL": "/operator/index",
"name": "操作员管理",
"icon": "fa-user",
"openType": 1,
"extend": false,
"childs": null,
"id": 19
},
{
"title": "角色管理",
"pageURL": "role/list.html",
"name": "角色管理",
"icon": "fa-th-large",
"openType": 2,
"extend": false,
"childs": null,
"id": 22
}
],
"id": 23
},
{
"title": "Font Awesome图标展示",
"pageURL": null,
"name": "Font Awesome图标展示",
"icon": "fa-user",
"openType": 1,
"extend": false,
"childs": [
{
"title": "图片",
"pageURL": null,
"name": "图片",
"icon": "fa-photo",
"openType": 1,
"extend": false,
"childs": null,
"id": 28
},
{
"title": "书签",
"pageURL": null,
"name": "书签",
"icon": "fa-bookmark",
"openType": 1,
"extend": false,
"childs": null,
"id": 29
},
{
"title": "日历",
"pageURL": null,
"name": "日历",
"icon": "fa-calendar",
"openType": 1,
"extend": false,
"childs": null,
"id": 30
},
{
"title": "评论",
"pageURL": null,
"name": "评论",
"icon": "fa-comments",
"openType": 1,
"extend": false,
"childs": null,
"id": 31
},
{
"title": "邮件",
"pageURL": null,
"name": "邮件",
"icon": "fa-envelope",
"openType": 1,
"extend": false,
"childs": null,
"id": 32
},
{
"title": "桌面",
"pageURL": null,
"name": "桌面",
"icon": "fa-desktop",
"openType": 1,
"extend": false,
"childs": null,
"id": 33
},
{
"title": "下载",
"pageURL": null,
"name": "下载",
"icon": "fa-download",
"openType": 1,
"extend": false,
"childs": null,
"id": 34
},
{
"title": "设置",
"pageURL": null,
"name": "设置",
"icon": "fa-cog",
"openType": 1,
"extend": false,
"childs": null,
"id": 35
},
{
"title": "信息",
"pageURL": null,
"name": "信息",
"icon": "fa-info-circle",
"openType": 1,
"extend": false,
"childs": null,
"id": 36
},
{
"title": "图表1",
"pageURL": null,
"name": "图表1",
"icon": "fa-line-chart",
"openType": 1,
"extend": false,
"childs": null,
"id": 37
},
{
"title": "图表2",
"pageURL": null,
"name": "图表2",
"icon": "fa-bar-chart",
"openType": 1,
"extend": false,
"childs": null,
"id": 38
},
{
"title": "图表3",
"pageURL": null,
"name": "图表3",
"icon": "fa-pie-chart",
"openType": 1,
"extend": false,
"childs": null,
"id": 39
},
{
"title": "标签",
"pageURL": null,
"name": "标签",
"icon": "fa-tags",
"openType": 1,
"extend": false,
"childs": null,
"id": 40
},
{
"title": "垃圾",
"pageURL": null,
"name": "垃圾",
"icon": "fa-trash",
"openType": 1,
"extend": false,
"childs": null,
"id": 41
},
{
"title": "医疗",
"pageURL": null,
"name": "医疗",
"icon": "fa-medkit",
"openType": 1,
"extend": false,
"childs": null,
"id": 42
}
],
"id": 27
},
{
"title": "Font Awesome第三方LOGO",
"pageURL": null,
"name": "Font Awesome第三方LOGO",
"icon": "fa-edge",
"openType": 1,
"extend": false,
"childs": [
{
"title": "苹果",
"pageURL": null,
"name": "苹果",
"icon": "fa-apple",
"openType": 1,
"extend": false,
"childs": null,
"id": 44
},
{
"title": "Google Chrome",
"pageURL": null,
"name": "Google Chrome",
"icon": "fa-chrome",
"openType": 1,
"extend": false,
"childs": null,
"id": 45
},
{
"title": "Microsoft Edge",
"pageURL": null,
"name": "Microsoft Edge",
"icon": "fa-edge",
"openType": 1,
"extend": false,
"childs": null,
"id": 46
},
{
"title": "腾讯QQ",
"pageURL": null,
"name": "腾讯QQ",
"icon": "fa-qq",
"openType": 1,
"extend": false,
"childs": null,
"id": 47
},
{
"title": "新浪微博",
"pageURL": null,
"name": "新浪微博",
"icon": "fa-weibo",
"openType": 1,
"extend": false,
"childs": null,
"id": 48
},
{
"title": "Microsoft Windows",
"pageURL": null,
"name": "Microsoft Windows",
"icon": "fa-windows",
"openType": 1,
"extend": false,
"childs": null,
"id": 49
},
{
"title": "微信",
"pageURL": null,
"name": "微信",
"icon": "fa-wechat",
"openType": 1,
"extend": false,
"childs": null,
"id": 50
},
{
"title": "Skype",
"pageURL": null,
"name": "Skype",
"icon": "fa-skype",
"openType": 1,
"extend": false,
"childs": null,
"id": 51
},
{
"title": "Github",
"pageURL": null,
"name": "Github",
"icon": "fa-github",
"openType": 1,
"extend": false,
"childs": null,
"id": 52
}
],
"id": 43
},
{
"title": "自定义图片菜单",
"pageURL": null,
"name": "自定义图片菜单",
"icon": "../assets/images/logo_100.png",
"openType": 1,
"extend": false,
"childs": [
{
"title": "腾讯QQ",
"pageURL": null,
"name": "腾讯QQ",
"icon": "images/qq_32.png",
"openType": 1,
"extend": false,
"childs": null,
"id": 54
},
{
"title": "新浪微博",
"pageURL": null,
"name": "新浪微博",
"icon": "images/weibo_32.png",
"openType": 1,
"extend": false,
"childs": null,
"id": 55
},
{
"title": "QQ空间",
"pageURL": null,
"name": "QQ空间",
"icon": "images/qzone_32.png",
"openType": 1,
"extend": false,
"childs": null,
"id": 56
}
],
"id": 53
}
]
}
\ No newline at end of file
{
"code": 1,
"message": "成功",
"data": [
{
"title": "主题",
"pageURL": "theme",
"name": "主题",
"icon": "fa-television",
"openType": 1,
"maxOpen": -1,
"extend": false,
"childs": null,
"id": 1
},
{
"title": "打赏作者",
"pageURL": "/home/reward",
"name": "打赏作者",
"icon": "fa-qrcode",
"openType": 1,
"maxOpen": -1,
"extend": false,
"childs": null,
"id": 3
},
{
"title": "基本说明",
"pageURL": "demo/introduce.html",
"name": "基本说明",
"icon": "fa-info-circle",
"openType": 2,
"maxOpen": -1,
"extend": false,
"childs": null,
"id": 4
},
{
"title": "系统菜单",
"pageURL": "menu/list_iframe.html",
"name": "系统菜单",
"icon": "fa-navicon",
"openType": 2,
"maxOpen": -1,
"extend": false,
"childs": null,
"id": 2
},
{
"title": "角色管理",
"pageURL": "role/list.html",
"name": "角色管理",
"icon": "fa-th-large",
"openType": 2,
"maxOpen": -1,
"extend": false,
"childs": null,
"id": 22
},
{
"title": "点赞",
"pageURL": "http://fly.layui.com/case/u/3547992",
"name": "点赞",
"icon": "fa-thumbs-up",
"openType": 2,
"extend": false,
"childs": null,
"id": 62
},
{
"title": "Layui框架",
"pageURL": "http://www.layui.com/",
"name": "Layui",
"icon": "http://www.layui.com/favicon.ico",
"openType": 2,
"extend": false,
"childs": null,
"id": 57
},
{
"title": "ECharts",
"pageURL": "echarts/demo.html",
"name": "ECharts",
"icon": "fa-bar-chart",
"openType": 2,
"extend": false,
"childs": null,
"id": 58
}
]
}
\ No newline at end of file
/*!
@Description:Win10风格前端模板
*/
; !function () {
......

layui.config({
base: basePath,
version: skyeyeVersion
}).define(['table', 'jquery', 'winui', 'fileUpload'], function (exports) {
winui.renderColor();
layui.use(['layer', 'form'], function (exports) {
var $ = layui.jquery, form = layui.form, unfinished = '暂未实现';
$(function () {
winui.renderColor();
winui.tab.init();
//设置预览背景为当前背景
$('.background-preview').css('background-image', layui.jquery('body').css('background-image'));
//设置锁屏预览背景为当前锁屏预览背景
$('.lockscreen-preview').css('background-image', 'url(' + winui.getSetting('lockBgSrc') + ')');
//设置主题预览中任务栏位置
var taskbarMode = winui.getSetting('taskbarMode');
$('.taskbar-position input[value=' + taskbarMode + ']').prop('checked', true);
//设置主题预览中开始菜单尺寸
var startSize = winui.getSetting('startSize');
$('.start-size input[value=' + startSize + ']').prop('checked', true);
$('.preview-start').removeClass('xs sm lg');
$('.preview-start').addClass(startSize);
form.render();
//预览锁屏界面
var Week = ['', '', '', '', '', '', ''];
var dateTime = new Date();
$('.lockscreen-preview-time').html('<p id="time">' + (dateTime.getHours() > 9 ? dateTime.getHours().toString() : '0' + dateTime.getHours()) + ':' + (dateTime.getMinutes() > 9 ? dateTime.getMinutes().toString() : '0' + dateTime.getMinutes()) + '</p><p id="date">' + (dateTime.getMonth() + 1) + '' + dateTime.getDate() + '日,星期' + Week[dateTime.getDay()] + '</p>');
});
//背景图片点击
$('.background-choose>img').on('click', function () {
//获取当前图片路径
var bgSrc = $(this).prop('src');
//改变预览背景
$('.background-preview').css('background-image', 'url(' + bgSrc + ')');
//改变父页面背景
winui.resetBg(bgSrc);
})
//背景图片上传
$('.background-upload').on('click', function () {
var input = $(this).prev('input[type=file]');
input.trigger('click');
input.on('change', function () {
var src = $(this).val();
if (src) {
layer.msg('选择了路径【' + src + '】下的图片,返回一张性感的Girl给你')
//改变预览背景
$('.background-preview').css('background-image', 'url(images/sexy_girl.jpg)');
//改变父页面背景
winui.resetBg('images/sexy_girl.jpg');
$(this).val('').off('change');
}
})
});
//锁屏界面点击
$('.lockscreen-choose>img').on('click', function () {
//获取当前图片路径
var bgSrc = $(this).prop('src');
//改变锁屏预览
$('.lockscreen-preview').css('background-image', 'url(' + bgSrc + ')');
//设置锁屏背景
winui.resetLockBg(bgSrc);
})
//锁屏界面图片上传
$('.lockscreen-upload').on('click', function () {
var input = $(this).prev('input[type=file]');
input.trigger('click');
input.on('change', function () {
var src = $(this).val();
if (src) {
layer.msg('选择了路径【' + src + '】下的图片,返回一张性感的Girl给你')
//改变锁屏预览
$('.lockscreen-preview').css('background-image', 'url(images/sexy_girl.jpg');
//设置锁屏背景
winui.resetLockBg('images/sexy_girl.jpg');
$(this).val('').off('change');
}
})
});
//颜色选择
$('.color-choose>div').on('click', function () {
var color = Number($(this)[0].classList[0].replace('theme-color-', ''));
winui.resetColor(color);
});
form.on('switch(toggleTransparent)', function (data) {
if (data.elem.checked) {
$(data.elem).siblings('span').text('');
} else {
$(data.elem).siblings('span').text('');
}
layer.msg(unfinished);
});
form.on('switch(toggleTaskbar)', function (data) {
if (data.elem.checked) {
$(data.elem).siblings('span').text('');
} else {
$(data.elem).siblings('span').text('');
}
});
//任务栏位置
form.on('radio(taskPosition)', function (data) {
switch (data.value) {
case 'top':
winui.resetTaskbar(data.value);
break;
case 'bottom':
winui.resetTaskbar(data.value);
break;
case 'left':
winui.window.msg(unfinished);
break;
case 'right':
winui.window.msg(unfinished);
break;
default:
}
});
//开始菜单尺寸
form.on('radio(startSize)', function (data) {
winui.resetStartSize(data.value);
});
});
});
\ No newline at end of file
......@@ -338,4 +338,4 @@
</div>
</div>
<script src="../assets/lib/winui/js/theme.js" type="text/javascript"></script>
\ No newline at end of file
<script src="../../js/systheme/systheme.js" type="text/javascript"></script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册