chao 4 年 前
コミット
b43667fa42

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

@@ -188,7 +188,7 @@ var globalHead = new Vue({
             this.userIdentity = userData.userIdentity;
             this.shopId = userData.shopId;
         }
-        if($(window).width() > 1400){
+        if($(window).height() > 750){
             $(window).on('scroll', function() {
                 var scrollTop = $(this).scrollTop();
                 if(scrollTop>200){

+ 4 - 5
src/main/resources/static/js/index.js

@@ -220,7 +220,7 @@ var homeData = new Vue({
                     $(".price_grade_shop").hide();
                     $(".main_price_login").show();
                     priceList.map(function(price){
-                        // 用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构
+                        // userIdentity用户身份: 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构
                         // priceFlag: 0公开价格 1不公开价格 2仅对会员机构公开
                         var parent = $(".main_price_text.product_"+ price.productId);
                         var priceFlag = parent.find(".main_price_login").attr('data-id')*1;
@@ -297,10 +297,9 @@ var homeData = new Vue({
                         }
                     });
                     // 侧边模块固定 fixed
-                    if($('#fixed-wrap').length>0 && $(window).width()>1400) {
-                        var tocWrap = $('#fixed-wrap'),
-                            changeSize = $("#globalHead").outerHeight() + $("#swiper-container").outerHeight() + $("#sidebar").outerHeight();
-                            //changeSize = document.getElementById("header").offsetHeight + document.getElementById("sidebar").offsetHeight;
+                    if($('#fixed-wrap').length>0 && $(window).height()>750) {
+                        var tocWrap = $('#fixed-wrap');
+                        var changeSize = $("#globalHead").outerHeight() + $("#swiper-container").outerHeight() + $("#sidebar").outerHeight();
                         scrollSize >= changeSize ? tocWrap.addClass("fixed") : tocWrap.removeClass("fixed");
                     }
                 }

BIN
target/www-0.0.1-SNAPSHOT.jar