Browse Source

优化搜索和收藏购买

master
ltlzx 4 years ago
parent
commit
734485fed4
  1. 2
      src/components/common/Header.vue
  2. 8
      src/components/page/ClassificationDetails.vue
  3. 2
      src/components/page/Purchaser/myCollection.vue

2
src/components/common/Header.vue

@ -103,7 +103,7 @@ export default {
if(this.$route.path=='/ClassificationDetails'){
bus.$emit('getDate',this.search);
}else{
this.$router.push({path:'/ClassificationDetails',query:this.search})
this.$router.push({path:'/ClassificationDetails',query:{search:this.search}})
}
},
loginOut(){

8
src/components/page/ClassificationDetails.vue

@ -172,7 +172,8 @@ export default {
date:'',
min_price:'',
max_price:'',
sort:'create_time desc'
sort:'create_time desc',
search_name:''
},
pageTotal:0,
listingList:[],
@ -183,8 +184,13 @@ export default {
},
created(){
console.info(this.$route.query)
if(this.$route.query){
this.query.search_name=this.$route.query.search
}
bus.$on('getDate', (e) => {
this.query.search_name=e
this.getData()
})
this.getData()
this.getProvince();

2
src/components/page/Purchaser/myCollection.vue

@ -121,7 +121,7 @@ export default {
checkBuy(data).then(res => {
console.info(res)
if(res.code==100){
this.$router.push({path:'/order/confirmOrder',query:{step:0,id:id,count:count}})
this.$router.push({path:'/order/confirmOrder',query:{step:0,id:id,count:count,orderType:0,type:0}})
}else{
this.$message.error(res.msg)
}

Loading…
Cancel
Save