【缺陷修复】异步绑定推广员失败的问题
parent
b92bf484df
commit
bfde5df0cd
|
@ -168,12 +168,11 @@ const decryptSpm = (spm) => {
|
||||||
shareParams.platform = platformMap[shareParamsArray[3] - 1];
|
shareParams.platform = platformMap[shareParamsArray[3] - 1];
|
||||||
shareParams.from = fromMap[shareParamsArray[4] - 1];
|
shareParams.from = fromMap[shareParamsArray[4] - 1];
|
||||||
if (shareParams.shareId !== 0) {
|
if (shareParams.shareId !== 0) {
|
||||||
// 已登录 绑定推广员
|
|
||||||
if (user.isLogin) {
|
|
||||||
bindBrokerageUser(shareParams.shareId);
|
|
||||||
} else {
|
|
||||||
// 记录分享者编号
|
// 记录分享者编号
|
||||||
uni.setStorageSync('shareId', shareParams.shareId);
|
uni.setStorageSync('shareId', shareParams.shareId);
|
||||||
|
// 已登录 绑定推广员
|
||||||
|
if (!!user.isLogin) {
|
||||||
|
bindBrokerageUser(shareParams.shareId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +189,11 @@ const bindBrokerageUser = async (val = undefined) => {
|
||||||
if (!shareId) {
|
if (!shareId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await BrokerageApi.bindBrokerageUser({ bindUserId: shareId });
|
const { data } = await BrokerageApi.bindBrokerageUser({ bindUserId: shareId });
|
||||||
|
if (!data) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 绑定成功后清除缓存
|
||||||
uni.removeStorageSync('shareId');
|
uni.removeStorageSync('shareId');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
Loading…
Reference in New Issue