From 531c9368362a9d5d7f5af96089d8e1aa416c0a67 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期三, 28 六月 2023 09:49:53 +0800
Subject: [PATCH] no message

---
 public/html/fengqiangbang.html |   64 ++++++++++++++++++++++++++++---
 1 files changed, 57 insertions(+), 7 deletions(-)

diff --git a/public/html/fengqiangbang.html b/public/html/fengqiangbang.html
index e3c9fe6..c42537a 100644
--- a/public/html/fengqiangbang.html
+++ b/public/html/fengqiangbang.html
@@ -31,7 +31,7 @@
             appKey: 'bkuibk',//姝ゅ鏇挎崲鎴愮敤鎴穉ppKey
             jumpGoodsUrl: function (items,sourceType) {   //榛樿鐩存帴杞摼
                 var url='';
-                if(sourceType=="jd"||sourceType=="pdd")
+                if(sourceType=="jd"||sourceType=="pdd"||sourceType=="dy")
                 {
                     var itemsStr=Infoformat(JSON.stringify(items));
                     url='/pages/goods/goodsDetail?sourcefrom=fqb&info=' +  encodeURIComponent(itemsStr)
@@ -101,7 +101,7 @@
             height: .4rem;background: rgba(255,129,70,.9);border-radius: .2rem;display: table;margin: .3rem auto;padding: 0 .2rem;font-size: .22rem;color: #fff;line-height: .4rem;
         }
         .list-container .topThree{
-            display: -webkit-flex;display: flex;-webkit-justify-content: center;justify-content: center;
+            display: -webkit-flex;display: flex;-webkit-justify-content: center;justify-content: center; margin-top: .3rem;
         }
         .list-container .topThree>div {
             width: 2.2rem;height: 3.4rem;background: #fff;border-radius: .14rem;padding: .1rem;position: relative;
@@ -241,7 +241,7 @@
             font-weight: 500;color: #fff;line-height: .65rem;text-align: center;
         }
         .list-container .card-block{
-            padding-top: 15px;
+          
         }
         .sys{
             width: 100%;
@@ -278,6 +278,11 @@
             font-size: .35rem;
             color: #333;
         }
+        .contscore
+        {
+            overflow:scroll;
+            height: 80vh;
+        }
     </style>
 </head>
 
@@ -310,7 +315,7 @@
 
         <div class="swiper-container card-block">
             <div class="swiper-wrapper">
-                <div class="swiper-slide swiper-no-swiping">
+                <div class="swiper-slide swiper-no-swiping contscore">
                         <div class="topThree">
                                 <div v-for="(item,index) in goodsList" :key = "index" v-if="index==1"  @click="handleCdetailFavorite(item)">
                                     <a>
@@ -433,7 +438,7 @@
             ss:0,
             cid:0,
             type:1,
-            //posturl:'http://dfg.shop.com',
+           // posturl:'http://dfg.shop.com',
            // posturl:'http://dfgapp.ushopvip.com',
             posturl:'http://appapitest.ushopvip.com',
             platlist:[
@@ -455,9 +460,16 @@
                 }
             ],
             platid:'tb',
+            scrollTop: 0,
+			canScroll: false,
+            nowPage:1,
+            loadData:false
         },
         onload(options){
             console.log(options);
+        },
+        onReachBottom(){
+            console.log("鍒板簳浜�111");
         },
         methods:{
             getItemDetail:function(items)
@@ -478,12 +490,36 @@
                        _config.jumpGoodsUrl(res.data,_this.platid);
                     })
             },
+            scrollLoad: function() {
+				//
+				var _this = this;
+				var range = 800; //璺濅笅杈圭晫闀垮害/鍗曚綅px
+				var totalheight = 0;
+				$('.contscore').scroll(function() {
+					var scroll = document.getElementsByClassName('contscore')
+					var srollPos = $('.contscore').scrollTop(); //婊氬姩鏉¤窛椤堕儴璺濈(椤甸潰瓒呭嚭绐楀彛鐨勯珮搴�)
+					totalheight = parseFloat($('.contscore').height()) + parseFloat(srollPos);
+					_this.scrollTop = srollPos
+					var scrollH = scroll[0].scrollHeight
+					// debugger
+					// console.log('scrollH - range',scrollH - range,'srollPos',srollPos)
+					if (scrollH - range <= srollPos) {
+						if (_this.canScroll&&_this.platid!='tb') {
+                            _this.canScroll = false;
+							_this.loadData = true;
+							_this.nowPage++;
+							_this.getGoodsList(_this.cid);
+						}
+					}
+				});
+			},
             handleCdetailFavorite: function (items) {
                 if(_config.jumpGoodsUrl){
                     switch(this.platid)
                     {
                         case "tb":
                         case "pdd":
+                        case "dy":
                             _config.jumpGoodsUrl(items,this.platid);
                             break;
                         case "jd":
@@ -551,7 +587,9 @@
                 })
             },
             chooseCate:function(index,cid,type){//閫夋嫨鍒嗙被
-                mySwiper.slideTo(index-2, 1000, false)
+                mySwiper.slideTo(index-2, 1000, false);
+                this.nowPage=1;
+                this.goodsList=[];
                 this.actIndex = index;
                 this.getGoodsList(cid,type)
                 this.cid = cid;
@@ -560,11 +598,13 @@
             choosePlat:function(index,id)
             {//閫夋嫨骞冲彴
                 this.platid = id;
+                this.goodsList=[];
                 this.getCateList();
             },
             getCateList:function(){//鑾峰彇鍒嗙被鍒楄〃
                 var _this = this;
                 //_this.loading=true;
+                this.nowPage=1;
                 if(this.platid=='tb')
                 {
                     $.ajax({
@@ -683,11 +723,20 @@
                         cid:cid,
                         type:type,
                         app_key: _config.appKey,
+                        mainid:_this.nowPage
                     }
                 }).done(function(res){
                     _this.loading=false;
                     if(res.code == 0){
-                        _this.goodsList =_this.platid=='tb'? res.data.data.data:res.data;
+                        var resdata=_this.platid=='tb'? res.data.data.data:res.data;
+                        _this.goodsList=_this.goodsList.concat(resdata);
+                        if(resdata&&resdata.length>0)
+                        {
+                            _this.canScroll=true;
+                        }
+                        else{
+                            _this.canScroll=false;
+                        }
                       //  _this.sys = (res.data.data && res.data.data.sys) ? res.data.data.sys : null;
                     }
                     else {
@@ -768,6 +817,7 @@
         mounted:function(){
             this.getCateList();
             this.cateRender();
+            this.scrollLoad();
             // this.getDateNow();
             //this.getGoodsList();
            // this.getNowTime();

--
Gitblit v1.9.3