Commit 479853e6 authored by zhengke's avatar zhengke

修改

parent d2f50880
......@@ -26,10 +26,10 @@
font-size: 20px;
}
.checkedItem {
background-color: #ff4544;
/* .checkedItem {
background-color: #ff547b;
color: #fff;
}
} */
.quick_arrow .allTags {
margin: 20px;
......@@ -117,19 +117,26 @@
margin-left:-40%;
border-radius: 20px;
}
.qr_Line{
width:100%;
height:1px;
background-color: #F4F4F4;
margin:10px 0;
}
</style>
<template>
<view :style="{ height: contentHeight }">
<u-tabs name="Name" :list="dataFirst" :is-scroll="false" :current="active" :bar-width="80" :font-size="32"
:active-color="mainColor" @change="getChild"></u-tabs>
<scroll-view scroll-x="true" style="white-space: nowrap;display: flex;margin:10px 0">
<view @click="getSecond(item,index)" :class="{'checkedItem':index==active2}" class="quick_slider" v-for="(item,index) in dataSecond" :key="index">{{item.Name}}</view>
<scroll-view scroll-x="true" style="white-space: nowrap;display: flex;margin:10px auto;background-color:#EBEBEB;border-radius:20px;width:95%;overflow:hidden;">
<view @click="getSecond(item,index)" style="padding:8px 17px;margin-left:0;" :style="{ color: index==active2 ? '#fff' : '#272727',backgroundColor:index==active2 ? mainColor:'' }" class="quick_slider" v-for="(item,index) in dataSecond" :key="index">{{item.Name}}</view>
</scroll-view>
<view class="qr_Line"></view>
<view class="quick_top" v-if="dataThird.length>0">
<scroll-view scroll-x="true" style="white-space: nowrap;display: flex;width:90%">
<view @click="getThird(item,index)" :class="{'checkedItem':index==active3}" class="quick_slider" v-for="(item,index) in dataThird" :key="index">{{item.Name}}</view>
<view @click="getThird(item,index)" :style="{ color: index==active3 ? '#fff' : '#272727',backgroundColor:index==active3 ? mainColor:'' }" class="quick_slider" v-for="(item,index) in dataThird" :key="index">{{item.Name}}</view>
</scroll-view>
<view class="quick_arrow">
<view class="quick_arrow" v-if="dataThird.length>4">
<u-icon class="u_icon" name="arrow-up" v-if="show" @click="show=false"></u-icon>
<u-icon class="u_icon" name="arrow-down" v-else @click="show=true"></u-icon>
<u-popup v-model="show" mode="top">
......@@ -157,7 +164,7 @@
<!-- 遍历数组 -->
<view v-if="index>=i*3&&index<3*(i+1)" class="flex-item" style="margin-right:5px;">
<!-- 分段显示 -->
<img :src="subItem" style="height:190rpx;width:190rpx;"></img>
<img :src="subItem" style="height:190rpx;width:190rpx;"/>
</view>
</view>
</view>
......@@ -233,7 +240,7 @@
},
goodTitle:'', //名称=>传子组件
images:[], //图片=>传子组件
qrHeight:180,
qrHeight:160,
showDialog:false
};
},
......@@ -243,7 +250,6 @@
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + 'px';
// this.scrollHeight = this.$utils.calcContentHeight(-40+180) + 'px';
this.scrollHeight = this.$utils.calcContentHeight(-40+this.qrHeight) + 'px';
this.mainColor = this.$uiConfig.mainColor;
},
......@@ -262,7 +268,6 @@
},
onLoad(option) {
this.getList();
this.getContent();
this.u = uni.getStorageSync("mall_UserInfo");
},
methods: {
......@@ -281,10 +286,15 @@
this.dataFirst = data;
if (data && data.length > 0) {
this.dataSecond = data[0].children;
if (data[0].children && data[0].children.length > 0) {
this.dataThird = data[0].children[0].children
// if (data[0].children && data[0].children.length > 0) {
// this.dataThird = data[0].children[0].children
// }
}
if(this.dataFirst.length>0){
this.conMsg.CateId=this.dataFirst[0].Id;
this.getContent();
}
}
);
},
......@@ -304,9 +314,9 @@
},
getChang(){
if(this.dataThird.length==0){
this.qrHeight=145
this.qrHeight=160
}else{
this.qrHeight=180
this.qrHeight=196
}
this.scrollHeight = this.$utils.calcContentHeight(-40+this.qrHeight) + 'px';
},
......@@ -330,6 +340,7 @@
this.active3 = -1;
this.conMsg.CateId = item.Id;
this.getContent();
this.getChang();
},
//点击三级分类
getThird(item, index) {
......@@ -338,6 +349,7 @@
this.show = false;
this.conMsg.CateId = item.Id;
this.getContent();
this.getChang();
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
......@@ -385,9 +397,9 @@
//跳转
goUrl(item){
if (item.LinkUrl && item.LinkUrl.length > 0) {
uni.redirectTo({
uni.navigateTo({
url: item.LinkUrl
});
})
}
},
//分享复制
......@@ -453,4 +465,3 @@
}
};
</script>
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment