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

@@ -718,13 +718,13 @@ export default {
linkMsgDetail() {
// lili 基础客服
uni.navigateTo({
this.$navigateTo({
url: `/pages/tabbar/home/web-view?IM=${this.storeDetail.storeId}`,
});
// udesk 代码
// if (this.storeDetail.merchantEuid) {
// uni.navigateTo({
// this.$navigateTo({
// url: `/pages/tabbar/home/web-view?src=${this.IM}`,
// });
// }
@@ -744,7 +744,7 @@ export default {
// sign: this.storeDetail.yzfSign,
// mpSign: this.storeDetail.yzfMpSign,
// };
// uni.navigateTo({
// this.$navigateTo({
// url:
// "/pages/product/customerservice/index?params=" +
// encodeURIComponent(JSON.stringify(params)),
@@ -752,7 +752,7 @@ export default {
// // #endif
// // #ifndef MP-WEIXIN
// const sign = this.storeDetail.yzfSign;
// uni.navigateTo({
// this.$navigateTo({
// url:
// "/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
// sign,
@@ -916,7 +916,7 @@ export default {
* 跳转到店铺页面
*/
navigateToStore(store_id) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/shopPage?id=` + store_id,
});
},

View File

@@ -94,7 +94,7 @@ export default {
);
},
toComment(id, grade) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/comment?id=${id}&grade=${grade}`,
});
},

View File

@@ -54,7 +54,7 @@ export default {
this.getShippingAddress()
}
else{
uni.navigateTo({
this.$navigateTo({
url: 'pages/passport/login'
});
}
@@ -71,7 +71,7 @@ export default {
getpicker() {
// this.$refs.cityPicker.show();
uni.navigateTo({
this.$navigateTo({
url: "/pages/mine/address/add",
});
this.closeAddress();

View File

@@ -57,13 +57,13 @@ export default {
},
// 点击商品
clickGoods(val) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${val.content.id}&goodsId=${val.content.goodsId}`,
});
},
tostorePage(val) {
uni.navigateTo({
this.$navigateTo({
url: "../product/shopPage?id=" + val.storeId,
});
},

View File

@@ -74,7 +74,7 @@ export default {
},
methods: {
handleClickStore(val){
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/shopPage?id=${val.id}`
});
},

View File

@@ -1,6 +1,6 @@
<template>
<div>
<u-navbar :border-bottom="false">
<u-navbar :border-bottom="false">
<u-search v-model="keyword" @custom='search' :show-action="true" action-text="搜索" :animation="true" @search="search" @click="search" placeholder="请输入搜索"></u-search>
</u-navbar>
<div class="wrapper">
@@ -58,7 +58,7 @@
<!-- menu -->
<!-- 商品 -->
<div class="contant" v-if="current == 0">
<div class="contant" v-if="current == 0">
<u-empty style='margin-top:100rpx' v-if="goodsList.length == 0" class="empty" text='暂无商品信息'></u-empty>
<goodsTemplate v-else :res="goodsList" :storeName="false" />
@@ -84,7 +84,7 @@
</template>
<script>
import { getStoreBaseInfo, getStoreCategory } from "@/api/store.js";
import { getStoreBaseInfo, getStoreCategory } from "@/api/store.js";
import goodsTemplate from '@/components/m-goods-list/list'
import {
receiveCoupons,
@@ -119,7 +119,7 @@ export default {
current(val) {
val == 0 ? ()=>{ this.goodsList = []; this.getGoodsData()} : this.getCategoryData();
},
},
},
components:{goodsTemplate},
/**
@@ -152,7 +152,7 @@ export default {
methods: {
getStoreLicencePhoto() {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/licencePhoto?id=${this.storeId}`,
});
},
@@ -190,7 +190,7 @@ export default {
// sign: this.storeInfo.yzfSign,
// mpSign: this.storeInfo.yzfMpSign,
// };
// uni.navigateTo({
// this.$navigateTo({
// url:
// "/pages/product/customerservice/index?params=" +
// encodeURIComponent(JSON.stringify(params)),
@@ -198,15 +198,15 @@ export default {
// // #endif
// // #ifndef MP-WEIXIN
// const sign = this.storeInfo.yzfSign;
// uni.navigateTo({
// this.$navigateTo({
// url:
// "/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
// sign,
// });
// // #endif
uni.navigateTo({
url: `/pages/tabbar/home/web-view?IM=${this.storeId}`,
// // #endif
this.$navigateTo({
url: `/pages/tabbar/home/web-view?IM=${this.storeId}`,
});
},
@@ -227,7 +227,7 @@ export default {
/**商品分类中商品集合 */
getCategoryGoodsList(val) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/shopPageGoods?title=${val.labelName}&id=${val.id}&storeId=${this.storeId}`,
});
},
@@ -235,9 +235,9 @@ export default {
/**
* 搜索
*/
search() {
search() {
console.log("点击")
uni.navigateTo({
this.$navigateTo({
url: `/pages/navigation/search/searchPage?storeId=${this.storeId}&keyword=${this.keyword}`,
});
},
@@ -261,7 +261,7 @@ export default {
async getGoodsData() {
let res = await getGoodsList(this.goodsParams);
if (res.data.success) {
this.goodsList.push(...res.data.result.content);
this.goodsList.push(...res.data.result.content);
console.log(this.goodsList)
}
},