Commit 25b9edfc by 程默

fix

parent 393d6252
......@@ -8,12 +8,11 @@ export default {
let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {};
console.log(extConfig, "-----------extConfig");
if (
process.env.NODE_ENV == "production" ||
JSON.stringify(extConfig) == "{}"
) {
// extConfig = { mixid: "jordan", shopid: 471 };
extConfig = { "mixid":"xyyx",
"shopid":133 };
extConfig = { mixid: "antgood", shopid: 67 };
// extConfig = { "mixid":"xyyx",
// "shopid":133 };
}
console.log("1444444444", extConfig);
this.$store.commit("setExtConfig", extConfig.mixid);
......
......@@ -276,7 +276,6 @@ export default {
setFooterShow(el){
let afterScrollTop = el.scrollTop;
let delta = afterScrollTop - this.beforeScrollTop;
let {showFlag} = this.$mp.page.getTabBar().data;
if(
delta === 0 ||
afterScrollTop < 0 ||
......@@ -287,7 +286,6 @@ export default {
this.beforeScrollTop = afterScrollTop;
return;
}
this.$mp.page.getTabBar().setData({'showFlag':delta>0?'down':'up'})
},
scrolltolower(){
console.log("scrolltolower")
......
......@@ -3,7 +3,7 @@
<div style="width:100%;height:90vh;display:flex;justify-content: center;align-items: center;">
<van-loading size="40px" type="spinner"></van-loading>
</div>
<web-view v-if="withoutScene" :src="'https://test-m-shop.mayi888.cn/?mixid=antgood'" @message="getMessage" @error="handleError" @load="handleLoad"></web-view>
<web-view v-if="withoutScene" :src="pageUrl" @message="getMessage" @error="handleError" @load="handleLoad"></web-view>
</div>
</template>
......@@ -25,13 +25,11 @@ export default {
page: "/",
location_obj:encodeURIComponent(wx.getStorageSync("location")),
params: "?mixid=" + this.shopId+`&native_test=1&location_obj=${this.location_obj}`,
userInfo: {
nickName: "mpvue",
avatarUrl: "http://mpvue.com/assets/logo.png"
},
shareUrl: "",
//分享
shopConfig: null,
spokesmanGroupId: "", // 代言人的集团id
......@@ -82,24 +80,28 @@ export default {
this.options = options;
Object.assign(this.$data, this.$options.data());
this.withoutScene = true;
//获取openId
wx.login({
success: res => {
this.code = res.code;
login.miniLogin({ code: this.code}).then(res1 => {
console.log(res1,555555)
if (res1.data.code == 200) {
wx.setStorage({
key: "openid",
data: res1.data.data.openid
});
}
this.params += '&open_id='+wx.getStorageSync("openid");
console.log(this.code,77777,this.params)
})
},
})
let op=wx.getStorageSync("openid")
if (op) {
this.params += '&open_id='+wx.getStorageSync("openid");
this.withoutScene = true;
}else{
//获取openId
wx.login({
success: res => {
this.code = res.code;
login.miniLogin({ code: this.code}).then(res1 => {
if (res1.data.code == 200) {
wx.setStorage({
key: "openid",
data: res1.data.data.openid
});
}
this.params += '&open_id='+wx.getStorageSync("openid");
this.withoutScene = true;
})
},
})
}
// 移除重复参数
if (options.params) {
let params=decodeURIComponent(options.params)
......@@ -324,13 +326,6 @@ export default {
if (ss && !this.params.includes("sessionid")) {
this.params +=`&sessionid=${ss}`
}
console.log(this.getTabBar,'312')
if (typeof this.getTabBar === 'function' &&
this.getTabBar()) {
this.getTabBar().setData({
selected: this.index
})
}
},
methods: {
init() {
......
......@@ -316,6 +316,17 @@ export default {
delta: 1
});
}else{
wx.reLaunch({
url: `../index/main?from=login&backpath=${
this.backPath
}&params=${encodeURIComponent(this.backParams)}`
});
return
let parseLink=decodeURIComponent(this.backPath);
let isTabbarIndex =checkTabbarPage(parseLink)
console.log('32111',isTabbarIndex,parseLink,this.backParams)
......
......@@ -42,13 +42,14 @@ export function $themeToLink(data, option) {
//判断是否市跳转到tabbar页面 替换首页位置
let isTabbarIndex = checkTabbarPage(parseLink);
// console.log('44',isTabbarIndex)
console.log('444444',isTabbarIndex)
if (isTabbarIndex>=0) {
// isTabbarIndex = isTabbarIndex == 0 ? checkTabbarPage('/') : isTabbarIndex
// wx.switchTab({
// url: parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`,
// })
wx.redirectTo({
console.log(parseLink,'parseLink')
wx.reLaunch({
url: `../index/main?from=home&backpath=${encodeURIComponent(parseLink)}`
})
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