mirror of
https://github.com/weilanwl/coloruicss.git
synced 2026-03-06 22:04:01 +08:00
Merge pull request #93 from xiaohuilam/patch-1
分享出去的小程序卡片点开,无pages栈,兼容代码回到首页
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user