Browse Source

修改顶部

zhengjinyi 4 years ago
parent
commit
dab22c4fea
1 changed files with 24 additions and 13 deletions
  1. 24 13
      src/main/resources/static/js/product/instruement.js

+ 24 - 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,26 @@
 
                 }
             },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();
+         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)
+    }
  })