ソースを参照

排版+修复

ming 1 年間 前
コミット
008ce2602c
4 ファイル変更54 行追加28 行削除
  1. 1 0
      assets/css/home.css
  2. 13 21
      headerNav.html
  3. 39 6
      product/index.html
  4. 1 1
      solution/index.html

+ 1 - 0
assets/css/home.css

@@ -206,6 +206,7 @@
 
 .common-bradcrumb-section img {
     width: 100% !important;
+ 
 }
 
 .header-absolute {

+ 13 - 21
headerNav.html

@@ -51,41 +51,33 @@
                 dataType: 'json',
                 url: window.FQDN2 + 'siteCategory/siteCategoryList',
             }).done(function(res) {
-                console.log('res')
-                console.log(res)
+                // console.log('res')
+                // console.log(res)
+                // console.log(window.location.pathname)
                     // localStorage.removeItem('item')
                 for (let i = 0; i < res.data.length; i++) {
-                    if (res.data[i].sname == window.location.pathname) {
-                        localStorage.setItem('item', JSON.stringify(res.data[i]))
-                        $("title").html(res.data[i].categoryName)
-                        $('meta[name="description"]').attr('content', res.data[i].metadescription)
-                        $('meta[name="keywords"]').attr('content', res.data[i].metakeywords);
+                    // console.log('存值')
+                        console.log(res.data[i].sname)
+                        console.log(window.location.pathname)
                         var li = $(`<li><a href = ${res.data[i].sname}>${res.data[i].categoryName}</a></li>`)
                         if (res.data[i].children.length > 0) {
                             var ul = $(`<ul class="submenu"></ul>`)
                             for (let a = 0; a < res.data[i].children.length; a++) {
-                                var li2 = $(`<li>
+                                if(res.data[i].categoryName=='解决方案'){
+                                    var li2 = $(`<li>
                                     <a href=${res.data[i].sname}&id=${res.data[i].children[a].id}>${res.data[i].children[a].categoryName}</a>
                                 </li>`)
-                                ul.append(li2)
-                            }
-                            li.append(ul)
-                        }
-                        $(".menu-items>ul").append(li)
-                    } else {
-                        var li = $(`<li><a href = ${res.data[i].sname}>${res.data[i].categoryName}</a></li>`)
-                        if (res.data[i].children.length > 0) {
-                            var ul = $(`<ul class="submenu"></ul>`)
-                            for (let a = 0; a < res.data[i].children.length; a++) {
-                                var li2 = $(`<li>
-                                    <a href=${res.data[i].sname}&id=${res.data[i].children[a].id}>${res.data[i].children[a].categoryName}</a>
+                                }else{
+                                    var li2 = $(`<li>
+                                    <a href=${res.data[i].sname}?id=${res.data[i].children[a].id}>${res.data[i].children[a].categoryName}</a>
                                 </li>`)
+                                }
+                               
                                 ul.append(li2)
                             }
                             li.append(ul)
                         }
                         $(".menu-items>ul").append(li)
-                    }
 
                 }
                 $(".menu-items ul li").hover(function() {

+ 39 - 6
product/index.html

@@ -92,7 +92,8 @@
 
         <!--====== COMMON BREADCRUMB START ======-->
         <section class="common-bradcrumb-section">
-            <img :src="banner" alt="">
+            <!-- <img :src="banner" alt=""> -->
+            <img src="../assets/img/product/bg.jpg" alt="">
         </section>
         <!--====== COMMON BREADCRUMB END ======-->
 
@@ -106,16 +107,17 @@
                     <div class="col-lg-12">
                         <div class="grid-filter">
                             <ul class="cannot_selected tabs_selected" style="text-align: center;">
-                                <!-- <li v-for="(item,ind) in getProductType" :key="ind" @click="getList(item.id)">
+                                <li v-for="(item,ind) in getProductType" :key="ind" @click="getList(item.id)">
                                     <div><span>{{item.categoryName}}</span></div>
-                                </li> -->
+                                </li>
                             </ul>
                         </div>
                     </div>
                 </div>
                 <div class="row row-tabs grid-isotope pt-30">
                     <div class="col-lg-4 col-sm-6 software" v-for="(list,index) in getProductList" :key="index">
-                        <div class="product-grid-box" @click="productDetails(list)">
+                        <!-- <div class="product-grid-box" @click="productDetails(list)"> -->
+                            <div class="product-grid-box">
                             <div class="product-img">
                                 <img :src="list.htmlfilepath" />
                             </div>
@@ -158,7 +160,7 @@
         <section id="product-details-section" class="product-details-section pt-20 pb-60" v-if="viweState">
             <div class="container">
                 <div class="section-title both-border mb-20  pt-40 pb-40" style="text-align: center;">
-                    <div class="close" @click="productDetails()">
+                    <div class="close" @click="CloseDetail()">
                         <a>
                             <img src="../assets/img/product/close.png" alt="">
                         </a>
@@ -195,6 +197,31 @@
                 $('#footer').load("../footer.html");
                 $('#headerNav').load("../headerNav.html");
 
+                $(".menu-items ul li").hover(function() {
+                $(".erMenu>div").html("")
+                $(this).addClass("menuactive").siblings().removeClass("menuactive");
+                if ($(this).children("a").text() == "解决方案") {
+                    $(this).addClass("menuactive").siblings()
+                    var data = `
+                        <ul class="erMenuList">
+                            <li><a href="../solution/index.html?solution_type=1">智慧安防</a></li>
+                            <li><a href="../solution/index.html?solution_type=2">智慧消防</a></li>
+                            <li><a href="../solution/index.html?solution_type=3">智慧建筑能源管理</a></li>
+                            <li><a href="../solution/index.html?solution_type=4">智慧电力综合管理</a></li>
+                            <li><a href="../solution/index.html?solution_type=5">智慧园区无人机综合管理</a></li>
+                            <li><a href="../solution/index.html?solution_type=6">智慧楼宇综合运营</a></li>
+                        </ul>`
+                    $(".erMenu>div").append(data)
+                    $(".erMenu").fadeIn()
+                } else {
+                    $(".erMenu").fadeOut()
+                }
+            }, function() {
+                $(".erMenu").fadeOut()
+            });
+
+
+
                 $(".case ul li").click(function() {
                     $(this).addClass("menuactive2").siblings().removeClass("menuactive2");
                 })
@@ -247,7 +274,8 @@
                 mounted: function() {
                     console.log('111111111111')
                     console.log(localStorage.getItem("item"))
-                    this.getListData('', 1, 12)
+                    // this.getListData('', 1, 12)
+                    this.getProductTypeAjax()
                     if (JSON.stringify(JSON.parse(localStorage.getItem("item")).children) != "[]") {
                         this.banner = JSON.parse(localStorage.getItem("item")).imagePath
                         console.log('this.banner')
@@ -357,6 +385,11 @@
                         }
 
                     },
+                    CloseDetail(){
+                        this.viweState=false;
+                        window.history.replace(-1)
+                        location.replace(location.href);
+                    },
                     getProductTypeAjax() {
                         var _this = this;
                         jQuery.ajax({

+ 1 - 1
solution/index.html

@@ -249,7 +249,7 @@
                     dataType: 'json',
                     url: window.FQDN + 'Solution/index',
                     data: {
-                        id: this.id
+                        id: this.id?this.id:1
                     }
                 }).done(function(arr) {
                     _this.array = arr;