mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-18 16:35:53 +08:00
[仅供测试]重写navigateTo方法,解决微信小程序中超过10个页面栈时会出现的bug
This commit is contained in:
@@ -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)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user