截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

edit.html 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. {layout name="layout2" /}
  2. <style>
  3. .layui-form-label {
  4. width: 120px;
  5. }
  6. .layui-input-block{
  7. margin-left:150px;
  8. }
  9. </style>
  10. <div class="layui-card layui-form">
  11. <div class="layui-card-body">
  12. <input type="hidden" name="id" value="{$detail.id}">
  13. <!-- 直播间标题 -->
  14. <div class="layui-form-item">
  15. <label for="name" class="layui-form-label" ><font color="red">*</font>直播间标题:</label>
  16. <div class="layui-input-inline">
  17. <input type="text" id="name" name="name" placeholder="填写本次直播的标题" value="{$detail.name}"
  18. class="layui-input" autocomplete="off" lay-verType="tips" lay-verify="required">
  19. </div>
  20. </div>
  21. <!--直播类型-->
  22. <div class="layui-form-item">
  23. <label class="layui-form-label" ><font color="red">*</font>直播类型:</label>
  24. <div class="layui-input-block">
  25. <input type="radio" name="type" value="0" title="手机直播" checked>
  26. </div>
  27. <div class="layui-form-mid layui-word-aux">通过“小程序直播”开播</div>
  28. </div>
  29. <!-- 开播时间 -->
  30. <div class="layui-form-item">
  31. <label for="startTime" class="layui-form-label" ><font color="red">*</font>开播时间:</label>
  32. <div class="layui-input-inline">
  33. <input type="text" id="startTime" name="start_time" placeholder="填写直播开始时间" value="{$detail.start_time}"
  34. class="layui-input" autocomplete="off" lay-verType="tips" lay-verify="required" readonly>
  35. <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">填写直播开始时间,开播时间需要在当前时间的10分钟后并且不能在6个月后</div>
  36. </div>
  37. </div>
  38. <!-- 结束时间 -->
  39. <div class="layui-form-item">
  40. <label for="endTime" class="layui-form-label" ><font color="red">*</font>结束时间:</label>
  41. <div class="layui-input-inline">
  42. <input type="text" id="endTime" name="end_time" class="layui-input" placeholder="直播结束时间" value="{$detail.end_time}"
  43. autocomplete="off" lay-verType="tips" lay-verify="required" readonly>
  44. <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">开播时间和结束时间间隔不得短于30分钟,不得超过24小时</div>
  45. </div>
  46. </div>
  47. <!-- 主播昵称 -->
  48. <div class="layui-form-item">
  49. <label for="anchor_name" class="layui-form-label" ><font color="red">*</font>主播昵称:</label>
  50. <div class="layui-input-inline">
  51. <input type="text" id="anchor_name" name="anchor_name" placeholder="填写本次直播的主播昵称"
  52. class="layui-input" autocomplete="off" lay-verType="tips" lay-verify="required" value="{$detail.anchor_name}">
  53. </div>
  54. </div>
  55. <!-- 主播微信账号 -->
  56. <div class="layui-form-item">
  57. <label for="anchor_wechat" class="layui-form-label" ><font color="red">*</font>主播微信号:</label>
  58. <div class="layui-input-inline">
  59. <input type="text" id="anchor_wechat" name="anchor_wechat" placeholder="填写本次直播的主播微信号"
  60. class="layui-input" autocomplete="off" lay-verType="tips" lay-verify="required" value="{$detail.anchor_wechat}">
  61. <div class="layui-form-mid layui-word-aux" style="white-space:nowrap;">每个直播间需要绑定主播微信号,用以核实主播身份,不会展示给观众。</div>
  62. </div>
  63. </div>
  64. <!-- 分享卡片封面 -->
  65. <div class="layui-form-item">
  66. <label class="layui-form-label">分享卡片封面:</label>
  67. <div class="layui-input-block">
  68. <div class="like-upload-image">
  69. {if $detail.share_img}
  70. <div class="upload-image-div">
  71. <img src="{$detail.share_img}" alt="img">
  72. <input type="hidden" name="share_img" value="{$detail.share_img}">
  73. <div class="del-upload-btn">x</div>
  74. </div>
  75. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image upload-share-img"> + 添加图片</a></div>
  76. {else}
  77. <div class="upload-image-elem"><a class="add-upload-image upload-share-img"> + 添加图片</a></div>
  78. {/if}
  79. </div>
  80. <div class="layui-form-mid layui-word-aux">用户在微信对话框内分享的直播间将以分享卡片的形式呈现。 建议尺寸:800像素 * 640像素,图片大小不得超过1M</div>
  81. </div>
  82. </div>
  83. <!-- 直播卡片封面 -->
  84. <div class="layui-form-item">
  85. <label class="layui-form-label">直播卡片封面:</label>
  86. <div class="layui-input-block">
  87. <div class="like-upload-image">
  88. {if $detail.feeds_img}
  89. <div class="upload-image-div">
  90. <img src="{$detail.feeds_img}" alt="img">
  91. <input type="hidden" name="feeds_img" value="{$detail.feeds_img}">
  92. <div class="del-upload-btn">x</div>
  93. </div>
  94. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image upload-feeds-img"> + 添加图片</a></div>
  95. {else}
  96. <div class="upload-image-elem"><a class="add-upload-image upload-feeds-img"> + 添加图片</a></div>
  97. {/if}
  98. </div>
  99. <div class="layui-form-mid layui-word-aux">图片建议大小为 800像素 * 800像素。图片大小不超过300KB。 图片内容遵循平台规范后更容易被推荐。</div>
  100. </div>
  101. </div>
  102. <!-- 直播间背景墙 -->
  103. <div class="layui-form-item">
  104. <label class="layui-form-label">直播间背景墙:</label>
  105. <div class="layui-input-block">
  106. <div class="like-upload-image">
  107. {if $detail.cover_img}
  108. <div class="upload-image-div">
  109. <img src="{$detail.cover_img}" alt="img">
  110. <input type="hidden" name="cover_img" value="{$detail.cover_img}">
  111. <div class="del-upload-btn">x</div>
  112. </div>
  113. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image upload-cover-img"> + 添加图片</a></div>
  114. {else}
  115. <div class="upload-image-elem"><a class="add-upload-image upload-cover-img"> + 添加图片</a></div>
  116. {/if}
  117. </div>
  118. <div class="layui-form-mid layui-word-aux">直播间背景墙是每个直播间的默认背景。 建议尺寸:600像素 * 1300像素,图片大小不得超过3M</div>
  119. </div>
  120. </div>
  121. <!-- 直播间功能-->
  122. <div class="layui-form-item">
  123. <label class="layui-form-label" >直播间功能:</label>
  124. <div class="layui-input-block">
  125. <input type="checkbox" name="close_like" lay-skin="primary" title="开启点赞" {eq name="detail.close_like" value="0"}checked{/eq}>
  126. <input type="checkbox" name="close_goods" lay-skin="primary" title="开启货架" {eq name="detail.close_goods" value="0"}checked{/eq}>
  127. <input type="checkbox" name="close_comment" lay-skin="primary" title="开启评论" {eq name="detail.close_comment" value="0"}checked{/eq}>
  128. <input type="checkbox" name="close_replay" lay-skin="primary" title="开启回放" {eq name="detail.close_replay" value="0"}checked{/eq}>
  129. <input type="checkbox" name="close_share" lay-skin="primary" title="开启分享" {eq name="detail.close_share" value="0"}checked{/eq}>
  130. <input type="checkbox" name="close_kf" lay-skin="primary" title="开启客服" {eq name="detail.close_kf" value="0"}checked{/eq}>
  131. <input type="checkbox" name="is_feeds_public" lay-skin="primary" title="开启官方收录" {eq name="detail.is_feeds_public" value="1"}checked{/eq}>
  132. </div>
  133. </div>
  134. <div class="layui-form-item layui-hide">
  135. <input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
  136. </div>
  137. </div>
  138. </div>
  139. <script>
  140. layui.use(['table', 'form', 'laydate', 'element'], function () {
  141. var $ = layui.$
  142. ,form = layui.form
  143. ,laydate = layui.laydate
  144. ,element = layui.element;
  145. // 时间组件
  146. laydate.render({type:'datetime' ,elem:'#startTime', trigger:'click'});
  147. laydate.render({type:'datetime' ,elem:'#endTime' ,trigger: 'click'});
  148. like.delUpload();
  149. // 分享卡片封面
  150. $(document).on("click", ".upload-share-img", function () {
  151. like.imageUpload({
  152. limit: 1,
  153. field: "share_img",
  154. that: $(this),
  155. content: '/shop/file/lists?type=10',
  156. });
  157. });
  158. // 直播封面
  159. $(document).on("click", ".upload-feeds-img", function () {
  160. like.imageUpload({
  161. limit: 1,
  162. field: "feeds_img",
  163. that: $(this),
  164. content: '/shop/file/lists?type=10',
  165. });
  166. });
  167. // 直播背景
  168. $(document).on("click", ".upload-cover-img", function () {
  169. like.imageUpload({
  170. limit: 1,
  171. field: "cover_img",
  172. that: $(this),
  173. content: '/shop/file/lists?type=10',
  174. });
  175. });
  176. });
  177. </script>