message_preview.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <div class="panel panel-default panel-intro">
  2. <div class="form-group">
  3. <label for="c-message_type" class="control-label col-xs-12 col-sm-2"></label>
  4. <div class="col-xs-12 col-sm-8">
  5. <!-- 内容展示区 -->
  6. <div class="message_type_container"
  7. style=" width: 100%;
  8. padding: 6px 12px;
  9. text-align: center;
  10. font-size: 12px;
  11. line-height: 1.42857143;
  12. color: #555555;
  13. background-color: #fff;
  14. background-image: none;
  15. border: 1px solid #ccc;"
  16. >
  17. <div class="message_type_content_contianer"
  18. style="
  19. width: 100%;
  20. min-height: 30px;
  21. background: #F1EFEF;
  22. margin-bottom: 12px;
  23. "
  24. >
  25. <!--文本-->
  26. {if $row.message_type==1}
  27. {foreach name="row.message_content_arr" item="vo"}
  28. <div class="msg_preview_text" data-index="{$key}">
  29. <div class="preview_handler" >
  30. <p class="msg_preview_title3">{$vo.content}</p>
  31. </div>
  32. </div>
  33. {/foreach}
  34. {/if}
  35. <!--图文-->
  36. {if $row.message_type==2}
  37. {foreach name="row.message_content_arr" item="vo"}
  38. {if $key==0}
  39. <div class="msg_preview h180" data-index="{$key}">
  40. <img class="preview_img_imgtext" src="{$vo.cover}" alt="" >
  41. <div class="preview_handler" style="background: rgba(0,0,0,.3);">
  42. <h3 class="preview_imgtext_title" >{$vo.title}</h3>
  43. </div>
  44. </div>
  45. {/if}
  46. {if $key!=0}
  47. <div class="msg_preview h180" data-index="{$key}">
  48. <img class="msg_preview_img2" src="{$vo.cover}" alt="" style="float: right;">
  49. <h3 class="msg_preview_title2" >{$vo.title}</h3>
  50. <div class="preview_handler" >
  51. </div>
  52. </div>
  53. {/if}
  54. {/foreach}
  55. {/if}
  56. <!--纯图-->
  57. {if $row.message_type==3}
  58. {foreach name="row.message_content_arr" item="vo"}
  59. <div class="msg_preview" data-index="{$key}">
  60. <img class="msg_preview_img3" src="{$vo.img_path}" alt="" >
  61. <div class="preview_handler" >
  62. </div>
  63. </div>
  64. {/foreach}
  65. {/if}
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <input id="message_content" type="hidden" name="row[message_content]" value="" />
  71. </div>
  72. <style>
  73. .msg_preview{
  74. width: 100%;
  75. position: relative;
  76. border: 1px solid #ccc;
  77. margin-bottom: 3px;
  78. }
  79. .h180{
  80. height: 180px;
  81. }
  82. .preview_img_imgtext{
  83. width: 100%;
  84. height: 100%;
  85. display: block;
  86. }
  87. .preview_handler{
  88. position: absolute;
  89. width: 100%;
  90. height: 50px;
  91. /* background: rgba(0,0,0,.3); */
  92. bottom: 0;
  93. }
  94. .preview_imgtext_title{
  95. margin: 0;
  96. float: left;
  97. height: 50px;
  98. line-height: 50px;
  99. padding: 0;
  100. width: 80%;
  101. overflow: hidden;
  102. text-align: left;
  103. color:#fff;
  104. font-weight: 400;
  105. }
  106. .preview_del{
  107. float: right;
  108. width: 8%;
  109. line-height: 30px;
  110. height: 30px;
  111. margin-top: 10px;
  112. border: none;
  113. border-radius: 5px;
  114. margin-right: 3px;
  115. color:#fff;
  116. background: #333333;
  117. font-weight: 500;
  118. }
  119. .preview_edit{
  120. float: right;
  121. width: 8%;
  122. line-height: 30px;
  123. height: 30px;
  124. margin-top: 10px;
  125. border: none;
  126. border-radius: 5px;
  127. margin-right: 3px;
  128. color:#fff;
  129. background: #333333;
  130. font-weight: 500;
  131. }
  132. .msg_preview_title2{
  133. overflow: hidden;
  134. padding: 0;
  135. padding-right: 120px;
  136. padding-left: 30px;
  137. height: 120px;
  138. text-align: left;
  139. line-height: 120px;
  140. margin: 0;
  141. background: #fff;
  142. text-overflow: ellipsis;
  143. display: -webkit-box;
  144. -webkit-line-clamp: 2;
  145. -webkit-box-orient: vertical;
  146. line-height: 60px;
  147. }
  148. .msg_preview_img2{
  149. width: 120px;
  150. height: 120px;
  151. }
  152. .msg_preview_text{
  153. min-height: 50px;
  154. position: relative;
  155. margin-bottom: 3px;
  156. background-color: #f3f0f0;
  157. }
  158. .msg_preview_title3{
  159. display: inline-block;
  160. min-height: 50px;
  161. line-height: 50px;
  162. width: 80%;
  163. color:#000;
  164. overflow: hidden;
  165. white-space: nowrap;
  166. text-overflow: ellipsis;
  167. text-align: left;
  168. }
  169. .msg_preview_img3{
  170. width: 100%;
  171. height: 100%;
  172. }
  173. </style>