index.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/6
  6. * Time: 下午5:49
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/oher/watermark.js')
  10. ?>
  11. <style>
  12. .xm_qytc_box{width:920px;margin:20px auto 0 auto;}
  13. .layui_w_box {width:230px;padding:15px 0;}
  14. .layui-code, .layui-upload-list {margin-top:0;}
  15. form {margin-left:20px;}
  16. </style>
  17. <div class="xm_qytc_box">
  18. <span style="font-size:20px;">水印设置</span>
  19. <hr class="layui-bg-blue">
  20. <form class="layui-form layui-form-pane" id="start_form" action="">
  21. <div class="layui-form-item">
  22. <div class="layui-inline" >
  23. <label class="layui-form-label" style="width: 140px;">水印类型:</label>
  24. <input type="checkbox" class="xm_xcxqTc_button" checked name="picture" title="图片" >
  25. </div>
  26. </div>
  27. <div class="layui-form-item">
  28. <div class="layui-inline" >
  29. <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>水印位置:</label>
  30. <input type="checkbox" name="start" value="水印开启" checked title="水印开启">
  31. </div>
  32. <div class="layui_w_box" >
  33. <?php foreach($position as $key=>$val){?>
  34. <input type="radio" name="sex" value="<?php echo $key?>" <?php if($val == $model['position']) echo 'checked' ?> title="<?php echo $val ?>">
  35. <?php }?>
  36. </div>
  37. </div>
  38. <div class="layui-form-item" >
  39. <div class="layui-inline">
  40. <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>禁止水印宽度:</label>
  41. <div class="layui-input-block" style="float: left;margin-left: 10px;width:180px;">
  42. <input type="text" name="figure_wide" required value="<?php echo $model['width'] ?>" lay-verify="required" placeholder="输入宽度" autocomplete="off" class="layui-input" style="width:105%;">
  43. </div>
  44. <span style="color:#999;padding-left:15px;line-height:38px;color:#a89898">如果图片宽度小于该值将不会添加水印</span>
  45. </div>
  46. </div>
  47. <div class="layui-form-item" >
  48. <div class="layui-inline">
  49. <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>禁止水印高度:</label>
  50. <div class="layui-input-block" style="float: left;margin-left: 10px;width:180px;">
  51. <input type="text" name="height" required value="<?php echo $model['height'] ?>" lay-verify="required" placeholder="输入高度" autocomplete="off" class="layui-input" style="width:105%;">
  52. </div>
  53. <span style="color:#999;padding-left:15px;line-height:38px;color:#a89898">如果图片高度小于该值将不会添加水印</span>
  54. </div>
  55. </div>
  56. <div class="layui-form-item xm_pr">
  57. <label class="layui-form-label" style="width: 140px;"><span style="color:red">*</span>水印图片:</label>
  58. <div class="layui-inline">
  59. <div class="layui-inline">
  60. <div class="layui-upload">
  61. <div class="layui-upload-list">
  62. <img class="layui-upload-img" id="demo1" src="" style="width:100px;height:80px;margin-left:10px;">
  63. </div>
  64. </div>
  65. </div>
  66. <div class="layui-inline">
  67. <div class="layui-upload">
  68. <button type="button" field="aaa" class="layui-btn layui-btn-primary" id="test1">上传图片</button>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <hr class="layui-bg-blue">
  74. <div class="layui-form-item">
  75. <div class="layui-input-block xm_xcxqTc_tj" style="margin:20px 0 0 0;text-align:center;">
  76. <button class="layui-btn" lay-submit="" lay-filter="watermark">提交</button>
  77. </div>
  78. </div>
  79. </form>
  80. </div>