mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 18:56:39 +08:00
更改样式和数据
This commit is contained in:
parent
b67734b6ce
commit
9e4ca15f5d
@ -2,7 +2,6 @@
|
||||
<div>
|
||||
<transition name="fade">
|
||||
<div class="userloding" v-show="isLoading"></div>
|
||||
|
||||
</transition>
|
||||
|
||||
<Myheader></Myheader>
|
||||
@ -112,7 +111,7 @@
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item)">
|
||||
<span>{{ item.categoryName }}</span>
|
||||
<i>0.001{{ item.price }}</i>
|
||||
<i>¥{{ item.ecPrice }}</i>
|
||||
</div>
|
||||
<strong
|
||||
class="
|
||||
@ -317,19 +316,20 @@ export default {
|
||||
isLoading: true,
|
||||
userstype: [],
|
||||
activeIndex: "0",
|
||||
allacindex:0,
|
||||
allacindex: 0,
|
||||
userishwo: true,
|
||||
userishwo1: true,
|
||||
userishwo2: true,
|
||||
userishwo3: true,
|
||||
userishwo4: true,
|
||||
userserachlist: [{
|
||||
categoryName:'', //专区
|
||||
tagUsedAge:'',//年龄
|
||||
tagFunction:'',//功能
|
||||
tagBreed:'', //品种
|
||||
|
||||
}],
|
||||
userserachlist: [
|
||||
{
|
||||
categoryName: "", //专区
|
||||
tagUsedAge: "", //年龄
|
||||
tagFunction: "", //功能
|
||||
tagBreed: "", //品种
|
||||
},
|
||||
],
|
||||
activeIndex1: 0,
|
||||
activeIndexa: "-1",
|
||||
dialogInfo1: false,
|
||||
@ -512,15 +512,13 @@ export default {
|
||||
this.activeIndex = stype;
|
||||
if (stype !== "" && stype !== undefined) {
|
||||
this.onmessage(stype);
|
||||
|
||||
} else {
|
||||
this.usetmessage();
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
async usersearch(stype,usertype) {
|
||||
let data = await searchchanpin(stype,usertype,1,10);
|
||||
async usersearch(stype, usertype) {
|
||||
let data = await searchchanpin(stype, usertype, 1, 10);
|
||||
if (data) {
|
||||
this.rccontair = data;
|
||||
}
|
||||
@ -541,31 +539,30 @@ export default {
|
||||
if (element.name == "品种") {
|
||||
pinzhong.push(element);
|
||||
this.catageb = pinzhong;
|
||||
this.catageb.forEach(element => {
|
||||
element.checked=false;
|
||||
})
|
||||
this.catageb.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
}
|
||||
if (element.name == "功能") {
|
||||
gonneg.push(element);
|
||||
this.catagea = gonneg;
|
||||
this.catagea.forEach(element => {
|
||||
element.checked=false;
|
||||
})
|
||||
this.catagea.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
}
|
||||
if (element.name == "年龄") {
|
||||
age.push(element);
|
||||
this.catage = age;
|
||||
this.catage.forEach(element => {
|
||||
element.checked=false;
|
||||
})
|
||||
this.catage.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
}
|
||||
if (element.name == "专区") {
|
||||
zhuanqu.push(element);
|
||||
this.prefecture = zhuanqu;
|
||||
this.prefecture.forEach(element => {
|
||||
element.checked=false;
|
||||
})
|
||||
|
||||
this.prefecture.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
}
|
||||
console.log(pinzhong);
|
||||
// debugger
|
||||
@ -575,7 +572,7 @@ export default {
|
||||
|
||||
async usetmessage() {
|
||||
this.isLoading = true;
|
||||
let data = await biaome(this.activeIndex1,'', 1, 10);
|
||||
let data = await biaome(this.activeIndex1, "", 1, 10);
|
||||
if (data) {
|
||||
this.rccontair = data;
|
||||
this.isLoading = false;
|
||||
@ -583,7 +580,7 @@ export default {
|
||||
},
|
||||
async onmessage(stype) {
|
||||
this.isLoading = true;
|
||||
let data = await biaomessage(stype,'',1,10);
|
||||
let data = await biaomessage(stype, "", 1, 10);
|
||||
if (data) {
|
||||
this.rccontair = data;
|
||||
this.isLoading = false;
|
||||
@ -653,23 +650,22 @@ export default {
|
||||
selectGoods(item, index) {
|
||||
this.activeIndex1 = index;
|
||||
this.activeIndex = index;
|
||||
this.allacindex=index;
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
|
||||
this.allacindex = index;
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
|
||||
// for (let i = 0; i < this.userserachlist.length; i++) {
|
||||
// if (!this.userserachlist.includes(petType)) {
|
||||
// this.userserachlist.push(petType);
|
||||
// }
|
||||
// }
|
||||
this.userserachlist=[
|
||||
this.userserachlist = [
|
||||
{
|
||||
categoryName:'', //专区
|
||||
tagUsedAge:'',//年龄
|
||||
tagFunction:'',//功能
|
||||
tagBreed:'', //品种
|
||||
}
|
||||
]
|
||||
categoryName: "", //专区
|
||||
tagUsedAge: "", //年龄
|
||||
tagFunction: "", //功能
|
||||
tagBreed: "", //品种
|
||||
},
|
||||
];
|
||||
let pinzhong = [];
|
||||
let zhuanqu = [];
|
||||
let age = [];
|
||||
@ -678,23 +674,19 @@ export default {
|
||||
this.usercatlist.map((element) => {
|
||||
if (element.name == "品种") {
|
||||
pinzhong.push(element);
|
||||
|
||||
this.catageb = pinzhong;
|
||||
}
|
||||
if (element.name == "功能") {
|
||||
gonneg.push(element);
|
||||
this.catagea = gonneg;
|
||||
|
||||
}
|
||||
if (element.name == "年龄") {
|
||||
age.push(element);
|
||||
this.catage = age;
|
||||
|
||||
}
|
||||
if (element.name == "专区") {
|
||||
zhuanqu.push(element);
|
||||
this.prefecture = zhuanqu;
|
||||
|
||||
}
|
||||
});
|
||||
} else if (this.activeIndex1 == 1) {
|
||||
@ -731,7 +723,6 @@ export default {
|
||||
}
|
||||
|
||||
this.activeIndex = index;
|
||||
|
||||
},
|
||||
selectGoodsa(item, index) {
|
||||
this.activeIndex1 = index;
|
||||
@ -757,12 +748,12 @@ export default {
|
||||
this.activeIndexc = index;
|
||||
this.userishwo1 = !this.userishwo1;
|
||||
console.log(this.userishwo1);
|
||||
if(item.checked==false){
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.userserachlist[0].tagUsedAge=item.tagName;
|
||||
this.userserachlist[0].tagUsedAge = item.tagName;
|
||||
this.$refs.chosebox1[index].className = "active";
|
||||
}else{
|
||||
this.userserachlist[0].tagUsedAge='';
|
||||
} else {
|
||||
this.userserachlist[0].tagUsedAge = "";
|
||||
item.checked = false;
|
||||
this.$refs.chosebox1[index].className = "unactive";
|
||||
}
|
||||
@ -772,20 +763,20 @@ export default {
|
||||
// this.userserachlist.push(tagUsedAge);
|
||||
// }
|
||||
// }
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
},
|
||||
selectagc(item, index) {
|
||||
// let tagFunction = {};
|
||||
this.activeIndexd = index;
|
||||
this.userishwo2 = !this.userishwo2;
|
||||
if(item.checked==false){
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.$refs.cgosebox4[index].className = "active";
|
||||
this.userserachlist[0].tagFunction=item.tagName;
|
||||
}else{
|
||||
this.userserachlist[0].tagFunction = item.tagName;
|
||||
} else {
|
||||
item.checked = false;
|
||||
this.$refs.cgosebox4[index].className = "unactive";
|
||||
this.userserachlist[0].tagFunction='';
|
||||
this.userserachlist[0].tagFunction = "";
|
||||
}
|
||||
// if (this.userishwo2 == false) {
|
||||
// tagFunction = {
|
||||
@ -803,20 +794,20 @@ export default {
|
||||
// this.userserachlist.push(tagFunction);
|
||||
// }
|
||||
// }
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
},
|
||||
selectagd(item, index) {
|
||||
let tagBreed = {};
|
||||
this.activeIndexe = index;
|
||||
this.userishwo3 = !this.userishwo3;
|
||||
if(item.checked==false){
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.$refs.chosebox3[index].className = "active";
|
||||
this.userserachlist[0].tagBreed=item.tagName;
|
||||
}else{
|
||||
this.userserachlist[0].tagBreed = item.tagName;
|
||||
} else {
|
||||
item.checked = false;
|
||||
this.$refs.chosebox3[index].className = "unactive";
|
||||
this.userserachlist[0].tagBreed='';
|
||||
this.userserachlist[0].tagBreed = "";
|
||||
}
|
||||
|
||||
// this.$refs.chosebox3[index].className = "unactive";
|
||||
@ -825,19 +816,19 @@ export default {
|
||||
// this.userserachlist.push(tagBreed);
|
||||
// }
|
||||
// }
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
},
|
||||
selectproduct(item, index) {
|
||||
this.activeIndexb = index;
|
||||
// console.log(this.userishwo=!this.userishwo)
|
||||
if(item.checked==false){
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.$refs.chosebox[index].className = "active";
|
||||
this.userserachlist[0].categoryName=item.tagName;
|
||||
}else{
|
||||
this.userserachlist[0].categoryName = item.tagName;
|
||||
} else {
|
||||
item.checked = false;
|
||||
this.$refs.chosebox[index].className = "unactive";
|
||||
this.userserachlist[0].categoryName='';
|
||||
this.userserachlist[0].categoryName = "";
|
||||
}
|
||||
// if (this.userishwo == false) {
|
||||
// console.log("====");
|
||||
@ -857,7 +848,7 @@ export default {
|
||||
// }
|
||||
// }
|
||||
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
},
|
||||
|
||||
//弹框的显示隐藏
|
||||
|
@ -120,7 +120,7 @@
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item)">
|
||||
<span>{{ item.categoryName }}</span>
|
||||
<i>0.001{{ item.price }}</i>
|
||||
<i>¥{{ item.ecPrice }}</i>
|
||||
</div>
|
||||
<strong
|
||||
class="
|
||||
@ -226,7 +226,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogInfo1" hegight="700px" v-if="!isadrond">
|
||||
<div class="usersearch">
|
||||
@ -325,13 +324,14 @@ export default {
|
||||
value: "",
|
||||
isLoading: true,
|
||||
|
||||
userserachlist: [{
|
||||
categoryName:'', //专区
|
||||
tagUsedAge:'',//年龄
|
||||
tagFunction:'',//功能
|
||||
tagBreed:'', //品种
|
||||
|
||||
}],
|
||||
userserachlist: [
|
||||
{
|
||||
categoryName: "", //专区
|
||||
tagUsedAge: "", //年龄
|
||||
tagFunction: "", //功能
|
||||
tagBreed: "", //品种
|
||||
},
|
||||
],
|
||||
userstype: [],
|
||||
activeIndex: "-1",
|
||||
activeIndex1: 0,
|
||||
@ -573,8 +573,8 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
async usersearch(stype,usertype) {
|
||||
let data = await searchchanpin(stype,usertype,1,10);
|
||||
async usersearch(stype, usertype) {
|
||||
let data = await searchchanpin(stype, usertype, 1, 10);
|
||||
if (data) {
|
||||
this.rccontair = data;
|
||||
}
|
||||
@ -630,7 +630,7 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.userstandard[0].style.margin = 0 + "px";
|
||||
});
|
||||
let data = await biaome(this.activeIndex1,this.value, 1, 10);
|
||||
let data = await biaome(this.activeIndex1, this.value, 1, 10);
|
||||
if (data) {
|
||||
this.rccontair = data;
|
||||
this.isLoading = false;
|
||||
@ -658,7 +658,7 @@ export default {
|
||||
},
|
||||
openclose() {
|
||||
this.dialogInfo1 = false;
|
||||
this.isshow=false
|
||||
this.isshow = false;
|
||||
},
|
||||
ifadroind() {
|
||||
var sUserAgent = navigator.userAgent.toLowerCase();
|
||||
@ -702,11 +702,11 @@ export default {
|
||||
},
|
||||
//搜索
|
||||
onSearch(e) {
|
||||
this.usetmessage(this.activeIndex1,this.value,);
|
||||
this.usetmessage(this.activeIndex1, this.value);
|
||||
},
|
||||
selectGoods(item, index) {
|
||||
this.activeIndex1 = index;
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
let pinzhong = [];
|
||||
let zhuanqu = [];
|
||||
let age = [];
|
||||
@ -717,22 +717,18 @@ export default {
|
||||
pinzhong.push(element);
|
||||
|
||||
this.catageb = pinzhong;
|
||||
|
||||
}
|
||||
if (element.name == "功能") {
|
||||
gonneg.push(element);
|
||||
this.catagea = gonneg;
|
||||
|
||||
}
|
||||
if (element.name == "年龄") {
|
||||
age.push(element);
|
||||
this.catage = age;
|
||||
|
||||
}
|
||||
if (element.name == "专区") {
|
||||
zhuanqu.push(element);
|
||||
this.prefecture = zhuanqu;
|
||||
|
||||
}
|
||||
});
|
||||
} else if (this.activeIndex1 == 1) {
|
||||
@ -743,7 +739,6 @@ export default {
|
||||
this.catageb.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
|
||||
}
|
||||
if (element.name == "功能") {
|
||||
gonneg.push(element);
|
||||
@ -751,7 +746,6 @@ export default {
|
||||
this.catagea.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
|
||||
}
|
||||
if (element.name == "年龄") {
|
||||
age.push(element);
|
||||
@ -759,7 +753,6 @@ export default {
|
||||
this.catage.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
|
||||
}
|
||||
if (element.name == "专区") {
|
||||
zhuanqu.push(element);
|
||||
@ -767,7 +760,6 @@ export default {
|
||||
this.prefecture.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -845,10 +837,10 @@ export default {
|
||||
// this.userishwo1 = !this.userishwo1;
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.userserachlist[0].tagUsedAge=item.tagName;
|
||||
this.userserachlist[0].tagUsedAge = item.tagName;
|
||||
this.$refs.chosebox1[index].className = "active";
|
||||
} else {
|
||||
this.userserachlist[0].tagUsedAge='';
|
||||
this.userserachlist[0].tagUsedAge = "";
|
||||
item.checked = false;
|
||||
this.$refs.chosebox1[index].className = "unactive";
|
||||
}
|
||||
@ -867,7 +859,7 @@ export default {
|
||||
// this.userserachlist.push(tagUsedAge);
|
||||
// }
|
||||
// }
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
this.activeIndexc = index;
|
||||
},
|
||||
selectagc(item, index) {
|
||||
@ -878,11 +870,11 @@ export default {
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.$refs.cgosebox4[index].className = "active";
|
||||
this.userserachlist[0].tagFunction=item.tagName;
|
||||
this.userserachlist[0].tagFunction = item.tagName;
|
||||
} else {
|
||||
item.checked = false;
|
||||
this.$refs.cgosebox4[index].className = "unactive";
|
||||
this.userserachlist[0].tagFunction='';
|
||||
this.userserachlist[0].tagFunction = "";
|
||||
}
|
||||
|
||||
// for (let i = 0; i < this.userserachlist.length; i++) {
|
||||
@ -890,7 +882,7 @@ export default {
|
||||
// this.userserachlist.push(tagFunction);
|
||||
// }
|
||||
// }
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
this.activeIndexd = index;
|
||||
},
|
||||
selectagd(item, index) {
|
||||
@ -898,11 +890,11 @@ export default {
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.$refs.chosebox3[index].className = "active";
|
||||
this.userserachlist[0].tagBreed=item.tagName;
|
||||
this.userserachlist[0].tagBreed = item.tagName;
|
||||
} else {
|
||||
item.checked = false;
|
||||
this.$refs.chosebox3[index].className = "unactive";
|
||||
this.userserachlist[0].tagBreed='';
|
||||
this.userserachlist[0].tagBreed = "";
|
||||
}
|
||||
// if (this.userishwo3 == false) {
|
||||
// tagBreed = {
|
||||
@ -919,7 +911,7 @@ export default {
|
||||
// this.userserachlist.push(tagBreed);
|
||||
// }
|
||||
// }
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
this.activeIndexe = index;
|
||||
},
|
||||
selectproduct(item, index) {
|
||||
@ -927,12 +919,11 @@ export default {
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
this.$refs.chosebox[index].className = "active";
|
||||
this.userserachlist[0].categoryName=item.tagName;
|
||||
this.userserachlist[0].categoryName = item.tagName;
|
||||
} else {
|
||||
item.checked = false;
|
||||
this.$refs.chosebox[index].className = "unactive";
|
||||
this.userserachlist[0].categoryName='';
|
||||
|
||||
this.userserachlist[0].categoryName = "";
|
||||
}
|
||||
// this.userishwo = !this.userishwo;
|
||||
// if (this.userishwo == false) {
|
||||
@ -953,7 +944,7 @@ export default {
|
||||
// console.log(this.userserachlist);
|
||||
// }
|
||||
|
||||
this.usersearch(this.userserachlist,this.activeIndex1);
|
||||
this.usersearch(this.userserachlist, this.activeIndex1);
|
||||
},
|
||||
|
||||
//弹框的显示隐藏
|
||||
|
Loading…
Reference in New Issue
Block a user