mirror of
https://github.com/weilanwl/coloruicss.git
synced 2026-03-07 06:24:00 +08:00
Merge pull request #93 from xiaohuilam/patch-1
分享出去的小程序卡片点开,无pages栈,兼容代码回到首页
This commit is contained in:
@@ -52,6 +52,10 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
BackPage() {
|
BackPage() {
|
||||||
|
if (getCurrentPages().length < 2 && 'undefined' !== typeof __wxConfig) {
|
||||||
|
let url = '/' + __wxConfig.pages[0]
|
||||||
|
return uni.redirectTo({url})
|
||||||
|
}
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user