mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
【优化】(分包加载):解决常用页面首次打开小程序可能要加载分包的问题,特将常用页面移动到主包
This commit is contained in:
@@ -102,9 +102,9 @@
|
||||
) {
|
||||
data.params.posterUrl = share.data;
|
||||
data.params.shareType = props.shareType;
|
||||
handleRouteNavigateTo(`/pages/subpackage/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
handleRouteNavigateTo(`/pages/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
} else {
|
||||
handleRouteNavigateTo(`/pages/subpackage/share/qrCode/qrCode?poster=${encodeURIComponent(share.data)}`)
|
||||
handleRouteNavigateTo(`/pages/share/qrCode/qrCode?poster=${encodeURIComponent(share.data)}`)
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/** 配置 */
|
||||
export * from './config';
|
||||
|
||||
/** 首页 */
|
||||
export * from './home';
|
||||
/** 页面通讯 */
|
||||
export * from './page-comm';
|
||||
|
||||
/** 广告位 */
|
||||
export * from './advertPosition';
|
||||
export * from './advert-position';
|
||||
|
||||
/** 本地缓存 */
|
||||
export * from './storage';
|
||||
export * from './storage';
|
||||
|
||||
@@ -30,7 +30,7 @@ export const handleAdvertiseDetail = (type : number | string, val : string) => {
|
||||
// #endif
|
||||
}
|
||||
} else if (type == NavLinkEnum.shop) { /** 商品类型的链接 */
|
||||
handleRouteNavigateTo(`/pages/subpackage/goods/detail?id=${val}`);
|
||||
handleRouteNavigateTo(`/pages/goods/detail?id=${val}`);
|
||||
} else if (type == NavLinkEnum.article) { /** 文章类型的链接 */
|
||||
handleRouteNavigateTo(`/pages/subpackage/article/detail/detail?id=${val}&idType=1`);
|
||||
} else if (type == NavLinkEnum.articleCategory) { /** 文章列表类型的链接 */
|
||||
@@ -38,7 +38,7 @@ export const handleAdvertiseDetail = (type : number | string, val : string) => {
|
||||
} else if (type == NavLinkEnum.intelligentForms) { /** 自定义表单类型的链接 */
|
||||
handleRouteNavigateTo(`/pages/subpackage/form/detail/detail?id=${val}`);
|
||||
} else if (type == NavLinkEnum.shopCategory) { /** 商品分类类型的链接 */
|
||||
handleRouteNavigateTo(`/pages/subpackage/category/category?id=${val}`);
|
||||
handleRouteNavigateTo(`/pages/category/category?id=${val}`);
|
||||
} else if (type == NavLinkEnum.wxMiNiProgram) { /** 小程序类型的链接 */
|
||||
uni.navigateToMiniProgram({
|
||||
appId: val,
|
||||
|
||||
@@ -21,26 +21,20 @@
|
||||
"condition": "",
|
||||
|
||||
"subPackages": [
|
||||
"pages-config/subpackage-order.json",
|
||||
"pages-config/subpackage-member.json",
|
||||
"pages-config/subpackage-category.json",
|
||||
"pages-config/subpackage-form.json",
|
||||
"pages-config/subpackage-search.json",
|
||||
"pages-config/subpackage-article.json",
|
||||
"pages-config/subpackage-notice.json",
|
||||
"pages-config/subpackage-serviceGoods.json",
|
||||
"pages-config/subpackage-activity.json",
|
||||
"pages-config/subpackage-coupon.json",
|
||||
"pages-config/subpackage-storeMap.json",
|
||||
"pages-config/subpackage-share.json",
|
||||
"pages-config/subpackage-login.json",
|
||||
"pages-config/subpackage-goods.json",
|
||||
"pages-config/subpackage-distribution.json",
|
||||
"pages-config/subpackage-agency.json",
|
||||
"pages-config/subpackage-merchant.json"
|
||||
],
|
||||
|
||||
"preloadRule": "",
|
||||
"preloadRule": "pages-config/preloadRule.json",
|
||||
|
||||
"workers": "",
|
||||
|
||||
|
||||
@@ -30,6 +30,101 @@
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/category/category",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/comment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品评价",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/submit/submit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单提交",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/pay/pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单支付",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/result/result",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付结果",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/storeList/storeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "门店列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/search/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/share/sharePoster/sharePoster",
|
||||
"style": {
|
||||
"navigationBarTitleText": "海报分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/share/qrCode/qrCode",
|
||||
"style": {
|
||||
"navigationBarTitleText": "二维码分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/share/jump/jump",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"preloadRule": {
|
||||
"pages/member/member": {
|
||||
"network": "all",
|
||||
"packages": ["pages/subpackage/member"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"subPackages": [{
|
||||
"root": "pages/subpackage/category",
|
||||
"pages": [{
|
||||
"path": "category",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"subPackages": [{
|
||||
"root": "pages/subpackage/goods",
|
||||
"pages": [{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "comment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "评价",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"subPackages": [{
|
||||
"root": "pages/subpackage/login",
|
||||
"pages": [{
|
||||
"path": "login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"subPackages": [{
|
||||
"root": "pages/subpackage/order",
|
||||
"pages": [{
|
||||
"path": "submit/submit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单提交",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pay/pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单支付",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "result/result",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付结果",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "storeList/storeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "门店列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"subPackages": [{
|
||||
"root": "pages/subpackage/search",
|
||||
"pages": [{
|
||||
"path": "search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"subPackages": [{
|
||||
"root": "pages/subpackage/share",
|
||||
"pages": [{
|
||||
"path": "sharePoster/sharePoster",
|
||||
"style": {
|
||||
"navigationBarTitleText": "海报分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "qrCode/qrCode",
|
||||
"style": {
|
||||
"navigationBarTitleText": "二维码分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "jump/jump",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}
|
||||
@@ -72,44 +72,103 @@
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/category/category",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/comment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品评价",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/submit/submit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单提交",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/pay/pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单支付",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/result/result",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付结果",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/storeList/storeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "门店列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/search/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/share/sharePoster/sharePoster",
|
||||
"style": {
|
||||
"navigationBarTitleText": "海报分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/share/qrCode/qrCode",
|
||||
"style": {
|
||||
"navigationBarTitleText": "二维码分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/share/jump/jump",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pages/subpackage/order",
|
||||
"pages": [{
|
||||
"path": "submit/submit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单提交",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pay/pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单支付",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "result/result",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付结果",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "storeList/storeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "门店列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},{
|
||||
"root": "pages/subpackage/member",
|
||||
"pages": [{
|
||||
"path": "collection/collection",
|
||||
@@ -344,16 +403,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},{
|
||||
"root": "pages/subpackage/category",
|
||||
"pages": [{
|
||||
"path": "category",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
},{
|
||||
"root": "pages/subpackage/form",
|
||||
"pages": [{
|
||||
@@ -374,16 +423,6 @@
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"root": "pages/subpackage/search",
|
||||
"pages": [{
|
||||
"path": "search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
},{
|
||||
"root": "pages/subpackage/article",
|
||||
"pages": [{
|
||||
"path": "category/category",
|
||||
@@ -551,57 +590,6 @@
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
},{
|
||||
"root": "pages/subpackage/share",
|
||||
"pages": [{
|
||||
"path": "sharePoster/sharePoster",
|
||||
"style": {
|
||||
"navigationBarTitleText": "海报分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "qrCode/qrCode",
|
||||
"style": {
|
||||
"navigationBarTitleText": "二维码分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "jump/jump",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分享",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
},{
|
||||
"root": "pages/subpackage/login",
|
||||
"pages": [{
|
||||
"path": "login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
},{
|
||||
"root": "pages/subpackage/goods",
|
||||
"pages": [{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "comment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "评价",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
},{
|
||||
"root": "pages/subpackage/distribution",
|
||||
"pages": [{
|
||||
@@ -797,4 +785,10 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}]
|
||||
}]}
|
||||
}],
|
||||
"preloadRule": {
|
||||
"pages/member/member": {
|
||||
"network": "all",
|
||||
"packages": ["pages/subpackage/member"]
|
||||
}
|
||||
}}
|
||||
@@ -35,11 +35,11 @@
|
||||
</view>
|
||||
<view class="msg-box">
|
||||
<view class="name"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/goods/detail?id=${item?.products?.goodsId}`)">
|
||||
@click="handleRouteNavigateTo(`/pages/goods/detail?id=${item?.products?.goodsId}`)">
|
||||
{{ item?.products?.name }}
|
||||
</view>
|
||||
<view class="desc"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/goods/detail?id=${item?.products?.goodsId}`)">
|
||||
@click="handleRouteNavigateTo(`/pages/goods/detail?id=${item?.products?.goodsId}`)">
|
||||
{{ item?.products?.spesDesc }}
|
||||
</view>
|
||||
<view class="price-box">
|
||||
@@ -320,7 +320,7 @@
|
||||
}
|
||||
})
|
||||
if (ids.length > 0) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${ids.join(',')}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${ids.join(',')}`)
|
||||
} else {
|
||||
handleShowToast('请选择要下单的商品');
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
|
||||
const hanldeClickGoods = (item : GoodsType) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/subpackage/goods/detail?id=${item.id}`
|
||||
url: `/pages/goods/detail?id=${item.id}`
|
||||
})
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
cartType: PaymentTypeEnum.common,
|
||||
});
|
||||
if (addCart.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${addCart.data}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${addCart.data}`)
|
||||
/** 关闭sku弹框 */
|
||||
handleChangePopup(false);
|
||||
} else {
|
||||
@@ -380,7 +380,7 @@
|
||||
|
||||
const hanldeClickGoods = (item : GoodsType) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/subpackage/goods/detail?id=${item.id}`
|
||||
url: `/pages/goods/detail?id=${item.id}`
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
cartType: PaymentTypeEnum.common,
|
||||
});
|
||||
if (addCart.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${addCart.data}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${addCart.data}`)
|
||||
/** 关闭sku弹框 */
|
||||
handleChangePopup(false);
|
||||
} else {
|
||||
@@ -284,7 +284,7 @@
|
||||
|
||||
const hanldeClickGoods = (item : GoodsType) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/subpackage/goods/detail?id=${item.id}`
|
||||
url: `/pages/goods/detail?id=${item.id}`
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
});
|
||||
|
||||
const handleGoCategory = (id : number) => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/category/category?catId=${id}`)
|
||||
handleRouteNavigateTo(`/pages/category/category?catId=${id}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
const handleGoCategory = (id : number) => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/category/category?catId=${id}`)
|
||||
handleRouteNavigateTo(`/pages/category/category?catId=${id}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
});
|
||||
|
||||
const handleGoCategory = (id : number) => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/category/category?catId=${id}`)
|
||||
handleRouteNavigateTo(`/pages/category/category?catId=${id}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/** 搜索 */
|
||||
const handleSearch = () => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/category/category?key=${state.keyWord}`);
|
||||
handleRouteNavigateTo(`/pages/category/category?key=${state.keyWord}`);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
}
|
||||
|
||||
const hanldeClickGoods = (data : any) => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/goods/detail?id=${data?.id}`)
|
||||
handleRouteNavigateTo(`/pages/goods/detail?id=${data?.id}`)
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
}
|
||||
|
||||
const hanldeClickGoods = (data : any) => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/goods/detail?id=${data?.id}`)
|
||||
handleRouteNavigateTo(`/pages/goods/detail?id=${data?.id}`)
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
let inputVal = ref('');
|
||||
|
||||
const handleSearch = () => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/category/category?key=${inputVal.value}`);
|
||||
handleRouteNavigateTo(`/pages/category/category?key=${inputVal.value}`);
|
||||
}
|
||||
|
||||
const hanldeCircle = () => {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
});
|
||||
|
||||
const hanldeClickViewMore = () => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/goods/comment?id=${props.id}`);
|
||||
handleRouteNavigateTo(`/pages/goods/comment?id=${props.id}`);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
const hanldeClickGoods = (item : GoodsType) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/subpackage/goods/detail?id=${item.id}`
|
||||
url: `/pages/goods/detail?id=${item.id}`
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
uni.hideLoading();
|
||||
handleShowToast('支付成功', 'success', () => {
|
||||
setTimeout(() => {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/result/result?id=${pay.data.paymentId}`)
|
||||
handleRouteRedirectTo(`/pages/order/result/result?id=${pay.data.paymentId}`)
|
||||
}, 1000)
|
||||
})
|
||||
} else if (state.payCode === PayMethodCodeEnum.offline) {
|
||||
@@ -202,7 +202,7 @@
|
||||
if (e.errMsg === 'requestPayment:ok') {
|
||||
handleShowToast('支付成功', 'success', () => {
|
||||
setTimeout(() => {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/result/result?id=${res.data.paymentId}`)
|
||||
handleRouteRedirectTo(`/pages/order/result/result?id=${res.data.paymentId}`)
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
@@ -211,7 +211,7 @@
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
handleShowToast('支付成功', 'success', () => {
|
||||
setTimeout(() => {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/result/result?id=${res.data.paymentId}`)
|
||||
handleRouteRedirectTo(`/pages/order/result/result?id=${res.data.paymentId}`)
|
||||
}, 1000)
|
||||
})
|
||||
// #endif
|
||||
@@ -237,7 +237,7 @@
|
||||
if (e.errMsg === 'requestPayment:ok') {
|
||||
handleShowToast('支付成功', 'success', () => {
|
||||
setTimeout(() => {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/result/result?id=${res.data.paymentId}`)
|
||||
handleRouteRedirectTo(`/pages/order/result/result?id=${res.data.paymentId}`)
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
@@ -246,7 +246,7 @@
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
handleShowToast('支付成功', 'success', () => {
|
||||
setTimeout(() => {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/result/result?id=${res.data.paymentId}`)
|
||||
handleRouteRedirectTo(`/pages/order/result/result?id=${res.data.paymentId}`)
|
||||
}, 1000)
|
||||
})
|
||||
// #endif
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
cartType: PaymentTypeEnum.common,
|
||||
});
|
||||
if (addCart.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${addCart.data}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${addCart.data}`)
|
||||
/** 关闭sku弹框 */
|
||||
handleChangePopup(false);
|
||||
} else {
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/** 搜索 */
|
||||
const handleSearch = () => {
|
||||
handleRouteNavigateTo('/pages/subpackage/search/search')
|
||||
handleRouteNavigateTo('/pages/search/search')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
:src="handleStaticResources(userInfoStore.userInfo?.avatarImage || '/static/images/common/empty.png')">
|
||||
</image>
|
||||
</view>
|
||||
<template v-if="Object.keys(userInfoStore.userInfo).length > 0">
|
||||
<template v-if="userInfoStore.userInfo && Object.keys(userInfoStore.userInfo).length > 0">
|
||||
<view class="info-box">
|
||||
<view class="name">{{ userInfoStore.userInfo?.nickName }}</view>
|
||||
<view class="price">我的余额:¥{{ userInfoStore.userInfo?.balance || 0 }}</view>
|
||||
@@ -236,7 +236,7 @@
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN || MP-ALIPAY
|
||||
handleRouteNavigateTo(`/pages/subpackage/login/login?backUrl=${'/pages/member/member'}`)
|
||||
handleRouteNavigateTo(`/pages/login/login?backUrl=${'/pages/member/member'}`)
|
||||
// #endif
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ export const useNavHook = () => {
|
||||
img: "/static/images/member/icon-search.png",
|
||||
name: MemberPageNameEnum.search,
|
||||
isShow: true,
|
||||
url: "/pages/subpackage/search/search"
|
||||
url: "/pages/search/search"
|
||||
}, {
|
||||
title: '系统设置',
|
||||
img: "/static/images/member/icon-setting.png",
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<view class="store-pickup-box" v-if="state.tabSelectType === OrderDistributionEnum.selfDelivery">
|
||||
<view class="pickup-box">
|
||||
<view class="store-box" v-if="Object.keys(state.store).length > 0"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/order/storeList/storeList`)">
|
||||
@click="handleRouteNavigateTo(`/pages/order/storeList/storeList`)">
|
||||
<view class="store-address-box">
|
||||
<view class="store-address">
|
||||
<text class="name">{{ state.store?.storeName }}</text>
|
||||
@@ -621,9 +621,9 @@
|
||||
uni.removeStorage({ key: userInvoice });
|
||||
// 判断是否为0元订单,如果是0元订单直接支付成功
|
||||
if (createOrder.data.payStatus == OrderPayStatusEnum.yes) {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/result/result?orderId=${createOrder.data.orderId}`);
|
||||
handleRouteRedirectTo(`/pages/order/result/result?orderId=${createOrder.data.orderId}`);
|
||||
} else {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/pay/pay?orderId=${createOrder.data.orderId}&orderType=${state.orderType}`);
|
||||
handleRouteRedirectTo(`/pages/order/pay/pay?orderId=${createOrder.data.orderId}&orderType=${state.orderType}`);
|
||||
}
|
||||
//发起订阅
|
||||
// #ifdef MP-WEIXIN
|
||||
@@ -18,7 +18,7 @@
|
||||
</view>
|
||||
<view class="tag-box">
|
||||
<view class="tag" v-for="item, index in state.historyList" :key="index"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/category/category?key=${item}`)">{{ item }}
|
||||
@click="handleRouteNavigateTo(`/pages/category/category?key=${item}`)">{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -27,7 +27,7 @@
|
||||
<view class="title">推荐搜索</view>
|
||||
<view class="tag-box">
|
||||
<view class="tag" v-for="item, index in recommendList" :key="index"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/category/category?key=${item}`)">{{ item }}
|
||||
@click="handleRouteNavigateTo(`/pages/category/category?key=${item}`)">{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -74,7 +74,7 @@
|
||||
state.historyList.push(state.value);
|
||||
uni.setStorageSync(historySearch, state.historyList);
|
||||
}
|
||||
handleRouteNavigateTo(`/pages/subpackage/category/category?key=${state.value}`);
|
||||
handleRouteNavigateTo(`/pages/category/category?key=${state.value}`);
|
||||
state.value = '';
|
||||
}
|
||||
</script>
|
||||
@@ -32,7 +32,7 @@
|
||||
/** 商品详情页*/
|
||||
case ShareEnum.goods:
|
||||
if (shareData.data?.params?.goodsId) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/goods/detail?id=${shareData.data?.params?.goodsId}`)
|
||||
handleRouteNavigateTo(`/pages/goods/detail?id=${shareData.data?.params?.goodsId}`)
|
||||
} else {
|
||||
handleRouteSwitchTab();
|
||||
}
|
||||
@@ -186,7 +186,7 @@
|
||||
objectId: state.id,
|
||||
});
|
||||
if (addCart.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${addCart.data}&orderType=${PaymentTypeEnum.group}&objectId=${state.id}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${addCart.data}&orderType=${PaymentTypeEnum.group}&objectId=${state.id}`)
|
||||
/** 关闭sku弹框 */
|
||||
handleChangePopup(false);
|
||||
} else {
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
cartType: PaymentTypeEnum.common,
|
||||
});
|
||||
if (addCart.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${addCart.data}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${addCart.data}`)
|
||||
/** 关闭sku弹框 */
|
||||
handleChangePopup(false);
|
||||
} else {
|
||||
@@ -255,7 +255,7 @@
|
||||
teamId: state.teamId
|
||||
});
|
||||
if (addCart.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${addCart.data}&orderType=${PaymentTypeEnum.pinTuan}&objectId=${state.id}${state.teamId != 0 ? `&teamId=${state.teamId}` : ''}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${addCart.data}&orderType=${PaymentTypeEnum.pinTuan}&objectId=${state.id}${state.teamId != 0 ? `&teamId=${state.teamId}` : ''}`)
|
||||
/** 关闭sku弹框 */
|
||||
handleChangePopup(false);
|
||||
} else {
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
objectId: state.id,
|
||||
});
|
||||
if (addCart.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?cartIds=${addCart.data}&orderType=${PaymentTypeEnum.seckill}&objectId=${state.id}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?cartIds=${addCart.data}&orderType=${PaymentTypeEnum.seckill}&objectId=${state.id}`)
|
||||
/** 关闭sku弹框 */
|
||||
handleChangePopup(false);
|
||||
} else {
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
}
|
||||
});
|
||||
if (ids.length > 0) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/submit/submit?orderType=${PaymentTypeEnum.solitaire}&objectId=${state.id}&cartIds=${ids.join(',')}`)
|
||||
handleRouteNavigateTo(`/pages/order/submit/submit?orderType=${PaymentTypeEnum.solitaire}&objectId=${state.id}&cartIds=${ids.join(',')}`)
|
||||
} else {
|
||||
handleShowToast('请先选择商品');
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
if (share.status) {
|
||||
data.params.posterUrl = share.data;
|
||||
data.params.shareType = ShareEnum.agent;
|
||||
handleRouteNavigateTo(`/pages/subpackage/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
handleRouteNavigateTo(`/pages/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
} else {
|
||||
handleShowToast(share.msg);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
const hanldeClickGoods = (item : GoodsType) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/subpackage/goods/detail?id=${item.id}`
|
||||
url: `/pages/goods/detail?id=${item.id}`
|
||||
})
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
/** 搜索 */
|
||||
const handleSearch = () => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/search/search`);
|
||||
handleRouteNavigateTo(`/pages/search/search`);
|
||||
}
|
||||
|
||||
/** 生成海报 */
|
||||
@@ -195,7 +195,7 @@
|
||||
if (share.status) {
|
||||
data.params.posterUrl = share.data;
|
||||
data.params.shareType = ShareEnum.agent;
|
||||
handleRouteNavigateTo(`/pages/subpackage/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
handleRouteNavigateTo(`/pages/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
} else {
|
||||
handleShowToast(share.msg);
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
if (share.status) {
|
||||
data.params.posterUrl = share.data;
|
||||
data.params.shareType = ShareEnum.inv;
|
||||
handleRouteNavigateTo(`/pages/subpackage/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
handleRouteNavigateTo(`/pages/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
} else {
|
||||
handleShowToast(share.msg);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
const hanldeClickGoods = (item : GoodsType) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/subpackage/goods/detail?id=${item.id}`
|
||||
url: `/pages/goods/detail?id=${item.id}`
|
||||
})
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
/** 搜索 */
|
||||
const handleSearch = () => {
|
||||
handleRouteNavigateTo(`/pages/subpackage/search/search`);
|
||||
handleRouteNavigateTo(`/pages/search/search`);
|
||||
}
|
||||
|
||||
/** 生成海报 */
|
||||
@@ -195,7 +195,7 @@
|
||||
if (share.status) {
|
||||
data.params.posterUrl = share.data;
|
||||
data.params.shareType = ShareEnum.inv;
|
||||
handleRouteNavigateTo(`/pages/subpackage/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
handleRouteNavigateTo(`/pages/share/sharePoster/sharePoster` + queryParams(data.params));
|
||||
} else {
|
||||
handleShowToast(share.msg);
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
handleShowToast(form.msg, 'success', () => {
|
||||
setTimeout(() => {
|
||||
if (state.formInfo.type == 1 || state.formInfo.type == 2) {
|
||||
handleRouteRedirectTo(`/pages/subpackage/order/pay/pay?formId=${form.data.formSubmitId}&orderType=${state.paymentType}&recharge=${form.data.money}`);
|
||||
handleRouteRedirectTo(`/pages/order/pay/pay?formId=${form.data.formSubmitId}&orderType=${state.paymentType}&recharge=${form.data.money}`);
|
||||
} else {
|
||||
handleRouteSwitchTab();
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
handleShowToast('请选择充值金额');
|
||||
return;
|
||||
}
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/pay/pay?recharge=${state.rechargeId}&orderType=${PaymentTypeEnum.recharge}`);
|
||||
handleRouteNavigateTo(`/pages/order/pay/pay?recharge=${state.rechargeId}&orderType=${PaymentTypeEnum.recharge}`);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="m-25">
|
||||
<view v-if="state.list.length > 0">
|
||||
<view class="item-box" v-for="item, index in state.list" :key="index"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/goods/detail?id=${item.goodsId}`)">
|
||||
@click="handleRouteNavigateTo(`/pages/goods/detail?id=${item.goodsId}`)">
|
||||
<coreshop-goods-card type="horizontal" :nameOverflow="2" imgHeight="140rpx" imgWidth="140rpx"
|
||||
:goodsData="hanldeCombinationGoodsData(item)">
|
||||
<template #goodPrice>
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<text class="btn-tit" v-if="state.tabId == 'noUsed'">立即使用</text>
|
||||
<text class="btn-tit" @click="handleRouteSwitchTab(RouteSwitchTabEnum.home)"
|
||||
v-if="state.tabId == 'noUsed'">立即使用</text>
|
||||
<text class="btn-tit gary" v-if="state.tabId == 'yesUsed'">已使用</text>
|
||||
<text class="btn-tit gary" v-if="state.tabId == 'invalid'">已失效</text>
|
||||
</view>
|
||||
@@ -53,8 +54,8 @@
|
||||
import { onReachBottom } from '@dcloudio/uni-app';
|
||||
import type { Response } from '@/core/models';
|
||||
import { timeFormat } from '@/uni_modules/uv-ui-tools/libs/function/index.js';
|
||||
import { handleStaticResources } from '@/core/utils';
|
||||
import { EmptyEnum } from '@/core/enum';
|
||||
import { handleStaticResources, handleRouteSwitchTab } from '@/core/utils';
|
||||
import { EmptyEnum ,RouteSwitchTabEnum} from '@/core/enum';
|
||||
|
||||
interface TabType {
|
||||
id : string;
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
const handleClickGoods = (item : GoodsFootprintType) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/subpackage/goods/detail?id=${item.goodsId}`
|
||||
url: `/pages/goods/detail?id=${item.goodsId}`
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
}
|
||||
const share = await queryShare(data);
|
||||
if (share.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/share/qrCode/qrCode?poster=${encodeURIComponent(share.data)}`)
|
||||
handleRouteNavigateTo(`/pages/share/qrCode/qrCode?poster=${encodeURIComponent(share.data)}`)
|
||||
} else {
|
||||
handleShowToast(share.msg);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
<view class="m-r-20" v-if="state.orderDetail?.status == OrderStatusEnum.pending &&
|
||||
state.orderDetail?.payStatus == OrderPayStatusEnum.no">
|
||||
<uv-button type="primary" size="small" text="立即支付"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/order/pay/pay?orderId=${state.orderId}&orderType=${state.orderDetail?.orderType}`)"></uv-button>
|
||||
@click="handleRouteNavigateTo(`/pages/order/pay/pay?orderId=${state.orderId}&orderType=${state.orderDetail?.orderType}`)"></uv-button>
|
||||
</view>
|
||||
<view class="m-r-20" v-if="state.orderDetail?.status == OrderStatusEnum.pending &&
|
||||
state.orderDetail?.payStatus >= OrderPayStatusEnum.yes &&
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
查看详情
|
||||
</view>
|
||||
<view class="btn pay"
|
||||
@click="handleRouteNavigateTo(`/pages/subpackage/order/pay/pay?orderId=${item.orderId}&orderType=${item.orderType}`)"
|
||||
@click="handleRouteNavigateTo(`/pages/order/pay/pay?orderId=${item.orderId}&orderType=${item.orderType}`)"
|
||||
v-if="item.status === OrderStatusEnum.pending && item.payStatus === OrderPayStatusEnum.no">
|
||||
立即支付</view>
|
||||
<view class="btn receipt" @click="handleConfirmReceiptGoods(item)"
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
content: "确认切换登录账号吗?",
|
||||
confirmFn: () => {
|
||||
uni.removeStorage({ key: UserToken });
|
||||
handleRouteNavigateTo('/pages/subpackage/login/login');
|
||||
handleRouteNavigateTo('/pages/login/login');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
_useLoginStore.checkLogin(async () => {
|
||||
const serviceOrder : Response<any> = await queryAddServiceOrder({ id: state.id });
|
||||
if (serviceOrder.status) {
|
||||
handleRouteNavigateTo(`/pages/subpackage/order/pay/pay?orderId=${serviceOrder.data}&orderType=${PaymentTypeEnum.serviceOrder}&serviceId=${state.id}`);
|
||||
handleRouteNavigateTo(`/pages/order/pay/pay?orderId=${serviceOrder.data}&orderType=${PaymentTypeEnum.serviceOrder}&serviceId=${state.id}`);
|
||||
} else {
|
||||
handleShowToast(serviceOrder.msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user