| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:82:"D:\phpstudy_pro\WWW\minongyun\public/../application/admin\view\customer\index.html";i:1709714141;s:72:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\layout\default.html";i:1709714141;s:69:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\meta.html";i:1709714141;s:71:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\script.html";i:1711415624;}*/ ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta name="renderer" content="webkit">
- <meta name="referrer" content="never">
- <meta name="robots" content="noindex, nofollow">
- <link rel="shortcut icon" href="/assets/img/favicon.ico" />
- <!-- Loading Bootstrap -->
- <link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
- <?php if(\think\Config::get('fastadmin.adminskin')): ?>
- <link href="/assets/css/skins/<?php echo \think\Config::get('fastadmin.adminskin'); ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
- <?php endif; ?>
- <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
- <!--[if lt IE 9]>
- <script src="/assets/js/html5shiv.js"></script>
- <script src="/assets/js/respond.min.js"></script>
- <![endif]-->
- <script type="text/javascript">
- var require = {
- config: <?php echo json_encode($config); ?>
- };
- </script>
- </head>
- <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
- <div id="main" role="main">
- <div class="tab-content tab-addtabs">
- <div id="content">
- <div class="row">
- <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
- <section class="content-header hide">
- <h1>
- <?php echo __('Dashboard'); ?>
- <small><?php echo __('Control panel'); ?></small>
- </h1>
- </section>
- <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav') && \think\Config::get('fastadmin.breadcrumb')): ?>
- <!-- RIBBON -->
- <div id="ribbon">
- <ol class="breadcrumb pull-left">
- <?php if($auth->check('dashboard')): ?>
- <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
- <?php endif; ?>
- </ol>
- <ol class="breadcrumb pull-right">
- <?php foreach($breadcrumb as $vo): ?>
- <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
- <?php endforeach; ?>
- </ol>
- </div>
- <!-- END RIBBON -->
- <?php endif; ?>
- <div class="content">
- <div class="panel panel-default panel-intro">
- <?php echo build_heading(); ?>
- <div class="panel-body">
- <div id="myTabContent" class="tab-content">
- <div class="tab-pane fade active in" id="one">
- <div class="widget-body no-padding">
- <div id="toolbar" class="toolbar">
- <a href="javascript:;" class="btn btn-primary btn-refresh" title="<?php echo __('Refresh'); ?>" ><i class="fa fa-refresh"></i> </a>
- <a href="javascript:;" class="btn btn-success btn-add <?php echo $auth->check('customer/add')?'':'hide'; ?>" title="<?php echo __('Add'); ?>" ><i class="fa fa-plus"></i> <?php echo __('Add'); ?></a>
- <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled <?php echo $auth->check('customer/edit')?'':'hide'; ?>" title="<?php echo __('Edit'); ?>" ><i class="fa fa-pencil"></i> <?php echo __('Edit'); ?></a>-->
- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled <?php echo $auth->check('customer/del')?'':'hide'; ?>" title="<?php echo __('Delete'); ?>" ><i class="fa fa-trash"></i> <?php echo __('Delete'); ?></a>
-
- <!--<div class="dropdown btn-group <?php echo $auth->check('customer/multi')?'':'hide'; ?>">-->
- <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> <?php echo __('More'); ?></a>-->
- <!--<ul class="dropdown-menu text-left" role="menu">-->
- <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> <?php echo __('Set to normal'); ?></a></li>-->
- <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> <?php echo __('Set to hidden'); ?></a></li>-->
- <!--</ul>-->
- <!--</div>-->
-
- </div>
- <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
- data-show-toggle="false"
- data-operate-edit="<?php echo $auth->check('customer/edit'); ?>"
- data-operate-del="<?php echo $auth->check('customer/del'); ?>"
- width="100%">
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
- <input type="hidden" value="<?php echo \think\Session::get('admin.username'); ?>" name="" id="username">
- <input type="hidden" value="<?php echo \think\Session::get('admin.company'); ?>" name="" id="company">
- <script>
- function watermark(element, config) {
- // 获取元素的坐标
- function getOffset(el) {
- if (el.offsetParent) {
- return {
- x: el.offsetLeft + getOffset(el.offsetParent).x,
- y: el.offsetTop + getOffset(el.offsetParent).y,
- };
- }
- return {
- x: el.offsetLeft,
- y: el.offsetTop,
- };
- }
- if (!element) return;
- // 默认配置
- const _config = {
- text1: '张三', //文本1
- text2: '13868686868', // 文本2
- start_x: 0, // x轴起始位置
- start_y: 0, // y轴起始位置
- space_x: 100, // x轴间距
- space_y: 50, // y轴间距
- width: 210, // 宽度
- height: 80, // 长度
- fontSize: 14, // 字体
- color: '#aaa', // 字色
- alpha: 0.4, // 透明度
- rotate: 15, // 倾斜度
- };
- // 替换默认配置
- if (arguments.length === 2 && typeof arguments[1] === "object") {
- const src = arguments[1] || {};
- for (let key in src) {
- if (src[key] && _config[key] && src[key] === _config[key]) {
- continue;
- } else if (src[key]) {
- _config[key] = src[key];
- }
- }
- }
- // 节点的总宽度
- const total_width = element.scrollWidth;
- // 节点的总高度
- const total_height = element.scrollHeight;
- // 创建文本碎片,用于包含所有的插入节点
- const mark = document.createDocumentFragment();
- // 水印节点的起始坐标
- const position = getOffset(element);
- let x = position.x + _config.start_x, y = position.y + _config.start_y;
- // 先循环y轴插入水印
- do {
- // 再循环x轴插入水印
- do {
- // 创建单个水印节点
- const item = document.createElement('div');
- item.className = 'watermark-item';
- // 设置节点的样式
- item.style.position = "absolute";
- item.style.zIndex = 99999;
- item.style.left = `${x}px`;
- item.style.top = `${y}px`;
- item.style.width = `${_config.width}px`;
- item.style.height = `${_config.height}px`;
- item.style.fontSize = `${_config.fontSize}px`;
- item.style.color = _config.color;
- item.style.textAlign = 'center';
- item.style.opacity = _config.alpha;
- item.style.filter = `alpha(opacity=${_config.alpha * 100})`;
- // item.style.filter = `opacity(${_config.alpha * 100}%)`;
- item.style.webkitTransform = `rotate(-${_config.rotate}deg)`;
- item.style.MozTransform = `rotate(-${_config.rotate}deg)`;
- item.style.msTransform = `rotate(-${_config.rotate}deg)`;
- item.style.OTransform = `rotate(-${_config.rotate}deg)`;
- item.style.transform = `rotate(-${_config.rotate}deg)`;
- item.style.pointerEvents = 'none'; //让水印不遮挡页面的点击事件
- // 创建text1水印节点
- const text1 = document.createElement('div');
- text1.appendChild(document.createTextNode(_config.text1));
- item.append(text1);
- // 创建text2水印节点
- const text2 = document.createElement('div');
- text2.appendChild(document.createTextNode(_config.text2));
- item.append(text2);
- // 添加水印节点到文本碎片
- mark.append(item);
- // x坐标递增
- x = x + _config.width + _config.space_x;
- // 超出文本右侧坐标停止插入
- } while (total_width + position.x > x + _config.width);
- // 重置x初始坐标
- x = position.x + _config.start_x;
- // y坐标递增
- y = y + _config.height + _config.space_y;
- // 超出文本底部坐标停止插入
- } while (total_height + position.y > y + _config.height);
- // 插入文档碎片
- element.append(mark);
- }
- var username = document.getElementById('username');
- var company = document.getElementById('company');
- //找到存放水印的盒子
- const element = document.getElementsByTagName('body')[0];
- watermark(element,{text1:username.value,text2:company.value});
- </script>
- </body>
- </html>
|