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

@@ -145,7 +145,7 @@
},
},
onNavigationBarButtonTap(e) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/cart/coupon/couponIntro",
});
},

View File

@@ -189,7 +189,7 @@ export default {
*/
useItNow(item) {
if (item.storeId && item.storeId!='0') {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/shopPage?id=${item.storeId}`,
});
} else {
@@ -203,7 +203,7 @@ export default {
* 优惠券详情
*/
couponDetail(item) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/cart/coupon/couponDetail?item=" +
encodeURIComponent(JSON.stringify(item)),

View File

@@ -120,7 +120,7 @@
* 支付成功后跳转
*/
callback(paymentMethod){
uni.navigateTo({
this.$navigateTo({
url: "/pages/cart/payment/success?paymentMethod=" +
paymentMethod +
"&payPrice=" +
@@ -138,7 +138,7 @@
if (this.routerVal.recharge_sn) {
// 判断当前是否是充值
this.sn = this.routerVal.recharge_sn;
this.orderType = "RECHARGE";
this.orderType = "RECHARGE";
} else if (this.routerVal.trade_sn) {
this.sn = this.routerVal.trade_sn;
@@ -178,12 +178,12 @@
this.payList = res.data.result.support.filter((item) => {
return item != "ALIPAY";
});
// 充值的话仅保留微信支付
if(this.orderType == "RECHARGE"){
this.payList = res.data.result.support.filter((item) => {
return item == "WECHAT";
});
});
// 充值的话仅保留微信支付
if(this.orderType == "RECHARGE"){
this.payList = res.data.result.support.filter((item) => {
return item == "WECHAT";
});
}
}

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,
});
},

View File

@@ -488,13 +488,13 @@ export default {
},
// 跳转到商品详情
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}`,
});
},

View File

@@ -351,7 +351,7 @@ export default {
* 售后详情
*/
afterDetails(order) {
uni.navigateTo({
this.$navigateTo({
url: "./applyDetail?sn=" + order.sn,
});
},
@@ -394,7 +394,7 @@ export default {
...sku,
};
storage.setAfterSaleData(data);
uni.navigateTo({
this.$navigateTo({
url: `/pages/order/afterSales/afterSalesSelect?sn=${sn}`,
});
},
@@ -410,7 +410,7 @@ export default {
};
storage.setAfterSaleData(data);
uni.navigateTo({
this.$navigateTo({
url: `./afterSalesDetailExpress?serviceSn=${order.sn}`,
});
},
@@ -421,13 +421,13 @@ export default {
onDetail(goods, sku) {
// 售后申请
if (this.current == 0) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${sku.skuId}&goodsId=${
sku.goodsId || sku.goodsId
}`,
});
} else {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${goods.skuId}&goodsId=${
goods.goodsId || goods.goodsId
}`,

View File

@@ -94,7 +94,7 @@ export default {
* 跳转到商品信息
*/
navigateToGoodsDetail(id) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${id}&goodsId=${goodsId}`,
});
},

View File

@@ -381,7 +381,7 @@ export default {
* 访问商品详情
*/
navgiateToGoodsDetail(item) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
});
},
@@ -390,7 +390,7 @@ export default {
* 进度
*/
onProgress() {
uni.navigateTo({
this.$navigateTo({
url: `./applyProgress?sn=${
this.serviceDetail.sn
}&createTime=${encodeURIComponent(this.serviceDetail.createTime)}

View File

@@ -86,7 +86,7 @@ export default {
methods: {
// 点击跳转到商品
handleToGoods(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/goods?id=" + val.skuId + "&goodsId=" + val.goodsId,
});
},
@@ -120,7 +120,7 @@ export default {
* 查看详情
*/
handleInfo(val) {
uni.navigateTo({
this.$navigateTo({
url: "./complainInfo?id=" + val.id,
});
},

View File

@@ -219,7 +219,7 @@ export default {
*/
talkCommont(sku) {
console.log(sku);
uni.navigateTo({
this.$navigateTo({
url: `./releaseEvaluate?sn=${sku.sn}&sku=${encodeURIComponent(
JSON.stringify(sku)
)}`,
@@ -270,7 +270,7 @@ export default {
* 评价详情
*/
onDetail(comment) {
uni.navigateTo({
this.$navigateTo({
url:
"./evaluateDetail?comment=" +
encodeURIComponent(JSON.stringify(comment)),

View File

@@ -481,7 +481,7 @@ export default {
// 跳转到店铺
navigateToStore(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
@@ -555,7 +555,7 @@ export default {
* 跳转
*/
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},

View File

@@ -340,7 +340,7 @@ export default {
* 替换onLoad下代码即可
*/
let status = Number(options.status);
this.status = status;
this.status = status;
this.tabCurrentIndex = status;
// if (status == 0) {
@@ -364,14 +364,14 @@ export default {
methods: {
// 售后
applyService(order) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}`,
});
},
// 店铺详情
navigateToStore(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
@@ -423,7 +423,7 @@ export default {
}).pay();
// #endif
// #ifndef MP-WEIXIN
uni.navigateTo({
this.$navigateTo({
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
});
// #endif
@@ -522,7 +522,7 @@ export default {
* 跳转到订单详情
*/
navigateToOrderDetail(sn) {
uni.navigateTo({
this.$navigateTo({
url: "./orderDetail?sn=" + sn,
});
},
@@ -588,7 +588,7 @@ export default {
* 评价商品
*/
onComment(sn) {
uni.navigateTo({
this.$navigateTo({
url: "./evaluate/myEvaluate",
});
},
@@ -599,7 +599,7 @@ export default {
reBuy(order) {
console.log(order);
return;
uni.navigateTo({
this.$navigateTo({
url:
"/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
});
@@ -609,7 +609,7 @@ export default {
* 查看物流
*/
navigateToLogistics(order) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
});

View File

@@ -277,7 +277,7 @@ export default {
},
methods: {
tostore(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
@@ -294,7 +294,7 @@ export default {
},
// #TODO 这块需要写一下 目前没有拼团的详细信息
ByUserMessage(order) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/cart/payment/shareOrderGoods?sn=" +
order.sn +
@@ -318,12 +318,12 @@ export default {
});
},
onReceipt(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/order/invoice/invoiceDetail?id=" + val.id,
});
},
gotoGoodsDetail(sku) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${sku.skuId}&goodsId=${sku.goodsId}`,
});
},
@@ -363,7 +363,7 @@ export default {
* 投诉
*/
complaint(sku) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/order/complain/complain?sn=" +
this.sn +
@@ -373,7 +373,7 @@ export default {
},
//售后按钮
onAfterSales(sn, sku) {
uni.navigateTo({
this.$navigateTo({
url: `./afterSales/afterSalesSelect?sn=${sn}&sku=${encodeURIComponent(
JSON.stringify(sku)
)}`,
@@ -382,7 +382,7 @@ export default {
// 去支付
toPay(val) {
val.sn
? uni.navigateTo({
? this.$navigateTo({
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
})
: false;
@@ -459,12 +459,12 @@ export default {
},
//评价商品
onComment(sn) {
uni.navigateTo({
this.$navigateTo({
url: "./evaluate/myEvaluate",
});
}, //查看物流
onLogistics(order) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/mine/msgTips/packageMsg/logisticsDetail?logi_id=" +
order.logi_id +
@@ -480,7 +480,7 @@ export default {
this.reason = reason;
},
reBuy(order) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
});

View File

@@ -545,7 +545,7 @@ export default {
if (user.data.result.mobile) {
whetherNavigate();
} else {
uni.navigateTo({
this.$navigateTo({
url: "/pages/passport/bindUserPhone",
});
}
@@ -639,13 +639,13 @@ export default {
},
// 跳转
navigateToPrivacy(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/mine/help/tips?type=" + val,
});
console.log(val)
},
navigateToPrivacys(val){
uni.navigateTo({
this.$navigateTo({
url:"/pages/mine/help/tips?type="+ val,
})
},

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)
}
},

View File

@@ -74,7 +74,7 @@ export default {
// 跳转到砍价详情
navigateToBargainDetail(val) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/promotion/bargain/detail?id=${val.id}`,
});
},

View File

@@ -67,7 +67,7 @@ export default {
},
// 跳转到砍价详情
navigateToBargainDetail(val) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/promotion/bargain/detail?id=${val.kanjiaActivityGoodsId}`,
});
},

View File

@@ -113,7 +113,7 @@ export default {
},
toHref(goods) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${goods.skuId}&goodsId=${goods.goodsId}`,
});
},

View File

@@ -229,7 +229,7 @@ export default {
let customParams = encodeURIComponent(
JSON.stringify({ path: "pages/index/index", pid: 1 })
); // 开发者在直播间页面路径上携带自定义参数后续可以在分享卡片链接和跳转至商详页时获取详见【获取自定义参数】、【直播间到商详页面携带参数】章节上限600个字符超过部分会被截断
uni.navigateTo({
this.$navigateTo({
url:
"plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=" +
roomId +

View File

@@ -137,14 +137,14 @@ export default {
methods: {
// 跳转
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},
toGoods(item) {
//跳转详情
uni.navigateTo({
this.$navigateTo({
url: `/pages/promotion/point/detail?id=${item.id}`,
});
},

View File

@@ -151,7 +151,7 @@ export default {
) {
return;
} else {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${item.skuId}&goodsId=${item.goodsId}`,
});
}

View File

@@ -111,8 +111,8 @@
预估到手价 <span>{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}</span>
<span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
</div>
<div style='margin-left: 20rpx;' v-if="!skuItem.checked && skuItem.errorMessage">
{{skuItem.errorMessage}}
<div style='margin-left: 20rpx;' v-if="!skuItem.checked && skuItem.errorMessage">
{{skuItem.errorMessage}}
</div>
</view>
</view>
@@ -343,7 +343,7 @@ export default {
* 跳转到店铺
*/
navigateToStore(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
@@ -352,7 +352,7 @@ export default {
* 跳转到优惠券
*/
navigateToConpon(val) {
uni.navigateTo({
this.$navigateTo({
url: "/pages/cart/coupon/couponCenter?storeId=" + val.storeId,
});
},
@@ -361,7 +361,7 @@ export default {
* 跳转到商品
*/
navigateToGoods(val) {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/product/goods?id=" +
val.goodsSku.id +
@@ -437,7 +437,7 @@ export default {
* 跳转
*/
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},

View File

@@ -57,7 +57,7 @@ export default {
* 查询
*/
search() {
uni.navigateTo({
this.$navigateTo({
url: "/pages/navigation/search/searchPage",
});
},
@@ -90,7 +90,7 @@ export default {
},
navigateToList(sid, tid) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/navigation/search/searchPage?category=${tid}`,
});
},

View File

@@ -57,7 +57,7 @@ export default {
mounted() {},
methods: {
handleClick(item) {
uni.navigateTo({
this.$navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
});
},

View File

@@ -145,22 +145,22 @@ export default {
goToDetail(type) {
switch(type) {
case "SECKILL":
uni.navigateTo({
this.$navigateTo({
url: `/pages/promotion/seckill`,
});
break;
case "PINTUAN":
uni.navigateTo({
this.$navigateTo({
url: `/pages/promotion/joinGroup`,
});
break;
case "LIVE":
uni.navigateTo({
this.$navigateTo({
url: `/pages/promotion/lives`,
});
break;
case "KANJIA":
uni.navigateTo({
this.$navigateTo({
url: `/pages/promotion/bargain/list`,
});
break;

View File

@@ -12,7 +12,7 @@ export default {
props: ["res"],
methods: {
handleSearch() {
uni.navigateTo({
this.$navigateTo({
url: "/pages/navigation/search/searchPage",
});
},

View File

@@ -127,10 +127,10 @@ export default {
this.pageData = JSON.parse(res.data.result.pageData);
}
});
},
// 是否有网络链接
isConnected(val){
val ? this.init() : ''
},
// 是否有网络链接
isConnected(val){
val ? this.init() : ''
},
/**
@@ -149,18 +149,18 @@ export default {
// WX_CODE 为小程序码
if (res.scanType == "WX_CODE") {
console.log(res);
uni.navigateTo({
this.$navigateTo({
url: `/${res.path}`,
});
} else {
config.scanAuthNavigation.forEach((src) => {
if (res.result.indexOf(src) != -1) {
uni.navigateTo({
this.$navigateTo({
url: `/${res.result.substring(src.length)}`,
});
} else {
setTimeout(() => {
uni.navigateTo({
this.$navigateTo({
url: "/pages/tabbar/home/web-view?src=" + path,
});
}, 100);

View File

@@ -45,14 +45,14 @@ export default {
// },
methods: {
gotoLink() {
uni.navigateTo({
this.$navigateTo({
//点击跳转到浏览器
url:
"/pages/tabbar/home/web-view?src=https://pc-b2b2c.pickmall.cn/article/detail?id=1371992704333905920",
});
},
gotoB() {
uni.navigateTo({
this.$navigateTo({
url:
"/pages/tabbar/home/web-view?src=https://pc-b2b2c.pickmall.cn/article/detail?id=1371779927900160000",
});

View File

@@ -122,7 +122,7 @@ export default {
* navigator标签现在默认没有转场动画所以用view
*/
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},

View File

@@ -73,7 +73,7 @@
})
},
goDetail(item) {
uni.navigateTo({
this.$navigateTo({
url: '/pages/product/goods?id=' + item.content.id + "&goodsId=" +item.content.goodsId
})
},

View File

@@ -69,7 +69,7 @@ import { distribution } from "@/api/goods";
export default {
methods: {
navigateTo(url) {
uni.navigateTo({
this.$navigateTo({
url,
});
},
@@ -78,11 +78,11 @@ export default {
if (res.data.result) {
let type = res.data.result.distributionStatus;
if (type == "PASS") {
uni.navigateTo({
this.$navigateTo({
url: "/pages/mine/distribution/home",
});
} else if (type == "REFUSE") {
uni.navigateTo({
this.$navigateTo({
url: "/pages/mine/distribution/auth",
});
} else if (type == "RETREAT") {
@@ -106,7 +106,7 @@ export default {
});
} else {
// 没有资格申请 先去实名认证
uni.navigateTo({
this.$navigateTo({
url: "/pages/mine/distribution/auth",
});
}