zhengjinyi 7 mēneši atpakaļ
vecāks
revīzija
b7a8e5cf53

+ 2 - 2
src/main/resources/static/css/flea-market/list.css

@@ -18,11 +18,11 @@
     .intro{border-bottom: 1px solid #FF5B00;float: left;margin-top: 10px; }
     .intro a{color: #FF5B00;}
     .mainTab {background: #fff;width:1184px;height: 40px;float: left;}
-    .Listitem:nth-of-type(4n) {margin-right: 0;}
+    .Listitem:nth-child(4n) {margin-right: 0;}
     .mainTab li {height: 40px;line-height: 40px;text-align: center;color: #627386;cursor: pointer;width: 128px;float: left;}
     .mainTab li.addstyle {color: #FF5B00;}
     .shopList {width: 1184px;margin: 0px auto;float:left;font-size: 0;}
-    .shopList-tips{ width: 100%;height: 40px;line-height: 40px;font-size: 14px;color: #999999;}
+    .shopList-tips{ width: 1184px;margin: 0px auto;height: 40px;line-height: 40px;font-size: 14px;color: #999999;}
     .Listitem {width: 284px;display: inline-block;margin: 0 16px 20px 0;border-radius: 8px;overflow: hidden;}
     .itemImg {display: block;position: relative;width: 100%;height: 284px;margin-right: 20px;background-color: #fff;cursor: pointer;}
     .itemImg .bigImg {width: 100%;height: 100%;}

+ 25 - 27
src/main/resources/static/js/flea-market/list.js

@@ -113,7 +113,7 @@ var fleaMarketList = new Vue({
                                _this.hasNextPage = data.hasNextPage;
                                _this.listRecord = data.totalRecord;
                                if(isPC){
-                                   _this.tabchildList = data.results;
+                                   _this.tabchildList = _this.tabchildList.concat(data.results);
                                }else{
                                    if(more){
                                        _this.isScroll = false;
@@ -181,34 +181,32 @@ var fleaMarketList = new Vue({
          setTimeout(function(){  // 图片懒加载
              $("img[data-original]").lazyload();
          },500);
-          if(!isPC){
-            $('footer').addClass("noneImportant");
-            //移动端上垃加载更多
-            $(window).on('scroll', function(){
-                var scrollTop = $(this).scrollTop();
-                var scrollHeight = $(document).height();
-                var windowHeight = window.innerHeight;
-                if (scrollTop + windowHeight >= scrollHeight) {
-                    //此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
-                    var totalPage = Math.ceil(_this.listRecord / _this.listQuery.pageSize)?Math.ceil(_this.listRecord / _this.listQuery.pageSize):1;
-                    var next = _this.listQuery.pageNum+1;
-                    if(next <= totalPage){
-                        if (_this.requestFlag){
-                            _this.listQuery.pageNum = next;
-                            _this.isScroll = true;
-                            setTimeout(function(){
-                                _this.gettabList(true);
-                            },500)
+        //移动端上垃加载更多
+        $(window).on('scroll', function(){
+            const scrollTop = $(this).scrollTop();
+            const scrollHeight = $(document).height();
+            const windowHeight = window.innerHeight;
+            const footerHeight = window.innerHeight + $("footer").height();
+            if ( (isPC ? scrollTop + footerHeight : scrollTop + windowHeight) >= scrollHeight) {
+                //此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
+                var totalPage = Math.ceil(_this.listRecord / _this.listQuery.pageSize)?Math.ceil(_this.listRecord / _this.listQuery.pageSize):1;
+                var next = _this.listQuery.pageNum+1;
+                if(next <= totalPage){
+                    if (_this.requestFlag){
+                        _this.listQuery.pageNum = next;
+                        _this.isScroll = true;
+                        setTimeout(function(){
+                            _this.gettabList(true);
+                        },500)
 
-                        }
-                        _this.requestFlag = false;
-                    }else{
-                        //到底了
-                        _this.noMore = true;
-                        $('footer').removeClass("noneImportant");
                     }
+                    _this.requestFlag = false;
+                }else{
+                    //到底了
+                    _this.noMore = true;
+                    $('footer').removeClass("noneImportant");
                 }
-            });
-        }
+            }
+        });
       },
 });

+ 3 - 1
src/main/resources/templates/flea-market/detail.html

@@ -77,7 +77,9 @@
                                 <span v-if="detail.sold == 1"></span>
                                 <span v-else>价格详聊</span>
                             </span>
-                            <span v-else class="fave-text">¥<span class="big">{{detail.price}}</span></span>
+                            <span v-else class="fave-text">
+                                ¥<span class="big">{{detail.price>0 ? detail.price :'议价'}}</span>
+                            </span>
                         </p>
                     </div>
                      <div class="info " v-if="HandType && userID > 0">

+ 18 - 19
src/main/resources/templates/flea-market/list.html

@@ -17,7 +17,7 @@
             <img src="/img/base/loading.gif">
      </div>
      <template v-else>
-        <div class="wrap">
+        <div class="wrap clear">
 
 <!--            <template>-->
 <!--                <ul class="secondTitle " v-if="isPC">-->
@@ -57,11 +57,10 @@
             <ul class="mainTab" v-if="mainflag">
                 <li v-for="(item,index) in tabList" @click='handleChild(item)' :class="currentID2 ==index?'addstyle':' '">{{item.name}}</li>
             </ul>
-
+            <div class="shopList-tips">
+                <p>说明:仅限采美会员可查看价格及联系方式</p>
+            </div>
             <div class="shopList">
-                <div class="shopList-tips">
-                    <p>说明:仅限采美会员可查看价格及联系方式</p>
-                </div>
                 <div class="Listitem" v-if="isShow" v-for="(item, index) in tabchildList">
                     <a class="itemImg onhref" :href="'/flea-market-'+item.productId+'.html'" target="_blank">
                         <img :src="item.imageList[0]" :class="item.sold==1?'activeImg':''" class="bigImg">
@@ -91,7 +90,7 @@
                             </span>
                             <span v-else>
                                 <span v-if="item.sold == 1">&nbsp;&nbsp;&nbsp;</span>
-                                <span v-else>¥{{ item.price }}</span>
+                                <span v-else>¥{{ item.price > 0 ? item.price : '议价' }}</span>
                             </span>
                         </div>
                         <div class="shijian">
@@ -133,19 +132,19 @@
             <div v-if="(!isPC) && !hasNextPage" class="noMore">----  没有更多了 ----</div>
         </div>
     </template>
-    <div class="pageWrap clear" v-if="isPC">
-        <a v-if="listQuery.pageNum>1" class="prev" @click="toPagination(listQuery.pageNum*1-1)" href="javascript:void(0);"></a>
-        <template v-for="n in showPageBtn">
-            <a v-if="n" :class="{ 'on': (n==listQuery.pageNum) }" @click="toPagination(n)" href="javascript:void(0);">{{ n }}</a>
-            <template v-else>···</template>
-        </template>
-        <a v-if="listQuery.pageNum<pageTotal" class="next" @click="toPagination(listQuery.pageNum*1+1)" href="javascript:void(0);"> </a>
-        <span>共<b v-text="pageTotal>1?pageTotal:1"></b>页</span>
-        <span>跳至</span>
-        <input v-model="pageInput" @blur="checkNum()" />
-        <span>页</span>&nbsp;
-        <a class="btn" href="javascript:void(0);" @click="toPagination(pageInput)">点击跳转</a>
-    </div>
+<!--    <div class="pageWrap clear" v-if="isPC">-->
+<!--        <a v-if="listQuery.pageNum>1" class="prev" @click="toPagination(listQuery.pageNum*1-1)" href="javascript:void(0);"></a>-->
+<!--        <template v-for="n in showPageBtn">-->
+<!--            <a v-if="n" :class="{ 'on': (n==listQuery.pageNum) }" @click="toPagination(n)" href="javascript:void(0);">{{ n }}</a>-->
+<!--            <template v-else>···</template>-->
+<!--        </template>-->
+<!--        <a v-if="listQuery.pageNum<pageTotal" class="next" @click="toPagination(listQuery.pageNum*1+1)" href="javascript:void(0);"> </a>-->
+<!--        <span>共<b v-text="pageTotal>1?pageTotal:1"></b>页</span>-->
+<!--        <span>跳至</span>-->
+<!--        <input v-model="pageInput" @blur="checkNum()" />-->
+<!--        <span>页</span>&nbsp;-->
+<!--        <a class="btn" href="javascript:void(0);" @click="toPagination(pageInput)">点击跳转</a>-->
+<!--    </div>-->
 </div>