uniapp退出微信小程序的代码

uni.exitMiniProgram()

uni.exitMiniProgram()是UniApp提供的方法之一,用于在小程序平台中退出当前小程序应用

该方法还可以接受一个配置项,配置项包含成功和失败的回调函数:

uni.exitMiniProgram({
	success: function() {
		console.log('退出小程序成功');
	},
	fail: function(err) {
		console.log('退出小程序失败', err);
	}
})

猜你喜欢

转载自blog.csdn.net/qq_68155756/article/details/132669857