00024-layui on one page, open another page, iframe version

Posted Jun 4, 20201 min read

On my customer page, adjust to my contract page:

<div>Please go to [<a style="color:green" class="toPage" data-type="toPage" >Contract Management My Contract</a>]page to submit for review! </div>

js:

var active = {
          toPage:function() {
              top.layui.index.openTabsPage("order/myOrdersList.jsp",'My contract');
          }
}

      $("body").on('click','.toPage', function(){
          var type = $(this).data('type');
          active[type]? active[type].call(this):'';
      });

The key code to open another page(tab):

top.layui.index.openTabsPage("order/myOrdersList.jsp",'My contract');