1、系统新增页面水印功能,有效对信息防泄漏,可在系统配置中设置是否开启。
2、优化安装体验。
This commit is contained in:
parent
d70ff634c3
commit
19fd5daded
@ -46,7 +46,7 @@ class Index extends BaseController
|
||||
\think\facade\Cache::tag('adminMenu')->set('menu' . $this->uid, $list);
|
||||
}
|
||||
View::assign('menu', $list);
|
||||
View::assign('theme',$admin['theme']);
|
||||
View::assign('admin',$admin);
|
||||
View::assign('web',get_system_config('web'));
|
||||
return View();
|
||||
}
|
||||
|
@ -87,13 +87,23 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-3">开启新消息声音提醒</td>
|
||||
<td colspan="3">
|
||||
<td>
|
||||
{empty name="$config.msg_sound"}
|
||||
<input type="radio" name="msg_sound" value="1" title="开启">
|
||||
<input type="radio" name="msg_sound" value="0" title="不开启" checked>
|
||||
<input type="radio" name="msg_sound" value="1" title="开启" checked>
|
||||
<input type="radio" name="msg_sound" value="2" title="不开启">
|
||||
{else/}
|
||||
<input type="radio" name="msg_sound" value="1" title="开启" {eq name="$config.msg_sound" value="1"}checked{/eq}>
|
||||
<input type="radio" name="msg_sound" value="0" title="不开启" {eq name="$config.msg_sound" value="0"}checked{/eq}>
|
||||
<input type="radio" name="msg_sound" value="2" title="不开启" {eq name="$config.msg_sound" value="2"}checked{/eq}>
|
||||
{/empty}
|
||||
</td>
|
||||
<td class="layui-td-gray-3">开启系统页面水印</td>
|
||||
<td colspan="3">
|
||||
{empty name="$config.watermark"}
|
||||
<input type="radio" name="watermark" value="1" title="开启" checked>
|
||||
<input type="radio" name="watermark" value="2" title="不开启">
|
||||
{else/}
|
||||
<input type="radio" name="watermark" value="1" title="开启" {eq name="$config.watermark" value="1"}checked{/eq}>
|
||||
<input type="radio" name="watermark" value="2" title="不开启" {eq name="$config.watermark" value="2"}checked{/eq}>
|
||||
{/empty}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -122,7 +122,9 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const msg_sound = {$web.msg_sound|default=0};
|
||||
const msg_sound = {$web.msg_sound|default=1};
|
||||
const watermark = {$web.watermark|default=1};
|
||||
const watermarkTxt = '{$admin.name|default="勾股OA"} {:substr($admin.mobile, -4)}';
|
||||
const moduleInit = ['tool','admin'];
|
||||
function gouguInit() {
|
||||
let admin = layui.admin;
|
||||
@ -141,7 +143,9 @@
|
||||
}
|
||||
admin.loading();
|
||||
menuInit();
|
||||
|
||||
if(watermark==1){
|
||||
createWatermark();
|
||||
}
|
||||
$('#GouguApp').on("click",'[gg-event="logout"]',function () {
|
||||
layer.confirm('确认注销登录吗?', { icon: 7, title: '警告' }, function (index) {
|
||||
//注销
|
||||
@ -230,6 +234,32 @@
|
||||
})
|
||||
}, 10000);
|
||||
}
|
||||
function createWatermark(){
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = 300;
|
||||
canvas.height = 200;
|
||||
var ctx = canvas.getContext('2d');
|
||||
ctx.font = '14px Arial';
|
||||
ctx.fillStyle = '#dddddd';
|
||||
ctx.textAlign = 'left';
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.rotate(15 * Math.PI / 180);
|
||||
ctx.fillText(watermarkTxt, 20, 50);
|
||||
ctx.fillText(watermarkTxt, 180, 120);
|
||||
var dataURL = canvas.toDataURL('image/png');
|
||||
let node = document.createElement("div");
|
||||
node.style.pointerEvents = "none";
|
||||
node.style.position = "fixed";
|
||||
node.style.width = "100%";
|
||||
node.style.height = "100%";
|
||||
node.style.top = "0";
|
||||
node.style.left = "0";
|
||||
node.style.opacity = "0.382";
|
||||
node.style.zIndex = "998";
|
||||
node.style.background = 'url("' + dataURL + '") 0 0 repeat';
|
||||
// 将创建的元素插入body中,作为body的子元素
|
||||
document.body.appendChild(node);
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -26,7 +26,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">ThinkPHP版本</td>
|
||||
<td colspan="3">{$TP_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://doc.thinkphp.cn/v6_1/default.html" target="_blank">TP6文档</a></td>
|
||||
<td colspan="3">{$TP_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://doc.thinkphp.cn/v8_0/preface.html" target="_blank">TP8文档</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">Layui版本</td>
|
||||
@ -38,15 +38,17 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">QQ交流群</td>
|
||||
<td colspan="3">搜Q群:24641076(满),46924914<br>或点击 <a href="https://jq.qq.com/?_wv=1027&k=aCESqWHQ" target="_blank" rel="nofollow"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="gougucms交流群" title="点击链接加入群聊【勾股开源交流群】" style="vertical-align:middle"></a></td>
|
||||
<td colspan="3">搜Q群:24641076(满),46924914(满),295256660<br>或点击 <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=vb-Jdu0e-7iAAxbqGczDg1xFjxbdBsip&authKey=lwlNHAZiUOK2Rua5B14KhfwoYcvpQtHnlWMAJAbQRhfg3YQOUVIFEmfxpbhcCQw%2F&noverify=0&group_code=295256660" target="_blank" rel="nofollow"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="gougucms交流群" title="点击链接加入群聊【勾股开源交流群】" style="vertical-align:middle"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">同系列开源软件</td>
|
||||
<td colspan="3"><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/gougucms" target="_blank">勾股CMS</a><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/blog" target="_blank">勾股BLOG</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/dev" target="_blank" style="margin-right:8px">勾股DEV</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/guoguadmin" target="_blank">勾股ADMIN</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-td">🍗🍗<br/>给作者加鸡腿<br/>🍗🍗</td>
|
||||
<td colspan="3">
|
||||
<td colspan="4" style="text-align:center; color:#D2873D">🍗🍗 <strong>给作者加鸡腿 </strong>🍗🍗</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<img src="https://www.gougucms.com/static/home/images/zfb.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center /><img src="https://www.gougucms.com/static/home/images/wx.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center />
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="layui-side layui-side-menu layui-side-{$theme}">
|
||||
<div class="layui-side layui-side-menu layui-side-{$admin.theme}">
|
||||
<div class="layui-logo" gg-event="closeAllTabs">
|
||||
<img src="{$web.logo|default=''}" onerror="javascript:this.src='{__IMG__}/syslogo.png';this.onerror=null;" style="height: 40px;" class="syslogo">
|
||||
<img src="{$web.small_logo|default=''}" onerror="javascript:this.src='{__IMG__}/syslogo_small.png';this.onerror=null;" style="height: 40px;" class="logo">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="layui-side layui-side-expand layui-side-{$theme}">
|
||||
<div class="layui-side layui-side-expand layui-side-{$admin.theme}">
|
||||
<div class="layui-logo" gg-event="closeAllTabs">
|
||||
<img src="{$web.logo|default=''}" onerror="javascript:this.src='{__IMG__}/syslogo.png';this.onerror=null;" style="height: 38px;" class="syslogo">
|
||||
<img src="{$web.small_logo|default=''}" onerror="javascript:this.src='{__IMG__}/syslogo_small.png';this.onerror=null;" style="height: 38px;" class="logo">
|
||||
|
@ -208,6 +208,7 @@ return [
|
||||
if (false == file_put_contents(CMS_ROOT . "config/install.lock", '勾股OA安装鉴定文件,请勿删除!!!!!此次安装时间为:' . date('Y-m-d H:i:s', time()))) {
|
||||
return to_assign(1, '创建安装鉴定文件失败,请检查目录权限');
|
||||
}
|
||||
return to_assign();
|
||||
$domain = get_system_config('web','domain');
|
||||
return to_assign(0,'安装完成',$domain);
|
||||
}
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ CREATE TABLE `oa_config` (
|
||||
-- ----------------------------
|
||||
-- Records of oa_config
|
||||
-- ----------------------------
|
||||
INSERT INTO `oa_config` VALUES (1, '网站配置', 'web', 'a:13:{s:2:"id";s:1:"1";s:11:"admin_title";s:8:"勾股OA";s:9:"menu_mode";s:9:"classical";s:6:"domain";s:23:"https://oa.gougucms.com";s:4:"logo";s:31:"/static/home/images/syslogo.png";s:4:"file";s:0:"";s:10:"small_logo";s:37:"/static/home/images/syslogo_small.png";s:3:"icp";s:21:"粤ICP备xxxxxxx号-1";s:5:"beian";s:27:"粤公网安备xxxxxxx号-1";s:8:"keywords";s:8:"勾股OA";s:4:"desc";s:550:"勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理、消息管理、审批管理、日常办公、客户管理、合同管理、项目管理、财务管理、知识管理、附件管理等模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。";s:7:"version";s:6:"4.0.24";s:9:"copyright";s:36:"© 2023 gougucms.com GPL-3.0 license";}', 1, 1612514630, 1638010154);
|
||||
INSERT INTO `oa_config` VALUES (1, '网站配置', 'web', 'a:15:{s:2:"id";s:1:"1";s:11:"admin_title";s:8:"勾股OA";s:9:"menu_mode";s:9:"classical";s:6:"domain";s:24:"https://www.gougucms.com";s:4:"logo";s:31:"/static/home/images/syslogo.png";s:4:"file";s:0:"";s:10:"small_logo";s:37:"/static/home/images/syslogo_small.png";s:3:"icp";s:21:"粤ICP备xxxxxxx号-1";s:5:"beian";s:27:"粤公网安备xxxxxxx号-1";s:8:"keywords";s:8:"勾股OA";s:4:"desc";s:550:"勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理、消息管理、审批管理、日常办公、客户管理、合同管理、项目管理、财务管理、知识管理、附件管理等模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。";s:7:"version";s:6:"4.0.24";s:9:"copyright";s:36:"© 2023 gougucms.com GPL-3.0 license";s:9:"msg_sound";s:1:"1";s:9:"watermark";s:1:"1";}', 1, 1612514630, 1638010154);
|
||||
INSERT INTO `oa_config` VALUES (2, '邮箱配置', 'email', 'a:8:{s:2:\"id\";s:1:\"2\";s:4:\"smtp\";s:11:\"smtp.qq.com\";s:9:\"smtp_port\";s:3:\"465\";s:9:\"smtp_user\";s:15:\"gougucms@qq.com\";s:8:\"smtp_pwd\";s:6:\"123456\";s:4:\"from\";s:24:\"勾股CMS系统管理员\";s:5:\"email\";s:18:\"admin@gougucms.com\";s:8:\"template\";s:485:\"<p>勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。</p>\";}', 1, 1612521657, 1637075205);
|
||||
INSERT INTO `oa_config` VALUES (3, 'Api Token配置', 'token', 'a:5:{s:2:\"id\";s:1:\"3\";s:3:\"iss\";s:15:\"oa.gougucms.com\";s:3:\"aud\";s:7:\"gouguoa\";s:7:\"secrect\";s:7:\"GOUGUOA\";s:7:\"exptime\";s:4:\"3600\";}', 1, 1627313142, 1638010233);
|
||||
INSERT INTO `oa_config` VALUES (4, '其他配置', 'other', 'a:3:{s:2:\"id\";s:1:\"5\";s:6:\"author\";s:15:\"勾股工作室\";s:7:\"version\";s:13:\"v1.2021.07.28\";}', 1, 1613725791, 1635953640);
|
||||
|
@ -133,9 +133,9 @@
|
||||
form = layui.form,
|
||||
element = layui.element;
|
||||
var n = 0;
|
||||
function install_ajax(){
|
||||
function install_ajax(data){
|
||||
$.ajax({
|
||||
url:"https://www.gougucms.com/index.php?s=home/get_module/install_ajax",
|
||||
url:data+"/index.php?s=home/get_module/install_ajax",
|
||||
dataType:'jsonp',
|
||||
data:{'name':'勾股OA'},
|
||||
jsonp:'callback',
|
||||
@ -175,7 +175,7 @@
|
||||
element.progress('demo', 100 + '%');
|
||||
$('#form').hide();
|
||||
$('#complete').show();
|
||||
install_ajax();
|
||||
install_ajax(res.data);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
@ -186,7 +186,6 @@
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user