Commit 36de795d authored by zhengke's avatar zhengke

no message

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