优化:附近商家显示底部菜单

This commit is contained in:
wuhui_zzw 2024-03-28 16:50:11 +08:00
parent da7db827ac
commit bfdfabc6d1
1 changed files with 28 additions and 2 deletions

View File

@ -172,6 +172,9 @@
</block>
</view>
<rightSlider v-if="rightBox" :status="rightBox" :merList="merList" :storeTypeArr="storeTypeArr" @confirm="confirm" @close="close"></rightSlider>
<!--自定义底部tab栏-->
<customTab :newData="newData" :activeRouter="activeRouter"></customTab>
</view>
</template>
@ -185,12 +188,16 @@
import { HTTP_REQUEST_URL } from '@/config/app'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import spread from "../../../libs/spread";
import customTab from '@/components/customTab';
import { getNavigation } from "@/api/public";
const app = getApp();
export default {
components: {
recommend,
rightSlider,
easyLoadimage
easyLoadimage,
customTab
},
data() {
return {
@ -260,8 +267,18 @@
count: 0,
storeTypeArr: [], //
merList: [], //
newData: {},
activeRouter: '',
};
},
onShow: function() {
let that = this
let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].route
this.activeRouter = '/' + curRoute
this.getNav();
},
onLoad(options) {
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.sotreParam.category_id= options.cate_id && options.cate_id.split(',').toString() || ''
@ -278,7 +295,6 @@
},500)
this.getClassfication();
this.getStoreType();
//
if(options.spread) spread(options.spread, this.isLogin)
},
@ -527,6 +543,16 @@
delta: 1
})
},
getNav() {
getNavigation().then(res => {
this.newData = res.data
if (this.newData.status && this.newData.status.status) {
uni.hideTabBar()
} else {
uni.showTabBar()
}
})
},
},
//
onPullDownRefresh() {},