Commit e677db30 by 程默

fix 跳转

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