From 7aee8d4d550bcfdbe79ba926f467579c4e770735 Mon Sep 17 00:00:00 2001 From: chen <2659004835@qq.com> Date: Tue, 1 Mar 2022 15:23:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E9=A6=96=E9=A1=B5=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=BB=91=E5=8A=A8=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/hengmei.css | 8 ++ components/cart-subgroup/cart.vue | 80 +----------------- components/containers/container-subgroup.vue | 7 ++ pages/tabbar/my/my.vue | 2 +- pages/tabbar/pagehome/pagehome.vue | 84 ++++--------------- .../distributionCenter/distributionCenter.vue | 2 +- 6 files changed, 37 insertions(+), 146 deletions(-) diff --git a/commons/hengmei.css b/commons/hengmei.css index 88c7545..aab19d0 100644 --- a/commons/hengmei.css +++ b/commons/hengmei.css @@ -439,6 +439,14 @@ button:after{content: none!important;} +scroll-view ::-webkit-scrollbar { + display: none !important; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; +} + diff --git a/components/cart-subgroup/cart.vue b/components/cart-subgroup/cart.vue index eae6caa..59f5a81 100644 --- a/components/cart-subgroup/cart.vue +++ b/components/cart-subgroup/cart.vue @@ -74,84 +74,10 @@ }, data() { return { - dataList:[], + dataList:[],//数据列表 scrolViewheigh:uni.getSystemInfoSync().screenHeight - 141, - // dataList:[ - // { - // id:1, - // isActive:true, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:2000, - // num:1 - // }, - // { - // id:2, - // isActive:true, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:2000, - // num:2 - // }, - // { - // id:3, - // isActive:false, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:2000, - // num:1 - // }, - // { - // id:4, - // isActive:false, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:2000, - // num:1 - // }, - // { - // id:5, - // isActive:false, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:2000, - // num:1 - // }, - // { - // id:6, - // isActive:false, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:2000, - // num:1 - // }, - // { - // id:7, - // isActive:false, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:2000, - // num:1 - // }, - // { - // id:8, - // isActive:false, - // imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', - // title:'于亿年宝藏中臻选1的宝石级钻石每年开采数LOVE100 星座光的原石挑选 ', - // specs1:'颜色:白色', - // price:3000, - // num:1 - // } - // ], - ifCheckAll:false, - page:1, // 第几页 + ifCheckAll:false,//是否全选 + page:1, // 页数 size:20, // 数量 total:0, // 总数 tempraryData:'',//暂时储存input数据 diff --git a/components/containers/container-subgroup.vue b/components/containers/container-subgroup.vue index 816a265..5247fec 100644 --- a/components/containers/container-subgroup.vue +++ b/components/containers/container-subgroup.vue @@ -80,4 +80,11 @@ .container-loading .loading-box span:nth-child(2){border-radius: 50% 50% 50% 0;transform-origin: bottom left;animation-delay: .5s;} .container-loading .loading-box span:nth-child(3){border-radius: 50% 0 50% 50%;transform-origin: top right;animation-delay: 1.5s;} .container-loading .loading-box span:nth-child(4){border-radius: 0 50% 50% 50%;transform-origin: top left;animation-delay: 1s;} + scroll-view ::-webkit-scrollbar { + display: none !important; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; + } diff --git a/pages/tabbar/my/my.vue b/pages/tabbar/my/my.vue index d92846c..4eef3cf 100644 --- a/pages/tabbar/my/my.vue +++ b/pages/tabbar/my/my.vue @@ -29,7 +29,7 @@ {{itemo.title}} - {{itemo.num}} + {{itemo.num}} diff --git a/pages/tabbar/pagehome/pagehome.vue b/pages/tabbar/pagehome/pagehome.vue index d4f4447..48f1250 100644 --- a/pages/tabbar/pagehome/pagehome.vue +++ b/pages/tabbar/pagehome/pagehome.vue @@ -19,42 +19,12 @@ - - - - - - - - - - - - -

{{item1.name}}

- {{item1.subtitle}} - - - 限时优惠 - -
- - - - - - - {{item2.name}} - ¥{{item2.price}} - 限时优惠 - - - - - -
-
-
+ + + + + +
@@ -100,7 +70,7 @@ showTop:false, // 是否显示回到顶部 dataList:[], // 数据列表 page:1, // 第几页 - size:200, // 数量 + size:10, // 数量 total:0, // 总数 titleList:uni.getStorageSync('footTitle'), // 底部导航文字 imgList:uni.getStorageSync('footimg'), // 底部导航图标 @@ -117,14 +87,6 @@ }, onPageScroll(e) { e.scrollTop > 360 ? this.showTop = true : this.showTop = false; - let info = uni.createSelectorQuery().select('.tab-nav'); - info.boundingClientRect(data=>{ - if(data.top==this.statusBarHeight){ - this.isScroll = true; - } else { - this.isScroll = false; - } - }).exec(); }, onHide() { // 关闭自动轮播 @@ -152,6 +114,12 @@   };   return shareObj; }, + onReachBottom() { + if(this.total != (this.dataList[0].length + this.dataList[1].length)){ + this.page++ + this.checkList(); + } + }, onLoad(options) { // 查询是否显示视频 this.$toolAll.tools.isVedio(); @@ -211,9 +179,6 @@ if(this.classifyList.length){ // 分类第一次加载,设置分类id this.classifyId = this.classifyList[0].id; - this.classifyList.forEach(item=>{ - this.dataList.push([[],[]]); - }) this.$nextTick(()=>{ //查询商品列表 this.checkList(); @@ -226,17 +191,6 @@ this.$toolAll.tools.showToast(err.msg); }) }, - // 视图容器触底事件 - scrollBottomEv(){ - // 判断总数是否等于数组长度,如果相等显示暂无更多,否则继续执行列表事件 - if(this.total!=(this.dataList[this.current][0].length+this.dataList[this.current][1].length)){ - // 页数每次+1 - this.page++ - this.checkList(); // 调用列表事件 - } else { - this.noMore = true; - } - }, // 查询商品列表 checkList(){ let params = { @@ -252,14 +206,14 @@ this.$requst.post('/api/spu/home',params).then(res=>{ if(res.code==0){ if(this.page==1) { - this.dataList[this.current] = [[],[]]; + this.dataList = [[],[]]; } // 设置列表总数 this.total = res.data.total; if(res.data.list.length){ res.data.list.forEach(item=>{ if(item.home_display=='big'){ - this.dataList[this.current][0].push(item); + this.dataList[0].push(item); } else { let twoObj = { amount: item.amount, @@ -273,11 +227,11 @@ subtitle: item.subtitle, tag: item.tag } - this.dataList[this.current][1].push(item); + this.dataList[1].push(item); } }) } - if(this.total == (this.dataList[this.current][0].length + this.dataList[this.current][1].length)){ + if(this.total == (this.dataList[0].length + this.dataList[1].length)){ this.noMore = true; } uni.hideLoading(); @@ -354,10 +308,6 @@ clickTab(index){ // 设置选中下标 this.current = index; - }, - // 列表滑动事件 - swiperChange(e){ - this.current = e.detail.current; // 调用执行列表查询事件 this.executeCheckList(); }, diff --git a/pagesA/distributionCenter/distributionCenter.vue b/pagesA/distributionCenter/distributionCenter.vue index ca6a7e5..f38446a 100644 --- a/pagesA/distributionCenter/distributionCenter.vue +++ b/pagesA/distributionCenter/distributionCenter.vue @@ -145,7 +145,7 @@ methods: { // 查询佣金信息 checkCommissionEv(){ - this.$requst.post('/api/user/commission').then(res=>{ + this.$requst.post('/api/user/commission',{page:this.page,size:this.size}).then(res=>{ if(res.code==0){ if(this.page==1) this.dataList = []; // 分销中心数字信息