Commit 479853e6 authored by zhengke's avatar zhengke

修改

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