Commit 361116d7 by 李嘉林

底部导航问题

parent 6d8481f7
......@@ -51,6 +51,7 @@ export default {
},
},
onLoad(options) {
let tabIndex = this.index>=this.mpApp.globalData.footerVal.componentData.list.length?this.mpApp.globalData.footerVal.componentData.list.length-1:this.index;
this.params = this.$options.data.call(this).params
let ss = wx.getStorageSync("sessionid");
this.ss = ss ? `&sessionid=${ss}` : "";
......@@ -64,21 +65,22 @@ export default {
}
// tabbar 跳转
let homeIndex = checkTabbarPage("/");
homeIndex != 0 && homeIndex == this.index && (this.index = 0);
if (this.mpApp.globalData.footerVal.componentData.list[this.index].link) {
homeIndex != 0 && homeIndex == tabIndex && (tabIndex = 0);
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) {
this.page = getUrlofLink(
this.mpApp.globalData.footerVal.componentData.list[this.index].link
this.mpApp.globalData.footerVal.componentData.list[tabIndex].link
);
let query=serialize(options)
console.log(query,'==================', this.params,'-----------------')
this.params+=query?'&'+query:''
}
let reg = /^\/pages\//;
console.log(this.pageUrl,'pageUrl======================',this.mpApp.globalData.footerVal.componentData.list[this.index].link)
if (this.mpApp.globalData.footerVal.componentData.list[this.index].link) {
if(reg.test(this.mpApp.globalData.footerVal.componentData.list[this.index].link.link)){
console.log(this.pageUrl,'pageUrl======================',this.mpApp.globalData.footerVal.componentData.list[tabIndex].link)
if (this.mpApp.globalData.footerVal.componentData.list[tabIndex].link) {
if(reg.test(this.mpApp.globalData.footerVal.componentData.list[tabIndex].link.link)){
wx.reLaunch({
url: this.mpApp.globalData.footerVal.componentData.list[this.index].link.link,
url: this.mpApp.globalData.footerVal.componentData.list[tabIndex].link.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