Merge pull request #93 from xiaohuilam/patch-1

分享出去的小程序卡片点开,无pages栈,兼容代码回到首页
This commit is contained in:
weilanwl
2019-06-16 23:27:04 +08:00
committed by GitHub

View File

@@ -52,6 +52,10 @@
},
methods: {
BackPage() {
if (getCurrentPages().length < 2 && 'undefined' !== typeof __wxConfig) {
let url = '/' + __wxConfig.pages[0]
return uni.redirectTo({url})
}
uni.navigateBack({
delta: 1
});