mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-20 09:33:47 +08:00
Merged 0 version
This commit is contained in:
@@ -214,7 +214,7 @@ export default {
|
||||
productCode:'',//商品code
|
||||
productlist:[],
|
||||
userbuy:true,
|
||||
sales_num:1,
|
||||
sales_num:1,
|
||||
usernewlist: [
|
||||
{
|
||||
price: "30",
|
||||
@@ -538,9 +538,18 @@ usertanchu(item,orderm){
|
||||
|
||||
},
|
||||
userget(){
|
||||
this.userdraw(this.usermessage.data.mobile);
|
||||
|
||||
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.dialogInfo2=true;
|
||||
return
|
||||
}else{
|
||||
this.userdraw(this.usermessage.data.mobile);
|
||||
this.alldrawlist(this.usermessage.data.id);
|
||||
this.dialogInfo1=true;
|
||||
}
|
||||
|
||||
},
|
||||
selectsearch(item, index) {
|
||||
|
||||
@@ -554,6 +563,7 @@ usertanchu(item,orderm){
|
||||
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<h2>专区:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
<h2>年龄:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -37,7 +37,7 @@
|
||||
<h2>功能:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@
|
||||
<h2>品种:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -91,7 +91,7 @@
|
||||
<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'" >
|
||||
<img :src="item.catimage" alt="" />
|
||||
<span>{{ item.title }}</span>
|
||||
<span>{{ item.tagName }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -99,7 +99,7 @@
|
||||
<h2>专区:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -108,7 +108,7 @@
|
||||
<h2>年龄:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -116,7 +116,7 @@
|
||||
<h2>功能:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -125,7 +125,7 @@
|
||||
<h2>品种:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -159,7 +159,7 @@
|
||||
<h2>专区:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -168,7 +168,7 @@
|
||||
<h2>年龄:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -176,7 +176,7 @@
|
||||
<h2>功能:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -185,7 +185,7 @@
|
||||
<h2>品种:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -202,12 +202,16 @@
|
||||
|
||||
<script>
|
||||
import Myheader from '~/components/header.vue'
|
||||
import { userstype,biaomessa,biaomessage } from "../../ajax/getData";
|
||||
import { userstype,biaomessa,biaomessage,searchchanpin } from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: "",
|
||||
userstype:[],
|
||||
activeIndex:0,
|
||||
userserachlist:[
|
||||
{}
|
||||
],
|
||||
activeIndex1:0,
|
||||
activeIndexa:'-1',
|
||||
dialogInfo1:false,
|
||||
@@ -385,32 +389,67 @@ export default {
|
||||
Myheader,
|
||||
},
|
||||
mounted(){
|
||||
|
||||
let stype=this.$route.query.stype;
|
||||
this.userst();
|
||||
this.activeIndex=stype;
|
||||
console.log(stype);
|
||||
if(stype!==''&&stype!==undefined){
|
||||
this.onmessage(stype)
|
||||
}else{
|
||||
this.usetmessage();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
async usersearch(stype){
|
||||
let data=await searchchanpin(stype);
|
||||
if(data){
|
||||
this.rccontair=data;
|
||||
|
||||
}
|
||||
},
|
||||
async userst() {
|
||||
let pinzhong=[];
|
||||
let zhuanqu=[];
|
||||
let age=[];
|
||||
let gonneg=[];
|
||||
let data = await userstype();
|
||||
if(data){
|
||||
this.userstype=data;
|
||||
}
|
||||
this.usercatlist=this.userstype.filter(item=>item.petType=='0')
|
||||
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=gonneg
|
||||
}
|
||||
})
|
||||
this.userdoglisgt=this.userstype.filter(item=>item.petType=='1')
|
||||
|
||||
},
|
||||
|
||||
async usetmessage() {
|
||||
let data = await biaomessa();
|
||||
if(data){
|
||||
this.rccontair=data;
|
||||
}
|
||||
console.log( this.rccontair);
|
||||
},
|
||||
async onmessage(stype) {
|
||||
let data = await biaomessage(stype);
|
||||
if(data){
|
||||
this.rccontair=data;
|
||||
}
|
||||
console.log( this.rccontair);
|
||||
},
|
||||
|
||||
|
||||
@@ -476,19 +515,25 @@ this.dialogInfo1=false;
|
||||
onSearch() {},
|
||||
selectGoods(item, index) {
|
||||
|
||||
this.activeIndex=index;
|
||||
console.log('----');
|
||||
this.activeIndex=index;
|
||||
let petType={
|
||||
petType:this.activeIndex,
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(petType)){
|
||||
this.userserachlist.push(petType)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
},
|
||||
selectGoodsa(item, index) {
|
||||
|
||||
this.activeIndex1=index;
|
||||
console.log('----');
|
||||
},
|
||||
userselect(){
|
||||
this.$nextTick(() => {
|
||||
|
||||
this.ifadroind();
|
||||
console.log( this.$refs.usercontent)
|
||||
|
||||
})
|
||||
},
|
||||
@@ -505,23 +550,60 @@ this.dialogInfo1=false;
|
||||
this.activeIndexa=index;
|
||||
},
|
||||
selectage(item, index) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
this.activeIndexc=index;
|
||||
},
|
||||
selectagc(item, index) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
this.activeIndexd=index;
|
||||
},
|
||||
selectagd(item, index) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
this.activeIndexe=index;
|
||||
},
|
||||
selectproduct(item, index){
|
||||
this.activeIndexb=index;
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
this.usersearch(this.userserachlist)
|
||||
},
|
||||
selectage(item, index) {
|
||||
this.activeIndexc=index;
|
||||
},
|
||||
selectage(item, index) {
|
||||
this.activeIndexc=index;
|
||||
},
|
||||
|
||||
//弹框的显示隐藏
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user