Commit 5a6f1118 by 张卓

首页自定义分享

parent 0d88fe85
......@@ -235,6 +235,18 @@ export default {
})
//获取分销信息
this.getSpokesmanInit(options)
}else {
let footerVal = {...app.globalData.footerVal};
console.log('"分销员中心"',footerVal)
if (footerVal.componentData) {
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") {
......@@ -335,18 +347,6 @@ export default {
this.$mp.page.selectComponent(".custom-tab-bar").init();
// that.applySucessEntry = res;
})
}else {
let footerVal = {...app.globalData.footerVal};
console.log('"分销员中心"',footerVal)
if (footerVal.componentData) {
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();
}
}
},
getSpokesmanInit(extConfig) {
......@@ -454,38 +454,39 @@ export default {
});
}
},
onShareAppMessage(res){
app.fenxiaoModel.getSpokesmanidByShare().then(res=>{
let newHref = '/pages/home/main';
if (res.hasInvitationStatus == 1) {
newHref = concatUrl(newHref,res)
async onShareAppMessage(res){
console.log(res)
let newHref = '/pages/home/main';
let title = app.globalData.shopInfo.shopName;
await app.fenxiaoModel.getSpokesmanidByShare().then(data=>{
if (data.hasInvitationStatus == 1) {
newHref = concatUrl(newHref,data)
}
let title = app.globalData.shopInfo.shopName;
console.log(newHref,3333555666,title)
return {
title: title, // 默认是小程序的名称
path: newHref, // 默认是当前页面
// imageUrl: this.shareLogoUrl,
success: function(res) {
// 转发成功之后的回调
if (res.errMsg == "shareAppMessage:ok") {
console.log(res, "分享成功");
}
},
fail: function() {
// 转发失败之后的回调
if (res.errMsg == "shareAppMessage:fail cancel") {
// 用户取消转发
console.log(res, "分享失败");
} else if (res.errMsg == "shareAppMessage:fail") {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function() {
// 转发结束之后的回调(转发成不成功都会执行)
}
};
})
console.log(newHref,3333555666,title,res)
return {
title: title, // 默认是小程序的名称
path: newHref, // 默认是当前页面
// imageUrl: this.shareLogoUrl,
success: function(res) {
// 转发成功之后的回调
if (res.errMsg == "shareAppMessage:ok") {
console.log(res, "分享成功");
}
},
fail: function() {
// 转发失败之后的回调
if (res.errMsg == "shareAppMessage:fail cancel") {
// 用户取消转发
console.log(res, "分享失败");
} else if (res.errMsg == "shareAppMessage:fail") {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function() {
// 转发结束之后的回调(转发成不成功都会执行)
}
};
},
onPullDownRefresh(){
console.log('onPullDownRefresh',this.$store.state.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