1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- /**
- * Created by PhpStorm.
- * User: xiaofeng
- * Date: 2018/3/6
- * Time: 下午5:49
- */
- use backend\assets\AppAsset;
- AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/other/watermark.js')
- ?>
- <style>
- .xm_qytc_box{width:920px;margin:20px auto 0 auto;}
- .layui_w_box {width:230px;padding:15px 0;}
- .layui-code, .layui-upload-list {margin-top:0;}
- form {margin-left:20px;}
- </style>
- <div class="xm_qytc_box">
- <span style="font-size:20px;">水印设置</span>
- <hr class="layui-bg-blue">
- <form class="layui-form layui-form-pane" id="start_form" action="">
- <div class="layui-form-item">
- <div class="layui-inline" >
- <label class="layui-form-label" style="width: 140px;">水印类型:</label>
- <input type="checkbox" class="xm_xcxqTc_button" checked name="type" value="1" title="图片" >
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-inline" >
- <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>水印位置:</label>
- <input type="checkbox" name="status" value="1" checked title="水印开启">
- </div>
- <div class="layui_w_box" >
- <?php foreach($position as $key=>$val){?>
- <input type="radio" name="position" value="<?php echo $key?>" <?php if($key == $model['position']) echo 'checked' ?> title="<?php echo $val ?>">
- <?php }?>
- </div>
- </div>
- <div class="layui-form-item" >
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>禁止水印宽度:</label>
- <div class="layui-input-block" style="float: left;margin-left: 10px;width:180px;">
- <input type="text" name="width" required value="<?php echo $model['width'] ?>" lay-verify="required" placeholder="输入宽度" autocomplete="off" class="layui-input" style="width:105%;">
- </div>
- <span style="color:#999;padding-left:15px;line-height:38px;color:#a89898">如果图片宽度小于该值将不会添加水印</span>
- </div>
- </div>
- <div class="layui-form-item" >
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>禁止水印高度:</label>
- <div class="layui-input-block" style="float: left;margin-left: 10px;width:180px;">
- <input type="text" name="height" required value="<?php echo $model['height'] ?>" lay-verify="required" placeholder="输入高度" autocomplete="off" class="layui-input" style="width:105%;">
- </div>
- <span style="color:#999;padding-left:15px;line-height:38px;color:#a89898">如果图片高度小于该值将不会添加水印</span>
- </div>
- </div>
- <div class="layui-form-item" >
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 140px;">间距:</label>
- <div class="layui-input-block" style="float: left;margin-left: 10px;width:180px;">
- <input type="text" name="spacing" value="<?php echo $model['spacing'] ?>" placeholder="默认为20" autocomplete="off" class="layui-input" style="width:105%;">
- </div>
- <span style="color:#999;padding-left:15px;line-height:38px;color:#a89898">如果图片高度小于该值将不会添加水印</span>
- </div>
- </div>
- <div class="layui-form-item xm_pr">
- <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>水印图片:</label>
- <div class="layui-inline">
- <div class="layui-inline">
- <div class="layui-upload">
- <div class="layui-upload-list" style="width:249px;height:80px;line-height:80px;padding:0 15px;margin-left:10px;border:1px solid #d2d2d2;background:rgba(0,0,0,0.3)">
- <img class="layui-upload-img" id="demo1" src="<?php echo '/'.$model['template'] ?>" style="width:249px;height:26px;">
- </div>
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-upload">
- <button type="button" field="aaa" class="layui-btn layui-btn-primary" id="test1">上传图片</button>
- </div>
- </div>
- </div>
- </div>
- <hr class="layui-bg-blue">
- <div class="layui-form-item">
- <div class="layui-input-block xm_xcxqTc_tj" style="margin:20px 0 0 0;text-align:center;">
- <input type="hidden" name="id" value="<?php echo $model['id'] ?>">
- <button class="layui-btn" lay-submit="" lay-filter="watermark">提交</button>
- </div>
- </div>
- </form>
- </div>
|