popup.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/18
  6. * Time: 下午3:49
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/plug-in/ueditor/1.4.3/ueditor.config.js");
  10. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/plug-in/ueditor/1.4.3/ueditor.all.min.js");
  11. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/plug-in/ueditor/1.4.3/lang/zh-cn/zh-cn.js");
  12. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/plug-in/jquery-3.2.1.min.js");
  13. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/news.js");
  14. ?>
  15. <style>
  16. .layui_w_box {margin:15px auto 0;width:97%;}
  17. .layui_w_title {margin-bottom:-1px}
  18. .layui_w_title ul li {display:inline-block;}
  19. .layui-tab-title .layui-this {background-color:#f2f4f4;}
  20. .layui_w_center {border:1px solid #ccc;height:300px;padding:15px;}
  21. .layui_w_cls {height:100%;border:2px dashed #e6e6e6;position:relative;}
  22. .layui_w_cls .layui-btn{position:absolute;left:50%;top:75%;margin:0 0 0 -53px;}
  23. .layui_w_xbox {border:none;padding:0 26px;}
  24. .layui_w_popup_btn {margin:17px 20px 0 0;float:right;}
  25. .layui_w_popup_btn .layui-btn{height:30px;line-height:30px;}
  26. .popup_img {padding:17px;text-align:center;margin-bottom:20px;}
  27. .layui_w_triangle {position:absolute;right:0;bottom:0;width:45px;height:40px;cursor:pointer;display:none;}
  28. .layui_w_none {display:block;}
  29. .layui_w_triangle img {display:block;width:100%;}
  30. .hiData {display:none;}
  31. /*图片展示样式*/
  32. .layui-upload-img{display: inline-block;height:120px;width: 120px;border:1px solid #dbdbdb;margin-right: 10px;position: absolute;position: relative;overflow: hidden;}
  33. .layui-upload-img img{display: block;height: 100%;width: 100%;}
  34. .close-icon{position: absolute;right:5px;top: 1px;color: #000;cursor: pointer;}
  35. /*删除*/
  36. .delete-list {background:rgba(0,0,0,0.3);position:absolute;top:-28px;left:0;width:100%;padding:3px 0;}
  37. .delete-list i {float:right;margin-right:8px;cursor:pointer;font-size:20px !important;; color: #fff;}
  38. .layui-upload-img:hover .delete-list {top:0;}
  39. </style>
  40. <div class="layui_w_box">
  41. <div class="hiData"></div>
  42. <div class="layui_w_title">
  43. <ul class="layui-tab-title">
  44. <li class="site-demo-active layui-this" lay-id="popup_1" >本地上传</li>
  45. <li class="site-demo-active" lay-id="popup_2">正文上传</li>
  46. </ul>
  47. </div>
  48. <div class="layui-tab-content layui_w_center">
  49. <div class="layui-tab-item layui-show layui_w_cls" id="popup_1">
  50. <div class="popup_img" id="popup_1_imgBox"></div>
  51. <a class="layui-btn upload_box" id="upload_edit">选择封面图</a>
  52. </div>
  53. <div class="layui-tab-item layui_w_cls layui_w_xbox" id="popup_2"></div>
  54. </div>
  55. <div class="layui_w_popup_btn">
  56. <a class="layui-btn" id="layui_confirm" href="javascrpt:;">确定</a>
  57. <!-- <a class="layui-btn layui-btn-primary layui_w_cancel" href="javascrpt:;">取消</a> -->
  58. </div>
  59. </div>