修改装修搜索传参

master
mahe 2022-11-17 10:36:52 +08:00
parent 8c5b703c47
commit 7f71614781
2 changed files with 14 additions and 4 deletions

View File

@ -89,7 +89,7 @@
>
<div class="navbar-right"></div>
<search style="width: 100%" :res="item.options" />
<search style="width: 100%" :res="item.options" :storeId = "storeId"/>
</u-navbar>
<carousel v-if="item.type == 'carousel'" :res="item.options" />
<titleLayout v-if="item.type == 'title'" :res="item.options" />
@ -234,6 +234,8 @@ export default {
*/
async onLoad(options) {
this.storeId = options.id;
console.log(this.storeId,'this.storeId')
this.goodsParams.storeId = options.id;
this.couponParams.storeId = options.id;
},

View File

@ -12,17 +12,25 @@
<script>
export default {
title:"搜索栏",
props: ["res"],
props: ["res","storeId"],
methods: {
linkMsgDetail(){
uni.navigateTo({
url:`/pages/tabbar/home/title`
})
},
handleSearch() {
if(this.storeId){
uni.navigateTo({
url: "/pages/navigation/search/searchPage",
url: `/pages/navigation/search/searchPage?storeId=${this.storeId}`,
});
}else{
uni.navigateTo({
url: `/pages/navigation/search/searchPage`,
});
}
},
},
};