Commit 64ba1365 by 程默

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 5c35035a bb7b3f79
...@@ -210,6 +210,7 @@ export default { ...@@ -210,6 +210,7 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
Object.assign(this.$data, this.$options.data());
if (options.from && options.from == "logout") { if (options.from && options.from == "logout") {
//来自用户登出 //来自用户登出
wx.removeStorage({ wx.removeStorage({
...@@ -228,12 +229,24 @@ export default { ...@@ -228,12 +229,24 @@ export default {
app.getThemePage(this.$store.state.extConfig); app.getThemePage(this.$store.state.extConfig);
} }
let that = this; let that = this;
if(wx.getStorageSync("sessionid")) {
//获取个人名片入口 //获取个人名片入口
getHomePageQuickAccess().then(res=>{ getHomePageQuickAccess().then(res=>{
that.showMyCard = res; that.showMyCard = res;
}) })
//获取分销信息 //获取分销信息
this.getSpokesmanInit(options) this.getSpokesmanInit(options)
}else {
app.globalData.spokesmanInfo = {};
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 (options.from == "logout") { if (options.from == "logout") {
//来自用户登出 //来自用户登出
...@@ -268,6 +281,7 @@ export default { ...@@ -268,6 +281,7 @@ export default {
}, },
onShow() { onShow() {
//分销隔流
if(this.toHomePage) { if(this.toHomePage) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo' let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'
app.$themeToLink({ app.$themeToLink({
...@@ -299,6 +313,7 @@ export default { ...@@ -299,6 +313,7 @@ export default {
wx.setNavigationBarTitle({title : app.globalData.shopInfo.shopName}) wx.setNavigationBarTitle({title : app.globalData.shopInfo.shopName})
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
if(wx.getStorageSync("sessionid")) {
query_isEntry().then((data)=>{ query_isEntry().then((data)=>{
//分销弹框信息 //分销弹框信息
app.globalData.applySucessEntry = data; app.globalData.applySucessEntry = data;
...@@ -331,6 +346,9 @@ export default { ...@@ -331,6 +346,9 @@ export default {
this.$mp.page.selectComponent(".custom-tab-bar").init(); this.$mp.page.selectComponent(".custom-tab-bar").init();
// that.applySucessEntry = res; // that.applySucessEntry = res;
}) })
}else {
app.globalData.applySucessEntry = {}
}
}, },
async getSpokesmanInit(extConfig) { 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