//提交预约订单
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!

wx.showToast 延时跳转~~~的更多相关文章

  1. 微信小程序 提示框延时跳转

    wx.showToast({ title: '成功', icon: 'success', duration: 2000, success:function(){ console.log('haha') ...

  2. Android 实现页面的延时跳转

    Android APP在初次使用的时候往往会出现APP的首页标志,然后几秒之后进入导航页,今天就记录一下,首页的延时跳转的两种方法: 第一种使用Handler延时跳转,在onCreate的方法中加入一 ...

  3. 用HTML/JS/PHP方式实现页面延时跳转

    WEB开发中经常会遇到页面跳转或延时跳转的需求,掌握各种页面跳转方式非常必要. 以下是我总结有用HTML/JS/PHP三类方式实现跳转的方法,例子皆为三秒后跳转到index.php 页面. 1,HTM ...

  4. 黄聪:PHP页面跳转如何实现延时跳转

    php在用header重定向的时候,可以设置下延时跳转,代码如下: header("Refresh:5;url=index.php");

  5. PHP JS HTML ASP页面跳转代码 延时跳转代码 返回到上一界面并刷新 JS弹出指定大小的新窗口

    1.PHP延时跳转代码 //跳转到浏览界面 header("Refresh:1;url=machine_list.php"); //不延时 <?php header(&quo ...

  6. PHP JS HTML ASP页面跳转代码 延时跳转代码

    1.PHP延时跳转代码 //跳转到浏览界面 header("Refresh:1;url=machine_list.php"); //不延时 <?php header(&quo ...

  7. 微信小游戏 交互接口的使用 wx.showToast wx.showLoading

    在小游戏中,会有如下图的提示窗口,这些可以使用微信提供的交互接口实现. 使用loading等待的接口.mask=true表示遮罩,防止等待时点击其他按钮触发其他操作导致异常. wx.showLoadi ...

  8. 微信小程序API交互反馈,wx.showToast显示消息提示框

    导读:wx.showToast(OBJECT) 显示消息提示框. OBJECT参数说明: 参数 类型 必填 说明 最低版本 title String 是 提示的内容 icon String 否 图标, ...

  9. 小程序弹框wx.showModal、wx.showActionSheet、wx.showToast

    wx.showModal wx.showModal({ title: '删除图片', content: '确定要删除该图片?', showCancel: true,//是否显示取消按钮 cancelT ...

随机推荐

  1. c# ms chart 控件使用方法

    第一个简单的chart: spline// Create new data series and set it's visualattributes       Series series = new ...

  2. 根据Unicode码生成汉字

    最近需要一批汉字字符数据,类似数字字符与ASCII码之间的对应关系,汉字字符与Unicode码之间也存在对应关系. 所以可以遍历Unicode码批量生成汉字. 其中,汉字为宽字符,输出时候注意需要修改 ...

  3. js 零零散散的总结。

    Array.slice.call(arguments);可以将一个类数组转化为数组. Array.from() ,[...arr];也可以将一个类数组转化为数组(es6). (function() { ...

  4. SGU 181 X-Sequence(一题比较水的求模找规律)

    E - X-Sequence Time Limit:500MS     Memory Limit:4096KB     64bit IO Format:%I64d & %I64u Submit ...

  5. HDU 5285 wyh2000 and pupil 判二分图+贪心

    题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5285 bc:http://bestcoder.hdu.edu.cn/contests/con ...

  6. Struts2(七)

    以下内容是基于导入struts2-2.3.32.jar包来讲的 1.xml验证 Struts2提供了验证器,实现了通用的验证逻辑.例如: 非空验证器.长度验证器.日期验证器.email验证器等.具体定 ...

  7. 找"数学口袋精灵"bug

    团队成员的博客园地址: 刘森松:http://home.cnblogs.com/u/lssh/ 郭志豪:http://home.cnblogs.com/u/gzh13692021053/ 谭宇森:ht ...

  8. Git回滚merge操作

    执行完merge操作后,没有修改代码 1.命令 ⑴ git reflog 查看merge操作的上一个提交记录的版本号 ⑵ git reset –hard 版本号 这样可以回滚到merge之前的状态 2 ...

  9. iOS 关于MVC和MVVM设计模式的那些事

    一.概述 在 iOS 开发中,MVC(Model View Controller)是构建iOS App的标准模式,是苹果推荐的一个用来组织代码的权威范式.Apple甚至是这么说的.在MVC下,所有的对 ...

  10. (转)maven下载jar包速度慢(解决办法)

    本文转载至http://blog.csdn.net/ko289830707/article/details/53559052 现在maven项目非常流行,因为它对jar实行了一个非常方便的管理,我们可 ...