mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 15:49:19 +08:00
fix: 修复店铺概览和商品概览
This commit is contained in:
@@ -626,7 +626,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
gridReloadRef.value = () => gridApi.reload();
|
||||
|
||||
function goToShopDetail(shopId: number) {
|
||||
router.push(`/ecom/shop/overview/${shopId}`);
|
||||
router.push(`/ec/shop/overview/${shopId}`);
|
||||
}
|
||||
|
||||
function openDetail(row: OrderVO.Info) {
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ function open(record: ProductVO.Info) {
|
||||
/** 跳转经营统计 */
|
||||
function goOverview() {
|
||||
if (!product.value) return;
|
||||
router.push(`/ecom/product/overview/${product.value.id}`);
|
||||
router.push(`/ec/product/overview/${product.value.id}`);
|
||||
modalApi.close();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ import dayjs from 'dayjs';
|
||||
import { getCategoryTreeApi } from '#/api/ec/product/category';
|
||||
import { createProductApi, updateProductApi } from '#/api/ec/product';
|
||||
import { uploadFileToOss } from '#/utils/oss-upload';
|
||||
import CategoryFormModal from '#/views/ecommerce/config/category-config/components/CategoryFormModal.vue';
|
||||
import ProductCostSyncToOrdersModal from '#/views/ecommerce/product/components/ProductCostSyncToOrdersModal.vue';
|
||||
import CategoryFormModal from '#/views/ec/product/category/components/CategoryFormModal.vue';
|
||||
import ProductCostSyncToOrdersModal from '#/views/ec/product/components/ProductCostSyncToOrdersModal.vue';
|
||||
|
||||
interface Emits {
|
||||
(e: 'success'): void;
|
||||
|
||||
@@ -287,7 +287,7 @@ function openProductDetail(record: ProductVO.Info) {
|
||||
}
|
||||
|
||||
function goToOverview(record: ProductVO.Info) {
|
||||
router.push(`/ecom/product/overview/${record.id}`);
|
||||
router.push(`/ec/product/overview/${record.id}`);
|
||||
}
|
||||
|
||||
async function handleDelete(record: ProductVO.Info) {
|
||||
|
||||
@@ -36,7 +36,7 @@ const SHOP_PAGE_SIZE = 20;
|
||||
|
||||
/** 当前是否为商品概览路由(keep-alive 下勿用其它页的 params.id 请求商品接口) */
|
||||
const isProductOverviewRoute = () =>
|
||||
/\/ecom\/product\/overview\/[^/]+\/?$/.test(route.path);
|
||||
/\/ec\/product\/overview\/[^/]+\/?$/.test(route.path);
|
||||
|
||||
// 商品ID(从路由参数获取)
|
||||
const productId = computed(() => {
|
||||
@@ -274,7 +274,7 @@ function handleShopChange(nextShopId: number | undefined) {
|
||||
products.value = [];
|
||||
productSearchKeyword.value = '';
|
||||
router.replace({
|
||||
path: `/ecom/product/overview/${productId.value}`,
|
||||
path: `/ec/product/overview/${productId.value}`,
|
||||
query: buildOverviewRouteQuery(
|
||||
dateRange.value,
|
||||
nextShopId != null && nextShopId > 0 ? { shopId: nextShopId } : undefined,
|
||||
@@ -332,7 +332,7 @@ function handleProductChange(nextProductId: number) {
|
||||
if (!nextProductId || nextProductId === productId.value) return;
|
||||
lastRequestKey.value = '';
|
||||
router.push({
|
||||
path: `/ecom/product/overview/${nextProductId}`,
|
||||
path: `/ec/product/overview/${nextProductId}`,
|
||||
query: buildProductOverviewQuery(),
|
||||
});
|
||||
}
|
||||
|
||||
+3
-3
@@ -54,7 +54,7 @@ function goToProductOverview(productId: number) {
|
||||
|
||||
if (dateQ) {
|
||||
router.push({
|
||||
path: `/ecom/product/overview/${productId}`,
|
||||
path: `/ec/product/overview/${productId}`,
|
||||
query: buildOverviewRouteQuery(
|
||||
[dayjs(dateQ.startDate), dayjs(dateQ.endDate)],
|
||||
shopId != null ? { shopId } : undefined,
|
||||
@@ -65,13 +65,13 @@ function goToProductOverview(productId: number) {
|
||||
|
||||
if (shopId != null) {
|
||||
router.push({
|
||||
path: `/ecom/product/overview/${productId}`,
|
||||
path: `/ec/product/overview/${productId}`,
|
||||
query: { shopId: String(shopId) },
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
router.push({ path: `/ecom/product/overview/${productId}` });
|
||||
router.push({ path: `/ec/product/overview/${productId}` });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ let shopSearchTimer: ReturnType<typeof setTimeout> | undefined;
|
||||
|
||||
/** 当前是否为店铺概览路由(keep-alive 下 route.params.id 会随其它标签变化,不可仅凭 id 请求) */
|
||||
const isShopOverviewRoute = () =>
|
||||
/\/ecom\/shop\/overview\/[^/]+\/?$/.test(route.path);
|
||||
/\/ec\/shop\/overview\/[^/]+\/?$/.test(route.path);
|
||||
|
||||
// 店铺ID(从路由参数获取)
|
||||
const shopId = computed(() => {
|
||||
@@ -237,7 +237,7 @@ function handleShopChange(nextShopId: number) {
|
||||
if (!nextShopId || nextShopId === shopId.value) return;
|
||||
lastRequestKey.value = '';
|
||||
router.push({
|
||||
path: `/ecom/shop/overview/${nextShopId}`,
|
||||
path: `/ec/shop/overview/${nextShopId}`,
|
||||
query: buildOverviewRouteQuery(dateRange.value),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user