聯系官方銷售客服
1835022288
028-61286886
模板標簽里面
首頁彈窗登錄,可以正常顯示登錄,麻煩指點一下,如何在登錄和注冊成功后刷新父頁面窗口。layer彈出層。
<li class="layui-inline"><button id="user-login"><i class="fad fa-user"></i>用戶登錄</button></li> <li class="layui-inline"><button id="user-reg"><i class="fad fa-user-plus"></i>用戶注冊</button></li> // 登錄窗口 $('#user-login').click(function () { layer.open({ type: 2, title: '用戶登錄', offset: '10px', area: ['800px', '850px'], maxmin: true, content: 'index.php?s=member&c=login&m=index', end: function close() { var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); }, }); }); // 注冊窗口 $('#user-reg').click(function () { layer.open({ type: 2, title: '用戶注冊', offset: '10px', area: ['800px', '850px'], maxmin: true, content: 'index.php?s=member&c=register&m=index', end: function close() { var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); }, }); });
論壇上有人分享過這種彈窗登錄代碼
去layer論壇問問嘛,他們那邊應該很熟悉這種類型的問題
回復@止咳糖漿 沒有類似的
去layer找一找肯定有相關的例子吧
換個思路解決
你用的layui彈出本頁面的div來登錄注冊,其實你只要給登錄表單增加登錄成功后跳轉到指定頁面(當前頁面)就實現了刷新。
http://www.zbshanke.com/doc/773.html
如果本回復對你有用,請給個最佳答案
當前頁面URL調用
http://www.zbshanke.com/doc/498.html
人家問的layer,你給他發迅睿的標簽,不對口啊,這種是純js函數了
回復@帝云網絡
回復@帝云網絡 試了,還是不行。他刷新是在彈出頁里面刷新了,沒有在父窗口刷新,頭疼
回復@開黑嗎我玩輔助 換個思路一樣解決,可行。
回復@猴子哥哥 你用的是type: 2,iframe層,所以無法刷新。
你可以換成type: 1,頁面層,,在當前面面中添加登錄表單,就可以了。
我做過多次,100%可行