[仅供测试]重写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

@@ -1,11 +1,11 @@
<template>
<view class="add-address">
<div class="uForm">
<u-form :border-bottom="false" :model="form" ref="uForm" :error-type="['toast']" :rule="rules">
<u-form :border-bottom="false" :model="form" ref="uForm" :error-type="['toast']" :rule="rules">
<!-- #ifndef H5 -->
<view class="selectAddress" @click="clickUniMap">
选择收货地址
</view>
</view>
<!-- #endif -->
<u-form-item class="border" label="收货人" label-width="130" prop="name">
<u-input v-model="form.name" clearable placeholder="请输入收货人姓名" />
@@ -162,7 +162,7 @@ export default {
delete this.form.updateTime;
editAddress(this.form).then((res) => {
if (res.data.success) {
uni.navigateTo({
this.$navigateTo({
url: `/${beforePage.route}`,
});
}

View File

@@ -129,7 +129,7 @@ export default {
//新建。编辑地址
addAddress(id) {
if (id) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/mine/address/add?id=" +
id +
@@ -138,7 +138,7 @@ export default {
"&type=order",
});
} else {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/mine/address/add?way=" + this.routerVal.way + "&type=order",
});

View File

@@ -145,7 +145,7 @@ export default {
},
//新建。编辑地址
addAddress(id) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/mine/address/add${id ? "?id=" + id : ""}`,
});
},

View File

@@ -50,7 +50,7 @@ export default {
* 跳转
*/
navgition(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},

View File

@@ -38,7 +38,7 @@ export default {
let res = await recharge({ price: this.price });
if (res.data.success) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/cart/payment/payOrder?orderType=RECHARGE&recharge_sn=${res.data.result.rechargeSn}`,
});
}

View File

@@ -58,12 +58,12 @@ export default {
},
methods: {
handleClick(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},
queryGoods(src) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/mine/distribution/${src}`,
});
},

View File

@@ -221,7 +221,7 @@ export default {
* 查看图片
*/
handleNavgationGoods(val) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${val.skuId}&goodsId=${val.goodsId}`,
});
},

View File

@@ -56,7 +56,7 @@
methods: {
...mapMutations(["logout"]),
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url
});
},

View File

@@ -45,7 +45,7 @@ export default {
},
methods: {
goDetail(sn,logi_id,ship_no){
uni.navigateTo({
this.$navigateTo({
url:'/pages/msgTips/packagemsg/logisticsDetail?order_sn=' + sn +'&logi_id='+logi_id+'&ship_no='+ship_no,
})
},

View File

@@ -174,7 +174,7 @@
*/
goGoodsDetail(val) {
//商品详情
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/goods?id=" + val.skuId + "&goodsId=" + val.goodsId,
});
},
@@ -184,7 +184,7 @@
*/
goStoreMainPage(id) {
//店铺主页
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/shopPage?id=" + id,
});
},

View File

@@ -84,7 +84,7 @@
* 导航到店铺
*/
navgaiteToStore(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
@@ -100,7 +100,7 @@
* 跳转详情
*/
navgaiteToDetail(item) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId,
});
},
@@ -256,4 +256,4 @@
display: -webkit-flex;
display: flex;
}
</style>
</style>

View File

@@ -88,7 +88,7 @@ export default {
},
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},

View File

@@ -16,7 +16,7 @@ export default {
methods: {
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url: url,
});
},

View File

@@ -49,7 +49,7 @@ export default {
if (url == "/pages/set/securityCenter/securityCenter") {
url += `?mobile=${this.userInfo.mobile}`;
}
uni.navigateTo({
this.$navigateTo({
url: url,
});
},