| | |
| | | }; |
| | | }, |
| | | created() { |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "showBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | |
| | | let color = localStorage.getItem("--colorCard"); |
| | | if (color) { |
| | | document.documentElement.style.setProperty("--colorCard", `${color}`); |
| | |
| | | clearInterval(this.browserTimer); |
| | | }, |
| | | mounted() { |
| | | // 返回按钮回调 |
| | | window.addEventListener("message", (e) => { |
| | | if (e.data.msg === "返回系统设置") { |
| | | this.showWelcome = true; |
| | |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | showWelcome(newVal) { |
| | | if (newVal) { |
| | | // 隐藏返回按按钮 |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "hiddenBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | } else { |
| | | //显示返回按钮 |
| | | window.parent.postMessage( |
| | | { |
| | | msg: "showBack", |
| | | }, |
| | | "*" |
| | | ); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |