Commit e677db30 by 程默

fix 跳转

parent 548132d0
<template>
<div>
<!-- <div>{{withoutScene?"初始化完成":"初始化中"}}</div> -->
<div style="width:100%;height:90vh;display:flex;justify-content: center;align-items: center;">
<van-loading size="40px" type="spinner"></van-loading>
</div>
......@@ -24,7 +23,8 @@ export default {
baseUrl: process.env.BASE_URL,
link: this.baseUrl,
page: "/",
params: "?mixid=" + this.shopId+'&native=1',
location_obj:wx.getStorageSync("location"),
params: "?mixid=" + this.shopId+`&location_obj=${this.location_obj}`,
userInfo: {
nickName: "mpvue",
......@@ -134,7 +134,7 @@ export default {
//来自直播详情
this.page = decodeURIComponent(options.backpath);
if(this.page.includes("?")){
this.params="&mixid=" + this.shopId+'&native=1';
this.params="&mixid=" + this.shopId+`&location_obj=${this.location_obj}`;
}
options.params && (this.params += "&" + serialize(decodeURIComponent(options.params)));
console.log(this.page,this.params)
......
......@@ -22,7 +22,7 @@ export default {
return {
link: process.env.BASE_URL,
page: "/",
params: "?mixid=" + this.$store.state.mixid + "&tabbar=1&native=1",
params: "?mixid=" + this.$store.state.mixid + `&tabbar=1&location_obj=${wx.getStorageSync("location")}`,
index: 1,
ss: "",
};
......
......@@ -21,7 +21,7 @@ export default {
return {
link: process.env.BASE_URL,
page: "/",
params: "?mixid=" + this.$store.state.mixid + "&tabbar=2&native=1",
params: "?mixid=" + this.$store.state.mixid + `&tabbar=2&location_obj=${wx.getStorageSync("location")}`,
index: 2,
ss: "",
};
......
......@@ -21,7 +21,7 @@ export default {
return {
link: process.env.BASE_URL,
page: "/",
params: "?mixid=" + this.$store.state.mixid + "&tabbar=3&native=1",
params: "?mixid=" + this.$store.state.mixid + `&tabbar=3&location_obj=${wx.getStorageSync("location")}`,
index: 3,
ss: "",
};
......
......@@ -21,7 +21,7 @@ export default {
return {
link: process.env.BASE_URL,
page: "/",
params: "?mixid=" + this.$store.state.mixid + "&tabbar=4&native=1",
params: "?mixid=" + this.$store.state.mixid + `&tabbar=4&location_obj=${wx.getStorageSync("location")}`,
index: 4,
ss: "",
};
......
......@@ -27,8 +27,9 @@ export function $themeToLink(data, option) {
let app = getApp();
let type = data.type;
// 点击底部栏
if (option) {
// 点击底部栏--
// if (option) {
// 登录拦截
let parseLink = getUrlofLink(data);
let aa=noLoginListPath.includes(parseLink) || parseLink.substr(0,7)=="/goods/"
console.log(parseLink,aa,'parseLinkparseLinkparseLink',parseLink,noLoginListPath)
......@@ -38,15 +39,19 @@ export function $themeToLink(data, option) {
return
}
// 替换首页位置
//判断是否市跳转到tabbar页面 替换首页位置
let isTabbarIndex = checkTabbarPage(parseLink);
console.log('44',isTabbarIndex)
if (isTabbarIndex>=0) {
isTabbarIndex = isTabbarIndex == 0 ? checkTabbarPage('/') : isTabbarIndex
wx.switchTab({
url: parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`,
})
console.log(option, data,'---',parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`)
return
}
// console.log(option, data,'---',parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`)
// return
// }
// 历史数据
......
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