优化:附近供应商修改为合作企业;附近商家页面 根据商户类型判断是否选中底部导航

This commit is contained in:
wuhui_zzw 2024-04-09 13:32:05 +08:00
parent 5da93f20fc
commit e20fc95141
1 changed files with 9 additions and 5 deletions

View File

@ -272,12 +272,16 @@
activeRouter: '',
};
},
onShow: function() {
onShow(options) {
let that = this
let routes = getCurrentPages();
let curRoute = routes[routes.length - 1].route
this.activeRouter = '/' + curRoute
this.getNav();
let curInfo = routes[routes.length - 1] || {};
let curRoute = curInfo.route;
let merchantType = curInfo.options.merchant_type || 0;
if(merchantType <= 0) that.activeRouter = '/' + curRoute
else that.activeRouter = '/' + curRoute + '?merchant_type=' + merchantType
that.getNav();
},
onLoad(options) {
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
@ -286,7 +290,7 @@
let merchantType = options.merchant_type || 0;
this.sotreParam.merchant_type = merchantType
uni.setNavigationBarTitle({
title: merchantType == 0 ? '附近商家' : (merchantType == 1 ? '附近酒道馆' : '附近供应商')
title: merchantType == 0 ? '附近商家' : (merchantType == 1 ? '附近酒道馆' : '合作企业')
})
this.storeList = [];
if(this.mer_location)this.selfLocation()