Sfoglia il codice sorgente

Merge branch 'developerA' of git.caimei365.com:chao/caimei-caimei365-www into developerA

Administrator 4 anni fa
parent
commit
d5de321c23

+ 1 - 0
src/main/resources/static/css/base/base.pc.css

@@ -7,6 +7,7 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .h5Only{display:none!important;}
 /*微信二维码样式*/
 iframe{width:320px !important;height: 280px !important}
+#globalHead.fiexd{width: 100%;height: auto;position: fixed;top: 0;left: 0;z-index: 99999;}
 .impowerBox{width:320px !important;}
 .impowerBox .qrcode {width: 200px !important;}
 .impowerBox .title {display: none;}

+ 1 - 1
src/main/resources/static/css/index/index_new.h5.css

@@ -24,7 +24,7 @@
         height: auto;
     }
     .section_page .section_page_title{
-        padding: 4.8vw 0 2.4vw 3.2vw;
+        padding: 2.4vw 0 2.4vw 3.2vw;
         position: relative
     }
     .section_page .section_page_title h1{

+ 11 - 0
src/main/resources/static/js/base.js

@@ -48,6 +48,7 @@ var globalHead = new Vue({
         userIdentity:'',
         articleType: '',
         topMenuList:[],
+        isFiexd:false,
         TabList:[
             {name:'产品',link:'/product/instrument.html',value:'1'},
             {name:'仪器',link:'/product/instrument.html',value:'2'}
@@ -198,11 +199,21 @@ var globalHead = new Vue({
         this.articleType = getUrlParam("type");
     },
     mounted:function(){
+        var _self = this;
         var userData = JSON.parse(window.localStorage.getItem('userInfo'));
         if(userData!=null){
             this.userIdentity = userData.userIdentity;
             this.shopId = userData.shopId;
         }
+        $(window).on('scroll', function() {
+            var scrollTop = $(this).scrollTop();
+            if(scrollTop>200){
+                _self.isFiexd = true;
+
+            }else{
+                _self.isFiexd = false;
+            }
+        })
     }
 });
 // 初始化效果

+ 1 - 1
src/main/resources/static/js/index.js

@@ -194,7 +194,7 @@ var homeData = new Vue({
                         mainCell:".recommendBox-wrapper",
                         titCell:".swiper-pagination-floor span",
                         effect: "leftLoop",
-                        autoPlay: true,
+                        autoPlay: false,
                         scroll:5,
                         vis:5
                     });

+ 26 - 13
src/main/resources/static/js/product/instruement.js

@@ -15,16 +15,16 @@
             userId:'',
             source:1
          },
-    },
-    computed:{
-
     },
     filters:{
          NumFormat:function(value) {//处理金额
             return Number(value).toFixed(2);
         },
     },
-    methods:{
+     created: function() {
+
+     },
+     methods:{
          PromotionsFormat:function(promo){//促销活动类型数据处理
             if(promo!=null){
                 if(promo.type == 1 && promo.mode == 1){
@@ -127,15 +127,28 @@
 
                 }
             },500);
-        },
-
-    },
-    created: function() {
-        var userInfo = localStorage.getItem('userInfo');
-        if(userInfo){
-            this.params.userId = JSON.parse(userInfo).userId;
         }
-        this.params.pageId = getUrlParam('id');
-        this.GetHomeFloorData();
     },
+    mounted: function(){
+        var _self = this;
+         var userInfo = localStorage.getItem('userInfo');
+         if(userInfo){
+             this.params.userId = JSON.parse(userInfo).userId;
+         }
+         this.params.pageId = getUrlParam('id');
+         this.GetHomeFloorData();
+         console.log(this.params.pageId);
+         setTimeout(function(){
+             //本地ID 118-产品  119-仪器
+             //正式ID 287-产品  286-仪器
+             if(_self.params.pageId == '287'){
+                 var obg =  $('.navBox li').eq(0).find('a');
+                 obg.addClass('on');
+             }else if(_self.params.pageId == '286'){
+                 var obg =  $('.navBox li').eq(1).find('a');
+                 obg.addClass('on');
+             }
+         },500)
+
+    }
  })

+ 1 - 1
src/main/resources/templates/components/header.html

@@ -1,4 +1,4 @@
-<header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml">
+<header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml" :class="isFiexd ? 'fiexd': ''">
     <!--顶部导航-->
     <div class="baseHeadTop">
         <div class="wrap clear">

BIN
target/www-0.0.1-SNAPSHOT.jar