uniapp 新增数据跳转后刷新页面


// 新增页面

this.$u.post('/Reporting/GhtPersonSign/UpdateExamine', this.formPersonnel).then(res => {
  if (res.errcode == 0) {
    const eventChannel = this.getOpenerEventChannel();
    eventChannel.emit('reloadPersonnels');

    uni.showToast({
      title: '审核绑定成功',
      icon: 'success',
      mask: true,
      success: () => {
        setTimeout(function() {
          console.log('审核ok');
          uni.navigateBack(); //返回上一页
        }, 1000);
      }
    });
  } else {
    this.$u.toast(res.errmsg);
  }
});

 

// 查询页面

audit_binding(uid) {
  let that = this;
  this.$u.post('/Reporting/Common/BindTask',{ uid:uid,type:6,flag:1 }).then(res => {
    if(res.errcode == 0){
      uni.navigateTo({
        url: '/pages/toexamine/personnel_audit_binding',
        events: {
        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
        reloadPersonnels: function(data){
          that.reloadList();
          uni.$emit('refreshUnVerify_IndexManage')
        }
    },
    success: function(res) {
    // 通过eventChannel向被打开页面传送数据
      res.eventChannel.emit('acceptDataFromOpenerPage', { uid: uid });
    }
  });
}else{
  this.$u.toast(res.errmsg)
}
});
},

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM