index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_btn"}
  3. <a href="javascript:void(0);" class="dssc-upload-btn pr">
  4. <span>
  5. <input type="file" hidefocus="true" size="1" class="input-file" name="goodsvideo" id="goodsvideo">
  6. </span>
  7. <p><i class="iconfont">&#xe733;</i>{$Think.lang.store_video_upload}</p>
  8. </a>
  9. {/block}
  10. {block name="seller_main"}
  11. <div id="pictureFolder" class="dssc-picture-folder">
  12. {notempty name="video_list"}
  13. <form name="checkboxform" id="checkboxform" method="POST" action="">
  14. <div class="dssc-picture-list">
  15. <ul>
  16. {foreach name="video_list" item="v" }
  17. <li style="width:268px;height:268px">
  18. <dl style="width:240px;height:240px">
  19. <dt style="width:240px;height:240px">
  20. <div class="picture" style="width:240px;height:240px">
  21. <video controls="" height="240" width="240" src="{:goods_video($v.goodsvideo_name)}"/>
  22. </div>
  23. </dt>
  24. <dd class="buttons" style="top:0;left:0">
  25. <a href="javascript:void(0)" onclick="ds_ajaxget_confirm('{:url('Sellervideo/del_video',['id'=>$v.goodsvideo_id,'return_json'=>1])}', '{$Think.lang.store_video_delete_confirm_message}');"><i class="iconfont">&#xe725;</i>{$Think.lang.store_video_delete}</a>
  26. </dd>
  27. </dl>
  28. </li>
  29. {/foreach}
  30. </ul>
  31. </div>
  32. </form>
  33. <div class="pagination">{$show_page|raw}</div>
  34. {else /}
  35. <div class="warning-option"><i class="iconfont">&#xe64c;&nbsp;</i><span>{$Think.lang.no_record}</span></div>
  36. {/notempty}
  37. </div>
  38. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/fileupload/jquery.iframe-transport.js" charset="utf-8"></script>
  39. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/fileupload/jquery.ui.widget.js" charset="utf-8"></script>
  40. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/fileupload/jquery.fileupload.js" charset="utf-8"></script>
  41. <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
  42. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
  43. <script>
  44. $(function () {
  45. //鼠标触及区域li改变class
  46. $(".dssc-picture-list ul li").hover(function () {
  47. $(this).addClass("hover");
  48. }, function () {
  49. $(this).removeClass("hover");
  50. });
  51. var index
  52. // ajax 上传图片
  53. $('#goodsvideo').fileupload({
  54. dataType: 'json',
  55. url: HOMESITEURL + '/Sellervideo/video_upload.html',
  56. formData: {name: 'goodsvideo'},
  57. add: function (e, data) {
  58. index = layer.load()
  59. data.submit();
  60. },
  61. done: function (e, data) {
  62. layer.close(index);
  63. var param = data.result;
  64. if (typeof (param.error) != 'undefined') {
  65. alert(param.error);
  66. } else {
  67. window.location.reload()
  68. }
  69. }
  70. });
  71. });
  72. </script>
  73. {/block}