From 71cdf53b68e559e589f251b49ed25801bb1db02b Mon Sep 17 00:00:00 2001 From: yangmf_0726 <13243152557@163.com> Date: Fri, 10 Oct 2025 16:00:24 +0800 Subject: [PATCH] 11 --- src/api/mall/product/spu.ts | 12 +++++++----- src/router/index.ts | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 8f58049f..628053e7 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -26,7 +26,7 @@ export interface Sku { salesCount?: number // 商品销量 cabinetChannel?: string // 货道或柜门编号 cabinetType?: string // 通道类型 - purchaseBizType?:string + purchaseBizType?: string } export interface GiveCouponTemplate { @@ -68,13 +68,15 @@ export interface Spu { // 获得 Spu 列表 export const getSpuPage = (params: PageParam) => { // /product/spu/page - return request.get({ url: '/product/spu/pageWithCreator',params:{ - ...params - }}) + return request.get({ + url: '/product/spu/pageWithCreator', params: { + ...params + } + }) } // 获得 Spu 列表 tabsCount -export const getTabsCount = (types?: number) => { +export const getTabsCount = (types: number = 0) => { return request.get({ url: `/product/spu/get-count?types=${types}` }) } diff --git a/src/router/index.ts b/src/router/index.ts index b818421c..0f52d782 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,11 +1,11 @@ import type { App } from 'vue' import type { RouteRecordRaw } from 'vue-router' -import { createRouter, createWebHistory } from 'vue-router' +import { createRouter, createWebHashHistory } from 'vue-router' import remainingRouter from './modules/remaining' // 创建路由实例 const router = createRouter({ - history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带# + history: createWebHashHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带# strict: true, routes: remainingRouter as RouteRecordRaw[], scrollBehavior: () => ({ left: 0, top: 0 })