Commit 07fdff1c authored by cc's avatar cc

update

parent 3d1f55b7
...@@ -80,6 +80,7 @@ class Homepage extends React.Component { ...@@ -80,6 +80,7 @@ class Homepage extends React.Component {
// 7 分享活动 // 7 分享活动
case 7: case 7:
// TODO // TODO
shareStore.doShare();
break; break;
default: default:
......
...@@ -81,7 +81,7 @@ class Store { ...@@ -81,7 +81,7 @@ class Store {
} }
} = {}; } = {};
firstIn = true;
async updateIndex() { async updateIndex() {
const { success, data } = await API.index(); const { success, data } = await API.index();
if (!success) { if (!success) {
...@@ -89,7 +89,26 @@ class Store { ...@@ -89,7 +89,26 @@ class Store {
} }
this.indexData = data; this.indexData = data;
/** 绑定业务员code判断 */
if (data?.boundYkCode) {
// 已绑定
CFG.workerCode = data?.boundYkCode;
} else {
// 未绑定 从链接上取-无论是否有都要调用
if (!data?.isAgent) {
/**后端说增加非业务员才调用 */
const res = await this.bindYkCode(CFG.workerCode || "");
if (res.success && res.data?.code) {
CFG.workerCode = res.data?.code;
}
}
}
if(this.firstIn && data.validUid){
API.visit()
this.firstIn = false
}
} }
/** /**
......
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