[仅供测试]重写navigateTo方法,解决微信小程序中超过10个页面栈时会出现的bug

This commit is contained in:
学习很差啦
2022-07-20 18:24:49 +08:00
parent cbd73ae638
commit 09485747a6
58 changed files with 472 additions and 421 deletions

View File

@@ -151,7 +151,7 @@
for (let i of Array.from(keyword)) {
unicodes += this.unicode(i) + "|"
}
const rule = '(' + unicodes + ')'
const rule = '(' + unicodes + ')'
const reg = new RegExp(rule, 'gi');
return str ? str.replace(reg, matchValue =>
`<span style="color:${this.lightColor}">${matchValue}</span>`
@@ -198,13 +198,13 @@
},
// 跳转到商品详情
navigateToDetailPage(item) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${item.content.id}&goodsId=${item.content.goodsId}`,
});
},
// 跳转地址
navigateToStoreDetailPage(item) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/shopPage?id=${item.content.storeId}`,
});
},
@@ -341,4 +341,4 @@
}
}
</style>
</style>