Commit e86afeda by 张卓

未登录初始化

parent 061aa819
......@@ -228,12 +228,16 @@ export default {
app.getThemePage(this.$store.state.extConfig);
}
let that = this;
//获取个人名片入口
getHomePageQuickAccess().then(res=>{
that.showMyCard = res;
})
//获取分销信息
this.getSpokesmanInit(options)
if(wx.getStorageSync("sessionid")) {
//获取个人名片入口
getHomePageQuickAccess().then(res=>{
that.showMyCard = res;
})
//获取分销信息
this.getSpokesmanInit(options)
}else {
app.globalData.spokesmanInfo = {}
}
// 来源
if (options.from == "logout") {
//来自用户登出
......@@ -268,6 +272,24 @@ export default {
},
onShow() {
//未登录首页分销初始化
// if(!wx.getStorageSync("sessionid")) {
// app.globalData.spokesmanInfo = {};
// app.globalData.applySucessEntry = {};
// this.showSpokesManHome = false;//分销商货架是否展示
// this.showMyCard = false;
// this.showHomepage = false;//分销商首页入口
// this.applySucessEntry = false;//成为分销弹框
// let footerVal = {...app.globalData.footerVal};
// footerVal.componentData.list.forEach(res=>{
// if(res.link.name=="分销员中心"||res.link.name=="分销商中心") {
// res.show = false
// }
// })
// app.globalData.footerVal = footerVal;
// this.$mp.page.selectComponent(".custom-tab-bar").init();
// }
//分销隔流
if(this.toHomePage) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'
app.$themeToLink({
......@@ -299,38 +321,42 @@ export default {
wx.setNavigationBarTitle({title : app.globalData.shopInfo.shopName})
wx.stopPullDownRefresh()
query_isEntry().then((data)=>{
//分销弹框信息
app.globalData.applySucessEntry = data;
console.log(app.globalData.applySucessEntry,3333444)
if (
data.applyRemind == "true" &&
data.displayEntry == "true"
) {
this.applySucessEntry = true;
if(wx.getStorageSync("sessionid")) {
query_isEntry().then((data)=>{
//分销弹框信息
app.globalData.applySucessEntry = data;
console.log(app.globalData.applySucessEntry,3333444)
if (
data.applyRemind == "true" &&
data.displayEntry == "true"
) {
this.applySucessEntry = true;
}else if (
data.applyRemindByDistributor == "true" &&
data.displayEntryByDistributor == "true"
) {
this.applySucessEntry = true
}
let footerVal = {...app.globalData.footerVal};
footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"&&data.displayEntry == 'true') {
res.show = true
}else if(res.link.name=="分销员中心"&&data.displayEntry == 'false') {
res.show = false
}else if(res.link.name=="分销商中心"&&data.displayEntryByDistributor == 'true') {
res.show = true
}else if(res.link.name=="分销商中心"&&data.displayEntryByDistributor == 'false') {
res.show = false
}else if (
data.applyRemindByDistributor == "true" &&
data.displayEntryByDistributor == "true"
) {
this.applySucessEntry = true
}
let footerVal = {...app.globalData.footerVal};
footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"&&data.displayEntry == 'true') {
res.show = true
}else if(res.link.name=="分销员中心"&&data.displayEntry == 'false') {
res.show = false
}else if(res.link.name=="分销商中心"&&data.displayEntryByDistributor == 'true') {
res.show = true
}else if(res.link.name=="分销商中心"&&data.displayEntryByDistributor == 'false') {
res.show = false
}
})
app.globalData.footerVal = footerVal;
this.$mp.page.selectComponent(".custom-tab-bar").init();
// that.applySucessEntry = res;
})
app.globalData.footerVal = footerVal;
this.$mp.page.selectComponent(".custom-tab-bar").init();
// that.applySucessEntry = res;
})
}else {
app.globalData.applySucessEntry = {}
}
},
async getSpokesmanInit(extConfig) {
//绑定上下级关系
......
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