Browse Source

一元捐后台管理项目活动发起添加奖品上传图片大小做限制添加删除和查看

hangb 8 years ago
parent
commit
ad414729be

+ 42 - 6
donate-console/src/main/webapp/resources/view/activity/activity_launch.html

@@ -521,8 +521,8 @@
         margin: 16px 0;
     }
     .content-setting .form-group .uploadImage .showImgs{
-        width: 1140px;
-        height: 140px;
+        width: 570px;
+        height: 70px;
     }
     .content-setting .form-group .uploadImage .showImg img{
         width: 100%;
@@ -556,11 +556,47 @@
     }
     .content-setting .form-group .uploadImage .showImgs .hover-show a{
         position: absolute;
-        top: 44%;
+        top: 35%;
         left: 48%;
         font-size: 16px;
         color: #fff;
     }
+    .content-setting .form-group .prise .showImage{
+        position: relative ;
+        width: 160px;
+        height: 160px;
+        margin: 16px 0;
+    }
+    .content-setting .form-group .prise .showImage img{
+        width: 100%;
+        height: 100%;
+    }
+    .content-setting .form-group .prise .showImage .hover-show {
+        position: absolute ;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        background: rgba(0,0,0,.5);
+        display: none;
+    }
+    .content-setting .form-group .prise .showImage:hover .hover-show {
+        display: block;
+    }
+    .content-setting .form-group .prise .showImage .hover-show .delete{
+        position: absolute;
+        top: 5px;
+        right: 5px;
+        color: #fff;
+        cursor: pointer;
+    }
+    .content-setting .form-group .prise .showImage .hover-show a{
+        position: absolute;
+        top: 44%;
+        left: 36%;
+        font-size: 16px;
+        color: #fff;
+    }
 </style>
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <section class="content-header clearfix">
@@ -679,11 +715,11 @@
                                     上传图片
                                     <input type="file" ng-multiple="false" accept="image/*" id="award{{$index}}" ng-model="award.prizeImgs" ng-file-select ng-change="uploadPrizeImg(award, $index)" required>
                                 </div>
-                                <div ng-if="null != award.img" style="max-height: 100px; max-width: 300px">
-                                    <img style="max-height: 100px; max-width: 100px" src="{{award.img}}">
+                                <div ng-if="null != award.img" class="showImage">
+                                    <img  src="{{award.img}}">
                                     <span class="hover-show">
                                         <em style="cursor: pointer;" class="delete" title="删除" ng-click="deletePrizeImg(award.img, $index)"><em class="fa fa-2x fa-trash"></em></em>
-                                        <a ng-click="showImg(award.img)" title="点击查看大图"><em class="fa fa-search"></em>查看</a>
+                                        <a ng-click="showImg(award.img)" title="点击查看大图"><em class="fa fa-search"></em> 查看</a>
                                     </span>
                                 </div>
                             </div>