更新代码

This commit is contained in:
guaishoudemao
2021-02-06 17:25:18 +08:00
parent d5353ccbdc
commit 1df499236d
40 changed files with 2294 additions and 2338 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view class='productSort'>
<view class='productSort copy-data'>
<view class='header acea-row row-center-wrapper'>
<view class='acea-row row-between-wrapper input'>
<text class='iconfont icon-sousuo'></text>
@@ -7,7 +7,7 @@
placeholder-class='placeholder'></input>
</view>
</view>
<view class='aside' :style="{bottom: tabbarH + 'px',height: height + 'rpx'}">
<view class='aside'>
<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList"
:key="index" @click='tap(index,"b"+index)'><text>{{item.name}}</text></view>
</view>
@@ -15,7 +15,7 @@
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;"' @scroll="scroll"
scroll-with-animation='true'>
<block v-for="(item,index) in productList" :key="index">
<view class='listw' :id="'b'+index">
<view class='title acea-row row-center-wrapper'>
<view class='line'></view>
@@ -25,6 +25,9 @@
<view class='list acea-row'>
<block v-for="(itemn,indexn) in item.child" :key="indexn">
<navigator hover-class='none' :url='"/pages/goods_list/index?cid="+itemn.id+"&title="+itemn.name' class='item acea-row row-column row-middle'>
<!-- <view class='picture' :style="{'background-color':(itemn.extra&&itemn.extra.indexOf('https://') > -1) || (itemn.extra&&itemn.extra.indexOf('http://') > -1)?'none':'#f7f7f7'}">
<image :src='itemn.extra'></image>
</view> -->
<view class='picture' :style="{'background-color':itemn.extra?'none':'#f7f7f7'}">
<image :src='itemn.extra'></image>
</view>
@@ -61,19 +64,18 @@
onLoad(options) {
this.getAllCategory();
},
onShow(){
},
onShow() {},
methods: {
infoScroll: function() {
let that = this;
let len = that.productList.length;
let child = that.productList[len - 1]&&that.productList[len - 1].child?that.productList[len - 1].child:[];
this.number = child?child.length:0;
let child = that.productList[len - 1] && that.productList[len - 1].child ? that.productList[len - 1].child : [];
this.number = child ? child.length : 0;
//设置商品列表高度
uni.getSystemInfo({
success: function(res) {
that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
that.height = (res.windowHeight) * (750 / res.windowWidth);
},
});
let height = 0;
@@ -98,9 +100,9 @@
let that = this;
getCategoryList().then(res => {
that.productList = res.data;
setTimeout(function(){
setTimeout(function() {
that.infoScroll();
},500)
}, 500)
})
},
scroll: function(e) {
@@ -142,7 +144,7 @@
z-index: 9;
border-bottom: 1rpx solid #f5f5f5;
}
.productSort .header .input {
width: 700rpx;
height: 60rpx;
@@ -151,41 +153,45 @@
box-sizing: border-box;
padding: 0 25rpx;
}
.productSort .header .input .iconfont {
font-size: 35rpx;
color: #555;
}
.productSort .header .input .placeholder {
color: #999;
}
.productSort .header .input input {
font-size: 26rpx;
height: 100%;
width: 597rpx;
}
.productSort .aside {
position: fixed;
width: 180rpx;
width: 24%;
left: 0;
top:0;
top: 0;
background-color: #f7f7f7;
overflow-y: auto;
overflow-x: hidden;
height: auto;
margin-top: 96rpx;
/* 兼容 IOS<11.2 */
bottom: calc(100rpx+ constant(safe-area-inset-bottom));
/* 兼容 IOS>11.2 */
bottom: calc(100rpx + env(safe-area-inset-bottom));
}
.productSort .aside .item {
height: 100rpx;
width: 100%;
font-size: 26rpx;
color: #424242;
}
.productSort .aside .item.on {
background-color: #fff;
border-left: 4rpx solid #fc4141;
@@ -194,58 +200,55 @@
color: #fc4141;
font-weight: bold;
}
.productSort .conter {
margin: 96rpx 0 0 180rpx;
padding: 0 14rpx;
background-color: #fff;
}
.productSort .conter .listw {
padding-top: 20rpx;
}
.productSort .conter .listw .title {
height: 90rpx;
}
.productSort .conter .listw .title .line {
width: 100rpx;
height: 2rpx;
background-color: #f0f0f0;
}
.productSort .conter .listw .title .name {
font-size: 28rpx;
color: #333;
margin: 0 30rpx;
font-weight: bold;
}
.productSort .conter .list {
flex-wrap: wrap;
}
.productSort .conter .list .item {
width: 177rpx;
margin-top: 26rpx;
}
.productSort .conter .list .item .picture {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.productSort .conter .list .item .picture image {
width: 100%;
height: 100%;
border-radius: 50%;
div{
background-color: #f7f7f7;
}
}
.productSort .conter .list .item .name {
font-size: 24rpx;
color: #333;