//提交预约订单
  wx.request({
    url: 'http://www.pusonglin.cn/app/index.php?i=2&c=entry&do=api&op=addOrder&m=aiunv_book',
    data: e.target.dataset,
    header: {
      'content-type': 'application/json'
    },
    success: function (res) {
      console.log(res.data)
 
      let status = res.data.status;
      if (status == 1) {
        console.log('预定成功')
        wx.showToast({
          title: '成功',
          icon: 'success',
          duration: 2000,
          success:function(){
            console.log('haha');
            setTimeout(function () {
              //要延时执行的代码
              wx.switchTab({
                url: '../user/user'
              })
            }, 2000) //延迟时间
          }
        })
 
 
      }
      if (status == 0) {
        console.log('失败');
      }
 
      that.setData({ addrArray: res.data });
    }
  });

  

 
 
 
 


另外,在内页做页面跳转需要用wx.switchTab。

Good luck!

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
猜你喜欢
  • 2022-12-23
  • 2021-07-02
  • 2022-01-23
  • 2022-01-31
  • 2022-01-26
  • 2022-12-23
相关资源
相似解决方案