优化:附近商家显示底部菜单
This commit is contained in:
parent
da7db827ac
commit
bfdfabc6d1
|
|
@ -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() {},
|
||||
|
|
|
|||
Loading…
Reference in New Issue