Commit 258f0e8b by 程默

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

parents 79c1bc55 a73a5b73
......@@ -145,7 +145,8 @@ export default {
showHomepage: false,//分销商首页入口
applySucessEntry: false,//成为分销弹框
getDistributorHomepageName: '',//小店入口名称
active:-1
active:-1,
toHomePage: false,//是否分销隔断
};
},
components:{
......@@ -284,6 +285,13 @@ export default {
},
onShow() {
if(this.toHomePage) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'
app.$themeToLink({
type: 1,
link:linkVal,
});
}
this.getCartNum();
this.$mp.page.onPageScroll= (el)=>{
throttle(this.scrolls(el),100)
......@@ -312,8 +320,23 @@ export default {
},
getSpokesmanInfo(extConfig) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo';
getMiniProgram().then(res=>{
app.globalData.spokesmanInfo = res;
if(
res&&
res!='-1'&&
res.distributorHomepage&&
res.distributorHomepage != 'null'&&
res.parentPartitionHomepageFlag == '1'
) {
this.toHomePage = true;
// let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'
app.$themeToLink({
type: 1,
link:linkVal,
});
}
getDistributorHomepage(app.globalData.spokesmanInfo).then(ele=>{
if(ele.id) {
this.getDistributorHomepageName = '我的小店';
......@@ -329,6 +352,7 @@ export default {
}else {
this.showSpokesManHome = false;
}
console.log(app.globalData.spokesmanInfo,555666)
if(app.globalData.spokesmanInfo&&app.globalData.spokesmanInfo.distributionModel == '1') {
this.showHomepage = true;
}else{
......
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