修复上传benner图片显示问题

ecloud_sso
anke1460 5 years ago
parent 3fddec2f3b
commit eddf43ab1c

@ -1 +1,2 @@
$("#course_img")[0].innerHTML = "<%= escape_javascript(image_tag Util::FileManage.source_disk_file_url(@course), class: 'banner-item-img course-banner-img') %>"
$("#course_img")[0].innerHTML = "<%= escape_javascript(image_tag Util::FileManage.source_disk_file_url(@course), class: 'banner-item-img course-banner-img') %>";
$("#course_img_banner").addClass('has-img');

@ -9,7 +9,7 @@
<%= form_with(url: '/admins/weapp_banners', html: { id: 'course_form', enctype: 'multipart/form-data' }) do |f| %>
<div class="col-12 col-md-4 banner-item">
<div class="banner-item-top">实践课程</div>
<div class="course banner-item-bottom <%= @course ? 'has-img' : '' %>">
<div class="course banner-item-bottom <%= @course ? 'has-img' : '' %>" id="course_img_banner">
<div id="course_img">
<% if @course %>
<img class="banner-item-img course-banner-img" src="<%= Util::FileManage.exists?(@course) ? Util::FileManage.source_disk_file_url(@course) : '' %>"/>
@ -21,11 +21,10 @@
</div>
<% end %>
<%= form_with(url: '/admins/weapp_banners/shixun_banner', html: { id: 'shixun_form', enctype: 'multipart/form-data' }) do |f| %>
<div class="col-12 col-md-4 banner-item">
<div class="banner-item-top">实训项目</div>
<div class="shixun banner-item-bottom <%= @shixun ? 'has-img' : '' %>">
<div class="shixun banner-item-bottom <%= @shixun ? 'has-img' : '' %>" id="shixun_img_banner">
<div id="shixun_img">
<% if @shixun %>
<img class="banner-item-img shixun-banner-img" src="<%= Util::FileManage.exists?(@shixun) ? Util::FileManage.source_disk_file_url(@shixun) : '' %>"/>

@ -1 +1,2 @@
$("#shixun_img")[0].innerHTML = "<%= escape_javascript(image_tag Util::FileManage.source_disk_file_url(@shixun), class: 'banner-item-img course-banner-img') %>"
$("#shixun_img")[0].innerHTML = "<%= escape_javascript(image_tag Util::FileManage.source_disk_file_url(@shixun), class: 'banner-item-img course-banner-img') %>";
$("#shixun_img_banner").addClass('has-img');
Loading…
Cancel
Save