Merge branch 'sit-JiaMin' of https://gitee.com/carl_Ming_1/smart-admin into sit-JiaMin

This commit is contained in:
Vion
2022-01-11 19:08:38 +08:00
3 changed files with 114 additions and 32 deletions

View File

@@ -98,7 +98,7 @@
<div class="rc-bottom rc-main" v-if="isshow">
<div class="rc-bottoma" >
<div class="rc-productcat ts-scrollable">
<div class="rc-cat" v-for="(item, index) in userproduct" :key="index" @click="selectGoodsa(item, index)" :class="activeIndex1 == index ? 'active' : 'unactive'" >
<div class="rc-cat" v-for="(item, index) in userproduct" :key="index" @click="selectGoods(item, index)" :class="activeIndex1 == index ? 'active' : 'unactive'" >
<img :src="item.catimage" alt="" />
<span>{{ item.title }}</span>
</div>
@@ -217,10 +217,15 @@ export default {
data() {
return {
value: "",
userserachlist:[
{
}
],
userstype:[],
activeIndex:0,
activeIndex1:0,
activeIndexa:'-1',
activeIndexa:0,
dialogInfo1:false,
activeIndexb:'-1',
activeIndexc:'-1',
@@ -403,10 +408,13 @@ this.userst();
},
methods: {
async usersearch(stype,categoryName,tagUsedAge,tagFunction,tagBreed){
let data=await searchchanpin(stype,categoryName,tagUsedAge,tagFunction,tagBreed);
async usersearch(stype){
let data=await searchchanpin(stype);
console.log(data);
if(data){
this.rccontair=data;
}
},
async userst() {
let pinzhong=[];
@@ -534,11 +542,22 @@ this.dialogInfo1=false;
console.log(e);
},
selectGoods(item, index) {
this.activeIndex1=index;
let petType={
petType:this.activeIndex1,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(petType)){
this.userserachlist.push(petType)
}
console.log(this.userserachlist);
}
this.usersearch(this.userserachlist)
console.log(index);
let pinzhong=[];
let zhuanqu=[];
let age=[];
let gonneg=[];
this.activeIndex1=index;
if(this.activeIndex1==0){
this.usercatlist.map(element=>{
if(element.name=='品种'){
@@ -559,7 +578,7 @@ this.dialogInfo1=false;
}
})
console.log(pinzhong);
}else if(this.activeIndex1==1){
this.userdoglisgt.map(element=>{
@@ -657,36 +676,78 @@ this.dialogInfo1=false;
selectsearch(item, index) {
console.log(item)
this.value=item.title;
this.activeIndexa=index;
},
selectage(item, index) {
console.log(item)
let tagUsedAge={
petType:this.activeIndex1,
tagUsedAge:item.tagName
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(tagUsedAge)){
this.userserachlist.push(tagUsedAge)
}
console.log(this.userserachlist);
}
this.usersearch(this.userserachlist)
this.activeIndexc=index;
},
selectagc(item, index) {
console.log(item)
let tagFunction={
petType:this.activeIndex1,
tagFunction:item.tagName
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(tagFunction)){
this.userserachlist.push(tagFunction)
}
console.log(this.userserachlist);
}
this.usersearch(this.userserachlist)
this.activeIndexd=index;
},
selectagd(item, index) {
console.log(item)
let tagBreed={
petType:this.activeIndex1,
tagBreed:item.tagName
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(tagBreed)){
this.userserachlist.push(tagBreed)
}
console.log(this.userserachlist);
}
this.usersearch(this.userserachlist)
this.activeIndexe=index;
},
selectproduct(item, index){
console.log(item)
this.activeIndexb=index;
this.usersearch(this.activeIndex1,item.tagName,'','','')
let categoryName={
petType:this.activeIndex1,
categoryName:item.tagName,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(categoryName)){
this.userserachlist.push(categoryName)
}
console.log(this.userserachlist);
}
this.usersearch(this.userserachlist)
},
selectage(item, index) {
this.activeIndexc=index;
},
selectage(item, index) {
this.activeIndexc=index;
},
// selectage(item, index) {
// this.activeIndexc=index;
// },
// selectage(item, index) {
// this.activeIndexc=index;
// },
//弹框的显示隐藏
},