Commit 0d8e6a38 by 李嘉林

自定义页面显示底部导航

parent 38f0b348
...@@ -69,20 +69,27 @@ export default { ...@@ -69,20 +69,27 @@ export default {
let homeIndex = checkTabbarPage("/"); let homeIndex = checkTabbarPage("/");
homeIndex != 0 && homeIndex == tabIndex && (tabIndex = 0); homeIndex != 0 && homeIndex == tabIndex && (tabIndex = 0);
console.log(this.mpApp.globalData.footerVal,tabIndex,this.mpApp.globalData.footerVal.componentData.list.length,'--this.mpApp.globalData.footerVal') console.log(this.mpApp.globalData.footerVal,tabIndex,this.mpApp.globalData.footerVal.componentData.list.length,'--this.mpApp.globalData.footerVal')
if (this.mpApp.globalData.footerVal.componentData.list[tabIndex].link) { let urlLink = this.mpApp.globalData.footerVal.componentData.list[tabIndex].link;
console.log(urlLink,'---urlLink')
if (urlLink) {
this.page = getUrlofLink( this.page = getUrlofLink(
this.mpApp.globalData.footerVal.componentData.list[tabIndex].link urlLink
); );
let query=serialize(options) let query=serialize(options)
console.log(query,'==================', this.params,'-----------------') let urlPrams = urlLink.link.split('?')[1]?urlLink.link.split('?')[1]:"";
console.log(query,'==================', this.params,'-----------------',urlPrams)
// 只兼容底部导航进入活动页面添加参数,跳转完成删除
if(urlPrams){
this.params+=urlPrams?'&'+urlPrams:''
}
this.params+=query?'&'+query:'' this.params+=query?'&'+query:''
} }
let reg = /^\/pages\//; let reg = /^\/pages\//;
console.log(this.pageUrl,'pageUrl======================',this.mpApp.globalData.footerVal.componentData.list[tabIndex].link) console.log(this.pageUrl,'pageUrl======================',urlLink)
if (this.mpApp.globalData.footerVal.componentData.list[tabIndex].link) { if (urlLink) {
if(reg.test(this.mpApp.globalData.footerVal.componentData.list[tabIndex].link.link)){ if(reg.test(urlLink.link)){
wx.reLaunch({ wx.reLaunch({
url: this.mpApp.globalData.footerVal.componentData.list[tabIndex].link.link, url: urlLink.link,
}); });
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment