Commit 36de795d authored by zhengke's avatar zhengke

no message

parent 56a57a74
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
<swiper-item v-for="(item, index) in cols" :key="index"> <swiper-item v-for="(item, index) in cols" :key="index">
<view :style="[formatStyle]"> <view :style="[formatStyle]">
<u-grid :col="getColumn(navs)" align="left" :border="false"> <u-grid :col="getColumn(navs)" align="left" :border="false">
<u-grid-item v-for="(c, i) in item" :key="i" class="grid-text" v-if="c.isShow==1" @click="clickHandler(c)"> <u-grid-item v-for="(c, i) in item" :key="i" class="grid-text" v-if="c.isShow==1" @click="clickHandler(c)"
<image :src="getIconLink(c.icon)" mode="widthFix" style="width: 64rpx; height: 64rpx;" /> :style="{'background':isTemplateId==c.TemplateId?'url('+getIconLink(c.checkBgImg)+')no-repeat top 0 left 0':'',
'background-size': '100% 100%'}">
<image :src="isTemplateId==c.TemplateId?getIconLink(c.checkIcon):getIconLink(c.icon)" mode="widthFix" style="width: 64rpx; height: 64rpx;" />
<text :style="{'color':navs.color}">{{ c.name }}</text> <text :style="{'color':navs.color}">{{ c.name }}</text>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
...@@ -86,6 +88,7 @@ ...@@ -86,6 +88,7 @@
props: ["navs"], props: ["navs"],
data() { data() {
return { return {
isTemplateId:'',
cols: [], cols: [],
formatStyle: "", formatStyle: "",
height: 160, height: 160,
...@@ -103,10 +106,10 @@ ...@@ -103,10 +106,10 @@
}; };
}, },
created() { created() {
console.log(this.navs) // console.log(this.navs)
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
let tempArray = []; let tempArray = [];
this.height = this.navs.rows * this.height; this.height = (this.navs.rows * this.height)-21;
this.navs.navs.forEach((x, i) => { this.navs.navs.forEach((x, i) => {
tempArray.push(x); tempArray.push(x);
if ( if (
...@@ -115,6 +118,7 @@ ...@@ -115,6 +118,7 @@
(i != 0 || this.navs.navs.length == 1) (i != 0 || this.navs.navs.length == 1)
) { ) {
this.cols.push(tempArray); this.cols.push(tempArray);
this.isTemplateId = this.cols[0][0].TemplateId
tempArray = []; tempArray = [];
} }
}); });
...@@ -141,6 +145,7 @@ ...@@ -141,6 +145,7 @@
}, },
methods: { methods: {
clickHandler(item) { clickHandler(item) {
this.isTemplateId = item.TemplateId
this.clickItem={}; this.clickItem={};
this.$nextTick(function(){ this.$nextTick(function(){
this.clickItem = item; this.clickItem = item;
...@@ -260,5 +265,7 @@ ...@@ -260,5 +265,7 @@
.companyLeftTitle text{ .companyLeftTitle text{
color:red; color:red;
margin-left:3px; margin-left:3px;
background: url()no-repeat;
} }
</style> </style>
...@@ -6,8 +6,11 @@ ...@@ -6,8 +6,11 @@
<view v-if="(loaded || list.itemIndex < 15) && list.items && list.items.length > 0" <view v-if="(loaded || list.itemIndex < 15) && list.items && list.items.length > 0"
:class="{'uni-indexed-list__list':list.key!='*'}"> :class="{'uni-indexed-list__list':list.key!='*'}">
<view v-if="list.key=='*'" class="imgList"> <view v-if="list.key=='*'" class="imgList">
<view v-for="(item,index) in list.items" :key="index" @click="onClick(idx, index)"> <view class="imgList-bj" v-for="(item,index) in list.items" :key="index" @click="onClick(idx, index)">
<image :src="item.img" mode="scaleToFill"/> <!-- aspectFill scaleToFill-->
<view>
<image :src="item.img" mode="aspectFill"/>
</view>
</view> </view>
</view> </view>
<template v-else> <template v-else>
...@@ -15,8 +18,7 @@ ...@@ -15,8 +18,7 @@
<view class="uni-indexed-list__item-container" @click="onClick(idx, index)"> <view class="uni-indexed-list__item-container" @click="onClick(idx, index)">
<view class="uni-indexed-list__item-border" :class="{'uni-indexed-list__item-border--last':index===list.items.length-1}"> <view class="uni-indexed-list__item-border" :class="{'uni-indexed-list__item-border--last':index===list.items.length-1}">
<view class="imgs" style="margin-right: 20rpx;"> <view class="imgs" style="margin-right: 20rpx;">
<!-- mode="aspectFill" --> <image :src="item.img" mode="aspectFill"/>
<image :src="item.img" mode="scaleToFill"/>
</view> </view>
<view class="uni-indexed-list__item-content"> <view class="uni-indexed-list__item-content">
{{ item.name }} {{ item.name }}
...@@ -163,21 +165,28 @@ ...@@ -163,21 +165,28 @@
.imgList{ .imgList{
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
/* background: #f7f7f7; */ background: #f7f7f7;
} }
.imgList view{ .imgList-bj{
flex-shrink: 0; flex-shrink: 0;
width: 33.33%; width: 33.33%;
text-align: center;
padding: 20rpx 0 0 0; padding: 20rpx 0 0 0;
text-align: center;
} }
.imgList view image{ .imgList-bj view{
width: 100rpx; width: 207rpx;
height: 80rpx; height: 120rpx;
/* margin-right: 10rpx; */ /* margin-right: 10rpx; */
/* margin-left: 10rpx; */ margin-left: 20rpx;
border-radius: 15rpx; border-radius: 20rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.imgList-bj view image{
width: 120rpx;
height: 70rpx;
display: block;
} }
/* .imgList view:nth-child(3n) image{ /* .imgList view:nth-child(3n) image{
margin-right: 0; margin-right: 0;
......
...@@ -178,61 +178,40 @@ ...@@ -178,61 +178,40 @@
data: [] data: []
}], }],
u:{}, u:{},
listShow:true listShow:true,
arrary:[]
}; };
},
computed:{
}, },
watch: { watch: {
Keywords: { Keywords: {
handler: function(value) { handler: function(value) {
uni.showLoading({
title: '加载中'
});
if(value){ if(value){
let arr = this.AllList let arr = JSON.parse(JSON.stringify(this.AllList))
arr = arr.filter(item=>{ let lists = arr.filter(item=>{
return item.Name.toLowerCase().indexOf(value.toLowerCase())!=-1 item.data = item.data.filter(i=>{
}) return i.Name.toLowerCase().indexOf(value.toLowerCase())!=-1;
this.list.forEach(i=>{ })
return i.data = [] return item.data && item.data.length>0
}) })
if(arr.length>0){ if(arr.length>0){
let arrList = this.list.map(item=>{ this.list = lists
return item.Name
})
arr.forEach(item=>{
this.list.forEach(i=>{
// i.data = []
if(item.IsHot==0){
if(item.PinYin==i.letter){
i.data.push(item)
}
}if(item.IsHot==1){
if(i.letter=='*'){
i.data.push(item)
}
}
})
})
this.listShow = true this.listShow = true
uni.hideLoading();
}else{ }else{
this.list.forEach(item=>{ this.list = []
item.data = []
})
this.listShow = false this.listShow = false
uni.hideLoading();
} }
}else{ }else{
this.AllList.forEach(item=>{ this.list = this.AllList
this.list.forEach(i=>{
if(!item.IsHot){
if(item.PinYin==i.letter){
i.data.push(item)
}
}else{
if(i.letter=='*'){
i.data.push(item)
}
}
})
})
this.listShow = true this.listShow = true
uni.hideLoading();
} }
}, },
...@@ -335,7 +314,7 @@ ...@@ -335,7 +314,7 @@
}); });
this.request2( this.request2(
{ {
url: '/api/AppletAssess/GetBrandDropList', url: '/api/AppletAssess/GetBrandGroupList',
data: { data: {
CategoryId: this.classObj.Id?this.classObj.Id:1 CategoryId: this.classObj.Id?this.classObj.Id:1
} }
...@@ -344,35 +323,9 @@ ...@@ -344,35 +323,9 @@
this.isloading = false; this.isloading = false;
if(res.resultCode==1){ if(res.resultCode==1){
this.AllList = res.data this.AllList = res.data
this.indexList.forEach(x=>{ this.list = res.data
x.children=[]; uni.hideLoading();
this.AllList.forEach(j=>{
let obj={}
if(x.ti==j.PinYin){
x.children.push(j)
}
if(x.ti=='*'&&j.IsHot){
x.children.push(j)
}
})
})
// console.log(this.indexList,'6555')
this.AllList.forEach(item=>{
this.list.forEach(i=>{
if(!item.IsHot){
if(item.PinYin==i.letter){
i.data.push(item)
}
}else{
if(i.letter=='*'){
i.data.push(item)
}
}
})
})
setTimeout(()=>{
uni.hideLoading();
},1000)
} }
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
uni.navigateBack(); uni.navigateBack();
}, },
goDetails(item){ goDetails(item){
item.BrandName = item.BrandName.replace(/&/,"8")
uni.navigateTo({ uni.navigateTo({
url: '/pages/Luxury/ValuationDetails?Obj='+JSON.stringify(item) url: '/pages/Luxury/ValuationDetails?Obj='+JSON.stringify(item)
}); });
......
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