openwrt 18.06修改lan ip之后,自动跳转到新的ip

  1. feeds/luci/modules/luci-base/luasrc/view/footer.htm,强制修改为不需要回滚,应该还有更好的方法。。。
    -                               uci_apply(true);
    +                               uci_apply(false);

     

  2. feeds/luci/modules/luci-base/luasrc/view/cbi/apply_widget.htm,当修改lan页面,并且ip不用空时,跳转到新的IP
    -                               uci_confirm(checked, Date.now() + uci_apply_rollback * 1000);
    +                               if(this.location.pathname == "/cgi-bin/luci/admin/network/network/lan" && document.getElementById("cbid.network.lan.ipaddr")!=null)
    +                                       this.location.href = "http://" + document.getElementById("cbid.network.lan.ipaddr").value + this.location.pathname;
    +                               else
    +                                       uci_confirm(checked, Date.now() + uci_apply_rollback * 1000);

     

你可能感兴趣的:(Openwrt)