Commit e43c63f9 by 展昭

修改灵活用工页面中的JSBridge

parent 161c5619
Showing with 13 additions and 0 deletions
...@@ -179,11 +179,24 @@ export default class FlexEmployee extends Vue { ...@@ -179,11 +179,24 @@ export default class FlexEmployee extends Vue {
} }
} }
//禁止浏览器返回操作
private disableBack() {
console.log("disableBack");
//@ts-ignore
history.pushState(null, null, location.href);
window.addEventListener("popstate", function() {
//@ts-ignore
history.pushState(null, null, location.href);
});
}
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
this.callJSBridage(); this.callJSBridage();
}, 500); }, 500);
this.disableBack();
this.name = localStorage.getItem("name") as string; this.name = localStorage.getItem("name") as string;
this.birthday = localStorage.getItem("birthday") as string; this.birthday = localStorage.getItem("birthday") as string;
const idNo = window.atob(decodeURI(String(this.$route.query.id_no))); const idNo = window.atob(decodeURI(String(this.$route.query.id_no)));
......
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 sign in to comment