Commit f025467f by 李嘉林

底部导航链接拼接优化

parent 8b680255
......@@ -30,7 +30,8 @@ export default {
return {
link: process.env.BASE_URL,
page: "/",
params: "?mixid=" + this.$store.state.mixid,
// params: "?mixid=" + this.$store.state.mixid,
params: "",
ss: "",
timestamp:"",
isMiniPage : false,
......@@ -40,9 +41,9 @@ export default {
computed: {
pageUrl() {
console.log(this.link,'******',this.page,'-------',this.params,'++++++++')
let pageUrl = this.page.startsWith("http") ? this.page : (this.link + this.page);
return (
this.link +
this.page +
pageUrl +
this.params +
`&native_test=1&tabbar=${this.index}&location_obj=${wx.getStorageSync(
"location"
......@@ -55,6 +56,7 @@ export default {
console.log('--onLoad')
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
console.log(options,'---------------onLoad--params')
let ss = wx.getStorageSync("sessionid");
this.ss = ss ? `&sessionid=${ss}` : "";
......@@ -81,7 +83,11 @@ export default {
console.log(query,'==================', this.params,'-----------------',urlPrams)
// // 只兼容底部导航进入活动页面添加参数,跳转完成删除
if(query){
this.params+='&'+query
if(this.params) {
this.params+='&'+query
} else {
this.params+='?'+query
}
} else {
this.params+=urlPrams?'&'+urlPrams:''
}
......
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