Framework7从弹出窗口路由到另一个页面

时间:2019-04-15 13:10:38

标签: routing html-framework-7

当我按下按钮时,如何从app.js的弹出窗口重定向到另一个页面?我正在使用framework7提供的选项卡式预览模板,并在index.html上弹出菜单,当我按某个按钮时,它将转到其他选项卡

var orderPopup = app.popup.create({
  content: '<div class="popup" id="order-popup">....</div>',
  // Events
  on: {
    open: function(data) {
      //insert picker data from & to value
      var pickerFrom = app.picker.create({
        inputEl: '#from-picker',
        cols: [
          {
            textAlign: 'center',
            values: ['Dukuh Pakis','Dukuh Kupang']
          }
        ]
      });
      var pickerTo = app.picker.create({
        inputEl: '#to-picker',
        cols: [
          {
            textAlign: 'center',
            values: ['Dukuh Pakis','Dukuh Kupang']
          }
        ]
      });
    },
    opened: function(data) {
      $$("#order-popup #pesan").on('click',function() {
        var from = $$('#order-popup #from-picker').val();
        var to = $$('#order-popup #to-picker').val();
        redirect: '/catalog/';
        orderPopup.close();
        // window.location.href = "catalog.html";
      });
    }
  }
});

0 个答案:

没有答案