cityedit.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/4/19
  6. * Time: 上午11:01
  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."/js/routine/city.js");
  13. ?>
  14. <style>
  15. .layui-upload-img img{display: block;height: 100%;width: 100%;}
  16. .layui-upload-img{display: inline-block;height:120px;width: 120px;border: 1px solid #999;margin-right: 10px;position: absolute;position: relative;
  17. overflow: hidden;}
  18. .xm_qytc_box {width:80%;margin:20px auto 0;}
  19. </style>
  20. <div class="xm_qytc_box">
  21. <form class="layui-form layui-form-pane" id="citysignupForm">
  22. <div class="layui-form-item">
  23. <label class="layui-form-label"><span style="color:red">*</span>标题</label>
  24. <div class="layui-input-inline" style="width:270px;">
  25. <input type="text" name="title" lay-verify="required" value="<?php echo $details['title'] ?>" placeholder="请输入标题" autocomplete="off" class="layui-input">
  26. </div>
  27. </div>
  28. <div class="layui-form-item">
  29. <label class="layui-form-label">区域</label>
  30. <div class="layui-input-inline" style="width:270px;">
  31. <select name="city_id" >
  32. <option value="">请选择</option>
  33. <?php foreach($city as $val){?>
  34. <option value="<?php echo $val['id'] ?>" <?php if($val['id'] == $details['city_id']) echo 'selected' ?> ><?php echo $val['city_name']?></option>
  35. <?php }?>
  36. </select>
  37. </div>
  38. </div>
  39. <div class="layui-form-item">
  40. <label class="layui-form-label">区域拼音:</label>
  41. <div class="layui-input-inline" style="width:270px;">
  42. <input type="text" name="pinyin" value="<?php echo $details['pinyin'] ?>" lay-verify="required" placeholder="请输入区域拼音" autocomplete="off" class="layui-input">
  43. </div>
  44. </div>
  45. <div class="layui-form-item">
  46. <label class="layui-form-label">视频地址:</label>
  47. <div class="layui-input-inline" style="width:270px;">
  48. <input type="text" name="video" value="<?php echo $details['video'] ?>" lay-verify="required" placeholder="请输入视频地址" autocomplete="off" class="layui-input">
  49. </div>
  50. </div>
  51. <div class="layui-form-item xm_pr">
  52. <div class="layui-upload">
  53. <button type="button" class="layui-btn" id="upload_edits">区域图集(3张)</button>
  54. <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
  55. 预览图:
  56. <div class="layui-upload-list" id="demo1">
  57. <?php if(!empty($details['img'])){ foreach ($details['img'] as $key=>$val){?>
  58. <div class="layui-upload-img">
  59. <div class="delete-list" id="delimg">
  60. <i class="layui-icon fa-trash-o" >&#xe640;</i>
  61. </div>
  62. <img delIdentification="" imgname="<?php echo $val ?>" src="<?php echo $url.$val ?>" alt=""></div>
  63. <?php }} ?>
  64. </div>
  65. </blockquote>
  66. </div>
  67. </div>
  68. <div class="layui-form-item xm_pr">
  69. <div class="layui-upload">
  70. <button type="button" class="layui-btn" id="upload_edit">缩略图(单张)</button>
  71. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="thumb_size" value="2" title="大图">-->
  72. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="thumb_watermark" value="1" checked title="水印">-->
  73. <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
  74. 预览图:
  75. <div class="layui-upload-list" id="demo2">
  76. <div class="layui-upload-img"><div id="delimg"></div><img src="<?php echo $url.$details['thumb'] ?>" alt=""></div>
  77. </div>
  78. </blockquote>
  79. </div>
  80. </div>
  81. <div class="layui-form-item xm_pr">
  82. <div class="layui-upload">
  83. <button type="button" class="layui-btn" id="upload_edit_bg">背景图(单张)</button>
  84. <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
  85. 预览图:
  86. <div class="layui-upload-list" id="demo_bg">
  87. <div class="layui-upload-img"><div id="delimg"></div><img src="<?php echo $url.$details['background_img'] ?>" alt=""></div>
  88. </div>
  89. </blockquote>
  90. </div>
  91. </div>
  92. <div class="layui-bg-gray" style="padding:12px 15px;">简介:</div>
  93. <div class="editor_box">
  94. <textarea name="introduce" id="editor_content" cols="30" rows="10" style="width:100%;height:400px;float:left;"><?php echo $details['introduce'] ?></textarea>
  95. </div>
  96. <hr class="layui-bg-blue">
  97. <div class="layui-form-item">
  98. <div class="layui-input-block xm_xcxqTc_tj" style="margin:20px 0 0 0;text-align:center;">
  99. <input type="hidden" name="id" value="<?php echo $details['id'] ?>">
  100. <button class="layui-btn" lay-submit="" lay-filter="edit">提交</button>
  101. <!-- <input type="checkbox" class="xm_xcxqTc_button" name="like[write]" title="水印">-->
  102. </div>
  103. </div>
  104. </form>
  105. </div>