Commit f813e614 authored by 秦垚玲's avatar 秦垚玲

fix:调整

parent 60370acb
This diff is collapsed.
......@@ -1721,8 +1721,8 @@ function gotoTouSuZhiNan() {
</div>
</div>
<iframe src="home.html" id="homeBox" style="border:none; overflow:hidden; width:100%; height:740px;display: block;"></iframe>
<iframe src="account.html" id="accountBox" style="border:none; overflow:hidden; width:100%; height:740px; display: none;"></iframe>
<iframe src="home.html" id="homeBox" style="border:none; overflow:hidden; width:100%; height:790px;display: block;"></iframe>
<iframe src="account.html" id="accountBox" style="border:none; overflow:hidden; width:100%; height:581px; display: none;"></iframe>
<!-- <iframe src="account_detail.html" style="border:none; overflow:hidden; width:100%; height:850px;"></iframe> -->
<!-- <iframe src="account_list.html" style="border:none; overflow:hidden; width:100%; height:2050px;"></iframe> -->
......@@ -9728,6 +9728,43 @@ function whzqProcess(menuId){
</script>
<script type="text/javascript">
// 监听 storage 变化(别的页面改了数字,这里立刻收到)
// window.addEventListener("storage", function (e) {
// console.log("e========",e)
// // 只监听我们的 key
// if (e.key === "pageName") {
// let newValue = e.newValue;
// // ✅ 监听到变化后,自动跳转到目标页面!
// setTimeout(() => {
// // location.href = "target.html?num=" + newValue;
// let homeBox = document.getElementById("homeBox");
// homeBox.style.display = "none";
// let accountBox = document.getElementById("accountBox");
// accountBox.style.display = "block";
// }, 500);
// }
// });
// 父页面暴露一个接收方法给iframe
// window.postMessage = function(val){
// console.log("父组件拿到值===========",val)
// if (val.data == "account") {
// console.log("父组件拿到值===========",val.data)
// // ✅ 监听到变化后,自动跳转到目标页面!
// setTimeout(() => {
// let homeBox = document.getElementById("homeBox");
// homeBox.style.display = "none";
// let accountBox = document.getElementById("accountBox");
// accountBox.style.display = "block";
// }, 500);
// }
// };
// 展示首页信息
function showHome(){
let accountBox = document.getElementById("accountBox");
......@@ -9989,6 +10026,23 @@ $(function(){
try {
if(window.console){
console.log(e);
// 拿到子组件iframe方法
let value = e.data;
if (value.type == 'STATUS_CHANGE') {
// ✅ 监听到变化后,自动跳转到目标页面!
console.log("33333=========")
let homeBox = document.getElementById("homeBox");
homeBox.style.display = "none";
let accountBox = document.getElementById("accountBox");
accountBox.style.display = "block";
// 选中效果
var accountBtn = document.getElementById("0001");
// 主动触发点击事件
accountBtn.click();
}
}
var ori = e.origin;
var ipAddress = 'https://exp.ccb.com';
......
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