guomengjiao hai 2 meses
pai
achega
1b67049473

+ 20 - 0
renren-admin/src/main/resources/statics/js/modules/qyh/enterprise.js

@@ -65,6 +65,26 @@ function initdate(){
         });
     })
 }
+$(document).on("click", "div img", function () {
+    var img_content = $(this).attr("src");
+    $("body").append(
+        "<div class='bg-img'>"
+        + "<div class='tra-img'>"
+        + "<img src='" + img_content + "' class='zoom-out'>"
+        + "</div></div>"
+    );
+    //bottom:'0',left:'0';会让图片从页面左下放出现,如果想从左上方出现,将bottom:'0'改成top:'0';
+    $(".bg-img").animate({
+        width: "100%",
+        height: "100%",
+        bottom: "0",
+        left: "0",
+    }, "normal")
+})
+//点击外层区域页面图片隐藏
+$(document).on("click", ".bg-img", function () {
+    $(this).remove();
+})
 var vm = new Vue({
 	el:'#rrapp',
 	data:{

+ 11 - 8
renren-admin/src/main/resources/templates/modules/qyh/enterprise.html

@@ -58,15 +58,15 @@
         .promo-img-grid {
             display: grid;
             grid-template-columns: repeat(4, 1fr);
-            gap: 12px;
+            gap: 15px;
             margin-top: 10px;
         }
         .promo-img-item {
             width: 100%;
-            height: 100px;
+            height: 120px;
             background: #f0f0f0;
             border-radius: 4px;
-            object-fit: cover;
+            object-fit: contain;
             cursor: pointer;
         }
         .contact-section {
@@ -84,6 +84,9 @@
             width: 16px;
             text-align: center;
         }
+        .form-horizontal{
+            padding-left: 50px;
+        }
     </style>
 </head>
 <body>
@@ -134,7 +137,7 @@
                 <div class="show-section" v-if="wjxyEnterprise.enterprisePromoImages">
                     <div class="show-section-title">企业宣传图</div>
                     <div class="promo-img-grid">
-                        <img class="promo-img-item" v-for="(img, index) in wjxyEnterprise.enterprisePromoImages.split(',')" :key="index" :src="img" @click="previewImage(img)">
+                        <img class="promo-img-item" v-for="(img, index) in wjxyEnterprise.enterprisePromoImages.split(',')" :key="index" :src="img">
                     </div>
                 </div>
 
@@ -153,11 +156,11 @@
                         <span>{{ wjxyEnterprise.enterprisePhone }}</span>
                     </div>
                 </div>
-                <div class="form-group">
-                    <div class="col-sm-2 control-label"></div>
-                    &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
-                </div>
             </form>
+            <div class="form-group">
+                <div class="col-sm-2 control-label"></div>
+                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
+            </div>
         </div>
     </div>
 </div>