Commit 2ce6ec9d authored by haiyoucuv's avatar haiyoucuv

init

parent c48d34a0
...@@ -23,7 +23,7 @@ class Yinsirulepop extends React.Component { ...@@ -23,7 +23,7 @@ class Yinsirulepop extends React.Component {
clickTo = _asyncThrottle(async () => { clickTo = _asyncThrottle(async () => {
const { success } = await API.agreePrivacy(); const { success } = await API.agreePrivacy();
if (!success) return; if (!success) return;
store.changePage(PAGE_MAP.PRIZE_PAGE, { from: this.props.popData?.from }); store.changePage(PAGE_MAP.PRIZE_PAGE);
store.getHomeInfo(); store.getHomeInfo();
modalStore.closePop("Yinsirulepop"); modalStore.closePop("Yinsirulepop");
}); });
......
...@@ -222,7 +222,8 @@ class Prizepage extends React.Component { ...@@ -222,7 +222,8 @@ class Prizepage extends React.Component {
}); });
back = _throttle(async () => { back = _throttle(async () => {
store.changePage(this.props?.from || PAGE_MAP.HOME_PAGE); // store.changePage(this.props?.from || PAGE_MAP.HOME_PAGE);
store.backPage();
sensorLog(LOG_KEY.click, "b12124", "d12126", { sensorLog(LOG_KEY.click, "b12124", "d12126", {
operation_name: "返回", operation_name: "返回",
button_name: "返回", button_name: "返回",
......
...@@ -47,7 +47,7 @@ class Userhomepage extends React.Component { ...@@ -47,7 +47,7 @@ class Userhomepage extends React.Component {
modalStore.pushPop("Yinsirulepop"); modalStore.pushPop("Yinsirulepop");
return; return;
} }
store.changePage(PAGE_MAP.PRIZE_PAGE, { from: PAGE_MAP.USER_HOME_PAGE }); store.changePage(PAGE_MAP.PRIZE_PAGE);
}; };
/** 抽奖按钮*/ /** 抽奖按钮*/
......
...@@ -25,8 +25,22 @@ const store = makeAutoObservable({ ...@@ -25,8 +25,22 @@ const store = makeAutoObservable({
index: PAGE_MAP.HOME_PAGE, index: PAGE_MAP.HOME_PAGE,
}[skinId] || PAGE_MAP.HOME_PAGE, }[skinId] || PAGE_MAP.HOME_PAGE,
prevPage: [],
pageData: {}, pageData: {},
/** 场景切换 */
changePage(page, data = {}) {
this.prevPage.push(this.curPage);
this.pageData = data;
this.curPage = page;
},
backPage() {
if (this.prevPage.length === 0) return;
this.curPage = this.prevPage.pop();
},
/** 绑定友客业务员 */ /** 绑定友客业务员 */
async bindYkCode(code) { async bindYkCode(code) {
const res = await API.bindYk({ const res = await API.bindYk({
...@@ -39,11 +53,6 @@ const store = makeAutoObservable({ ...@@ -39,11 +53,6 @@ const store = makeAutoObservable({
shareStore.doShare(); shareStore.doShare();
}, },
/** 场景切换 */
changePage(page, data = {}) {
this.pageData = data;
this.curPage = page;
},
homeInfo: {}, homeInfo: {},
/** 获取活动规则 */ /** 获取活动规则 */
......
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