Page({
/**
* 页面的初始数据
*/
data: {
isShow: 'true',
// 手机号
isMy: false,
shareCode: '', //分享code
getShareCode: '', //获取到的分享code
getShareId: '', //分享者id
id: '', // 被分享的id
cate: 2 //分类初始值 不为0 或者1
},
onLoad: function (options) {
this.setData({
id: options.id //a分享b b点击进入 存的a 的uid
})
console.log('分享数据', options)
if (options == '') {
return app.myShowToast('暂无数据')
}
if (JSON.stringify(options) != '{}') {
if (options.code) {
this.setData({
getShareCode: options.code,
getShareId: options.id
})
console.log('我的id', this.data.getShareId)
if (app.globalData.uid != 1) {
this.getShare(1, options.code)
}
}
}
},
// 分享微信步数
getShare(cate, share_code) {
console.log('share_code', share_code)
小程序分享获取上下级关系
最新推荐文章于 2024-05-10 15:14:49 发布