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'){ if(this.$route.path=='/ClassificationDetails'){
bus.$emit('getDate',this.search); bus.$emit('getDate',this.search);
}else{ }else{
this.$router.push({path:'/ClassificationDetails',query:this.search}) this.$router.push({path:'/ClassificationDetails',query:{search:this.search}})
} }
}, },
loginOut(){ loginOut(){

8
src/components/page/ClassificationDetails.vue

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

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

@ -121,7 +121,7 @@ export default {
checkBuy(data).then(res => { checkBuy(data).then(res => {
console.info(res) console.info(res)
if(res.code==100){ 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{ }else{
this.$message.error(res.msg) this.$message.error(res.msg)
} }

Loading…
Cancel
Save