赞
踩
- <!--此方法只需要在wxml里添加下面代码即可,无需用 bindtap关联函数-->
- <navigator target="miniProgram" open-type="exit">
- <button plain="true">退出登录</button>
- </navigator>
通过在函数内部调用微信提供的API实现退出小程序,配置项包含成功和失败的回调函数:
- uni.exitMiniProgram({
- success: function() {
- console.log('退出小程序成功');
- },
- fail: function(err) {
- console.log('退出小程序失败', err);
- }
- })
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。