Skip to content

Commit

Permalink
分享出去的小程序卡片点开,无pages栈,兼容代码回到首页
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuilam authored Apr 12, 2019
1 parent 1cc9a37 commit 85c4809
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Colorui-UniApp/colorui/components/cu-custom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down

0 comments on commit 85c4809

Please sign in to comment.