wx.showToast 延时跳转~~~
//提交预约订单
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 延时跳转~~~的更多相关文章
- 微信小程序 提示框延时跳转
wx.showToast({ title: '成功', icon: 'success', duration: 2000, success:function(){ console.log('haha') ...
- Android 实现页面的延时跳转
Android APP在初次使用的时候往往会出现APP的首页标志,然后几秒之后进入导航页,今天就记录一下,首页的延时跳转的两种方法: 第一种使用Handler延时跳转,在onCreate的方法中加入一 ...
- 用HTML/JS/PHP方式实现页面延时跳转
WEB开发中经常会遇到页面跳转或延时跳转的需求,掌握各种页面跳转方式非常必要. 以下是我总结有用HTML/JS/PHP三类方式实现跳转的方法,例子皆为三秒后跳转到index.php 页面. 1,HTM ...
- 黄聪:PHP页面跳转如何实现延时跳转
php在用header重定向的时候,可以设置下延时跳转,代码如下: header("Refresh:5;url=index.php");
- PHP JS HTML ASP页面跳转代码 延时跳转代码 返回到上一界面并刷新 JS弹出指定大小的新窗口
1.PHP延时跳转代码 //跳转到浏览界面 header("Refresh:1;url=machine_list.php"); //不延时 <?php header(&quo ...
- PHP JS HTML ASP页面跳转代码 延时跳转代码
1.PHP延时跳转代码 //跳转到浏览界面 header("Refresh:1;url=machine_list.php"); //不延时 <?php header(&quo ...
- 微信小游戏 交互接口的使用 wx.showToast wx.showLoading
在小游戏中,会有如下图的提示窗口,这些可以使用微信提供的交互接口实现. 使用loading等待的接口.mask=true表示遮罩,防止等待时点击其他按钮触发其他操作导致异常. wx.showLoadi ...
- 微信小程序API交互反馈,wx.showToast显示消息提示框
导读:wx.showToast(OBJECT) 显示消息提示框. OBJECT参数说明: 参数 类型 必填 说明 最低版本 title String 是 提示的内容 icon String 否 图标, ...
- 小程序弹框wx.showModal、wx.showActionSheet、wx.showToast
wx.showModal wx.showModal({ title: '删除图片', content: '确定要删除该图片?', showCancel: true,//是否显示取消按钮 cancelT ...
随机推荐
- mysql先删除后插入导致死锁
所报的错误为:pymysql.err.OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting ...
- Beta阶段第2周/共2周 Scrum立会报告+燃尽图 04
此作业要求参见https://edu.cnblogs.com/campus/nenu/2018fall/homework/2412 版本控制地址 [https://git.coding.net/ ...
- struts通配符*的使用
<action name="user_*" class="com.wangcf.UserAction" method="{1}"> ...
- 利用p4实现ipv6转发实验
写在前面 只是作为一个入门p4的实验尝试,借用了一些即成的运行代码. p4代码 /**p4_16,v1_model**/ #include<core.p4> #include<v1m ...
- HDU 5225 枚举
题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5225 bc(中文):http://bestcoder.hdu.edu.cn/contests ...
- 新手使用github过程记录
初次接触github,记录下我的使用过程.一开始确实有些懵,但好在网上这类的教程有很多,过程也很详细易懂,按照网上的教程走完全没问题,感谢无私分享辛苦整理的各位前辈们. 注册github账号 创建一个 ...
- [并查集] More is Better
题目描述 Mr Wang wants some boys to help him with a project. Because the project is rather complex, the ...
- vim 简单用法
vim 是一个纯文本编辑器 模式化的编辑器 1:编辑模式2:输入模式3:末行模式 : 具有命令的接口,在末行模式中可以直接的通过命令修改vim编辑器打开的文本文件 模式转换 1:编辑模式—>输入 ...
- 软工alpha阶段个人总结
一.个人总结 类别 具体技能和面试问题 现在的回答(大三下) 语言 最拿手的语言之一,代码量是多少? java,代码量在一万行左右 语言 最拿手的语言之二,代码量是多少? C语言,代码量在五千行左右 ...
- Win10 版本情况 201810