fix: 登录后 init PageSpy

feature/hotel-cruise
Lei OT 1 year ago
parent f92f3f53bb
commit e42f1f1b6c

@ -254,7 +254,7 @@ const App = () => {
v<span>{APP_VERSION}</span>{' '} v<span>{APP_VERSION}</span>{' '}
</span>{' '} </span>{' '}
©2022 <span > Created by IT</span> ©2022 <span > Created by IT</span>
<Button type='link' onClick={callDebug}>上传/下载debug日志</Button> {window.$pageSpy && <Button type='link' onClick={callDebug}>上传/下载debug日志({window.$pageSpy.address.substring(0, 4)})</Button>}
</Footer> </Footer>
</Layout> </Layout>
</Layout> </Layout>

@ -9,7 +9,6 @@ class AuthStore {
makeAutoObservable(this); makeAutoObservable(this);
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
this.get_auth(); // 放到钉钉环境才能开启 this.get_auth(); // 放到钉钉环境才能开启
window.initPageSpy();
} }
} }
@ -45,6 +44,7 @@ class AuthStore {
_this.user = json.result; _this.user = json.result;
_this.auth = json.result.authlist; _this.auth = json.result.authlist;
window.__spytitle = json.result.name; window.__spytitle = json.result.name;
window.initPageSpy();
}); });
}) })
.catch((error) => { .catch((error) => {

Loading…
Cancel
Save