小程序点击删除后刷新当前页面

小程序删除元素后刷新当前页面


直接在提交的事件里面添加 that.onLoad();
前提:初始化的数据必须在that.onLoad()当中

 success(res){
 		var that = this;
        console.log(res)
        if(res.data.code==0){ 
          wx.showToast({
            title: '取消预约成功', 
            icon: 'success',
            duration: 1000,
          })
          that.onLoad();//刷新页面
        }
      },

猜你喜欢

转载自blog.csdn.net/hsuan_CSDN/article/details/88997835