homeedit.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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."/js/routine/decoration.js");
  10. ?>
  11. <style>
  12. .xm_qytc_box{width:920px;margin:auto;margin-top:20px;}
  13. .xm_xcxqTc_img{margin:0;}
  14. .xm_xcxqTc_button{position:absolute;bottom:0;left:0;}
  15. .xm_pr{position:relative;}
  16. .ml{margin-left:18px}
  17. .layui-upload-img{display: inline-block;height:120px;width: 120px;border: 1px solid #999;margin-right: 10px;position: absolute;position: relative;
  18. overflow: hidden;}
  19. .layui-upload-img img{display: block;height: 100%;width: 100%;}
  20. .close-icon{position: absolute;right:5px;top: 1px;color: #000;cursor: pointer;}
  21. .layui_w_btn {display:none;} /*去除删除按钮 特别需求*/
  22. /*选择封面图上传弹窗*/
  23. .layui_w_title {background:red;}
  24. .layui_w_title ul li {display:inline-block;}
  25. </style>
  26. <div class="xm_qytc_box">
  27. <form class="layui-form layui-form-pane" id="signupForm">
  28. <div class="layui-form-item">
  29. <label class="layui-form-label"><span style="color:red">*</span>标题</label>
  30. <div class="layui-input-inline" style="width:270px;">
  31. <input type="text" name="title" value="<?= $model['title'] ?>" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
  32. </div>
  33. </div>
  34. <div class="layui-form-item">
  35. <label class="layui-form-label ">所属楼盘:</label>
  36. <div class="layui-input-inline" style="width:270px;">
  37. <input type="text" id="house_name" value="<?= $housename ?>" name="house_name" disabled placeholder="请选择楼盘" autocomplete="off" class="layui-input">
  38. </div>
  39. <div class="layui-inline"><a class="layui-btn layui-btn-primary The_house" href="javascript:;">选择所属楼盘</a></div>
  40. </div>
  41. <div class="layui-form-item">
  42. <label class="layui-form-label">作者</label>
  43. <div class="layui-input-inline" style="width:270px;">
  44. <input type="text" name="author" value="<?= $model['author'] ?>" placeholder="请输入" autocomplete="off" class="layui-input">
  45. </div>
  46. </div>
  47. <div class="layui-form-item">
  48. <label class="layui-form-label"><span style="color:red">*</span>来源</label>
  49. <div class="layui-input-inline" style="width:270px;">
  50. <input type="text" name="source" lay-verify="required" value="<?= $model['source'] ?>" placeholder="来源地址" autocomplete="off" class="layui-input">
  51. </div>
  52. </div>
  53. <div class="layui-form-item">
  54. <label class="layui-form-label">描述</label>
  55. <div class="layui-input-inline" style="width:390px;">
  56. <textarea name="describe" placeholder="请输入内容" class="layui-textarea"><?= $model['describe'] ?></textarea>
  57. </div>
  58. </div>
  59. <div class="layui-form-item" style="margin-bottom:-5px">
  60. <div class="layui-inline">
  61. <label class="layui-form-label"><span style="color:red">*</span>装修风格:</label>
  62. <div class="layui-input-block layui_w_acti" style="padding-bottom:8px;">
  63. <?php foreach(Yii::$app->params['DecorationStyle'] as $key=>$val){ ?>
  64. <input type="radio" name="type" value="<?php echo $key ?>" lay-skin="primary" title="<?php echo $val ?>" <?php if($key == $model['type']) echo 'checked' ?>>
  65. <?php }?>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="layui-form-item xm_pr layui-table-main">
  70. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="thumb_watermark" value="1" checked title="水印">-->
  71. <div class="layui-inline">
  72. <button type="button" class="layui-btn layui-btn-primary" id="test1"><span style="color:red">*</span>选择封面图</button>
  73. <div class="layui-inline">
  74. <div class="layui-upload">
  75. <div class="layui-upload-list lay_p_relative"> <!--低级添加 lay_p_relative-->
  76. <img class="layui-upload-img layui_magnify" name="advertising_img" src="<?= $model['img'] ?>" id="breviary_img" style="width:280px;height:90px;margin-left:10px;border:1px solid #ccc;">
  77. <p id="demoText"></p>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <div class="layui-form-item">
  84. <div class="layui-input-block xm_xcxqTc_tj" style="margin:20px 0 0 0;text-align:center;">
  85. <input type="hidden" id="hiddenBox" name="hid" value="<?= $model['hid'] ?>">
  86. <input type="hidden" name="id" value="<?= $model['id'] ?>">
  87. <button class="layui-btn" lay-submit="" lay-filter="edit">提交</button>
  88. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="like[write]" title="水印">-->
  89. </div>
  90. </div>
  91. </form>
  92. </div>