修改装修搜索传参

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

View File

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