Commit 5e39c7b1 by 肖康

同步测试

parent 794a6e44
...@@ -84,7 +84,7 @@ const NavBig = (props: ResponseTypeCateList) => { ...@@ -84,7 +84,7 @@ const NavBig = (props: ResponseTypeCateList) => {
items.map((item, index) => { items.map((item, index) => {
return ( return (
<li className={router.pathname === item.url ? styles.act : ''} key={item.name + index}> <li className={router.pathname === item.url ? styles.act : ''} key={item.name + index}>
<Link href={item.url}>{item.name}</Link> <Link href={item.url} >{item.name}</Link>
</li> </li>
) )
}) })
......
import { QQURL } from "@/configReact"; import { QQURL } from "@/configReact";
import { useContext } from "react";
......
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
experimental: {
prefetch: false,
},
reactStrictMode: false, // 关闭 React 严格模式 reactStrictMode: false, // 关闭 React 严格模式
// 配置代理 // 配置代理
async rewrites() { async rewrites() {
...@@ -8,6 +11,19 @@ const nextConfig = { ...@@ -8,6 +11,19 @@ const nextConfig = {
destination: 'http://erpweb.liexindev.net/api/:path*', destination: 'http://erpweb.liexindev.net/api/:path*',
}, ]; }, ];
}, },
async headers() {
return [
{
source: '/_next/data/:path*',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=3600, immutable'
},
],
},
];
},
}; };
export default nextConfig; export default nextConfig;
\ No newline at end of file
{ {
"name": "reactdemo", "name": "europaWeb",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
}, },
"dependencies": { "dependencies": {
"axios": "^1.7.2", "axios": "^1.7.2",
"next": "14.2.5", "next": "13",
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"react-paginate": "^8.2.0", "react-paginate": "^8.2.0",
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"@types/react": "^18", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "14.2.5", "eslint-config-next": "12",
"typescript": "^5" "typescript": "^5"
} }
} }
...@@ -8,6 +8,7 @@ import { GetServerSideProps } from 'next'; ...@@ -8,6 +8,7 @@ import { GetServerSideProps } from 'next';
import { getCateList } from "@/server/getCateList"; import { getCateList } from "@/server/getCateList";
import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types' import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types'
export const getStaticProps: GetServerSideProps = async () => { export const getStaticProps: GetServerSideProps = async () => {
return getCateList() return getCateList()
} }
......
export type ResponseType = {
success: boolean,
data: Array<{
shopId: string,
shopName: string,
cartList: Array<{
productId: string,
imgUrl: string,
weight: string,
title: string,
price: number,
count: number
}>
}>
}
\ No newline at end of file
...@@ -4,7 +4,9 @@ import '../public/styles/base.scss' ...@@ -4,7 +4,9 @@ import '../public/styles/base.scss'
import type { AppProps } from 'next/app'; import type { AppProps } from 'next/app';
const MyApp= ({ Component, pageProps }:AppProps) => { const MyApp= ({ Component, pageProps }:AppProps) => {
return <Component {...pageProps} /> return <Component {...pageProps} />
}; };
......
...@@ -6,7 +6,7 @@ import { GetServerSideProps } from 'next'; ...@@ -6,7 +6,7 @@ import { GetServerSideProps } from 'next';
import { getCateList } from "@/server/getCateList"; import { getCateList } from "@/server/getCateList";
import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types' import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types'
export const getStaticProps: GetServerSideProps = async () => { export const getServerSideProps: GetServerSideProps = async (context) => {
return getCateList() return getCateList()
} }
......
export type ResponseType = {
success: boolean,
data: Array<{
shopId: string,
shopName: string,
cartList: Array<{
productId: string,
imgUrl: string,
weight: string,
title: string,
price: number,
count: number
}>
}>
}
\ No newline at end of file
...@@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react'; ...@@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react';
import type { ListSortType } from '@/components/ListSort/types' import type { ListSortType } from '@/components/ListSort/types'
import type { dataListItemType } from '@/components/ListOneItem/types' import type { dataListItemType } from '@/components/ListOneItem/types'
import type { brandResponseType, requestDataType, brandInfoResponseType, brandInfoType } from './types' import type { brandResponseType, requestDataType, brandInfoResponseType } from '@/types/brandTypes'
import ListOneItem from '@/components/ListOneItem'; import ListOneItem from '@/components/ListOneItem';
import useRequest from '@/hooks/useRequest'; import useRequest from '@/hooks/useRequest';
...@@ -97,10 +97,10 @@ const Page = (props: { cateList: ResponseTypeCateList,brandInfoData:brandInfoRes ...@@ -97,10 +97,10 @@ const Page = (props: { cateList: ResponseTypeCateList,brandInfoData:brandInfoRes
<> <>
<main> <main>
<Header {...props.cateList} /> <Header {...props.cateList} />
<BreadNav><strong>"{brandInfo?.brand_name}"的型号搜索结果</strong></BreadNav> <BreadNav><strong>&quot;{brandInfo?.brand_name}&quot;的型号搜索结果</strong></BreadNav>
<div className={`${styles.mvBrandlistPage} w1226`} > <div className={`${styles.mvBrandlistPage} w1226`} >
<div className={`${styles.brandheadsl} row boxsiz`}> <div className={`${styles.brandheadsl} row boxsiz`}>
<img src={brandInfo?.brand_logo || 'http://static.ichunt.com//dist/res/home/images/goods_default.png'} alt="" className={styles.brandimg} /> <img src={brandInfo?.brand_logo || 'http://static.ichunt.com//dist/res/home/images/goods_default.png'} alt='' className={styles.brandimg} />
<div className={styles.brandInfo} > <div className={styles.brandInfo} >
<h2>{brandInfo?.brand_name}</h2> <h2>{brandInfo?.brand_name}</h2>
<div className={styles.textBf}> <div className={styles.textBf}>
......
...@@ -7,10 +7,10 @@ import { getBrandMapData } from "@/server/getBrandMapData"; ...@@ -7,10 +7,10 @@ import { getBrandMapData } from "@/server/getBrandMapData";
import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types' import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types'
import type { brandMapResponseType } from './types'; import type { brandMapResponseType } from '@/types/brandMapTypes';
import Link from 'next/link'; import Link from 'next/link';
export const getStaticProps: GetServerSideProps = async () => { export const getServerSideProps: GetServerSideProps = async () => {
return getBrandMapData() return getBrandMapData()
} }
const BrandMap = (props: { cateList: ResponseTypeCateList, brandMapData: brandMapResponseType }) => { const BrandMap = (props: { cateList: ResponseTypeCateList, brandMapData: brandMapResponseType }) => {
......
...@@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react'; ...@@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react';
import type { ListSortType } from '@/components/ListSort/types' import type { ListSortType } from '@/components/ListSort/types'
import type { dataListItemType } from '@/components/ListOneItem/types' import type { dataListItemType } from '@/components/ListOneItem/types'
import type { classResponseType, requestDataType } from './types' import type { classResponseType, requestDataType } from '@/types/categoryTypes'
import ListOneItem from '../../components/ListOneItem'; import ListOneItem from '../../components/ListOneItem';
import useRequest from '../../hooks/useRequest'; import useRequest from '../../hooks/useRequest';
......
...@@ -7,10 +7,10 @@ import { getClassMapData } from "@/server/getClassMapData"; ...@@ -7,10 +7,10 @@ import { getClassMapData } from "@/server/getClassMapData";
import Footer from "@/components/Footer"; import Footer from "@/components/Footer";
import Header from "@/components/Header"; import Header from "@/components/Header";
import type { classMapResponseType } from './types'; import type { classMapResponseType } from '@/types/classMapTypes';
import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types' import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types'
export const getStaticProps: GetServerSideProps = async () => { export const getServerSideProps: GetServerSideProps = async () => {
return getClassMapData() return getClassMapData()
} }
......
...@@ -7,7 +7,7 @@ import { GetServerSideProps } from 'next'; ...@@ -7,7 +7,7 @@ import { GetServerSideProps } from 'next';
import { getCateList } from "@/server/getCateList"; import { getCateList } from "@/server/getCateList";
import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types' import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types'
export const getStaticProps: GetServerSideProps = async () => { export const getServerSideProps: GetServerSideProps = async (context) => {
return getCateList() return getCateList()
} }
......
export type ResponseType = {
success: boolean,
data: Array<{
shopId: string,
shopName: string,
cartList: Array<{
productId: string,
imgUrl: string,
weight: string,
title: string,
price: number,
count: number
}>
}>
}
\ No newline at end of file
...@@ -5,7 +5,7 @@ import DetailHead from './components/DetailHead'; ...@@ -5,7 +5,7 @@ import DetailHead from './components/DetailHead';
import DetailSection from './components/DetailSection'; import DetailSection from './components/DetailSection';
import BreadNav from '../../components/BreadNav'; import BreadNav from '../../components/BreadNav';
import type { DetailResponseType } from './types' import type { DetailResponseType,skuInfoResponseType } from '@/types/detailTypes'
import Footer from "@/components/Footer"; import Footer from "@/components/Footer";
import Header from "@/components/Header"; import Header from "@/components/Header";
...@@ -19,11 +19,11 @@ export const getServerSideProps: GetServerSideProps = async (context) => { ...@@ -19,11 +19,11 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
return getDetailData(query.sku_id) return getDetailData(query.sku_id)
} }
const Page = (props: { cateList: ResponseTypeCateList, brandInfoData: DetailResponseType }) => { const Page = (props: { cateList: ResponseTypeCateList, detailInfoData: DetailResponseType }) => {
const detailData = props.brandInfoData const detailData = props.detailInfoData
const sku_info:skuInfoResponseType=detailData.data?.sku_info
return ( return (
<> <>
...@@ -32,10 +32,10 @@ const Page = (props: { cateList: ResponseTypeCateList, brandInfoData: DetailResp ...@@ -32,10 +32,10 @@ const Page = (props: { cateList: ResponseTypeCateList, brandInfoData: DetailResp
<Header {...props.cateList} /> <Header {...props.cateList} />
<div className={styles.mvDetailPage}> <div className={styles.mvDetailPage}>
{ {
detailData && detailData.data?.sku_info ? sku_info ?
<> <>
<BreadNav > <strong>{detailData.data?.sku_info?.sku_name}</strong></BreadNav> <BreadNav > <strong>{detailData.data?.sku_info?.sku_name}</strong></BreadNav>
<DetailHead {...detailData} /> <DetailHead {...sku_info} />
<DetailSection {...detailData} /> <DetailSection {...detailData} />
</> </>
: :
......
import QqIcon from "@/components/QqIcon" import QqIcon from "@/components/QqIcon"
import type { DetailResponseType } from '../types' import type { skuInfoResponseType } from '@/types/detailTypes'
import styles from '../index.module.scss' import styles from '../index.module.scss'
import { QQURL } from "@/configReact"; import { QQURL } from "@/configReact";
const DetailHead = (props: DetailResponseType) => { const DetailHead = (props: skuInfoResponseType) => {
const sku_info = props!.data?.sku_info! const sku_info =props!
return ( return (
<> <>
...@@ -29,7 +29,7 @@ const DetailHead = (props: DetailResponseType) => { ...@@ -29,7 +29,7 @@ const DetailHead = (props: DetailResponseType) => {
</div> </div>
</div> </div>
</div> </div>
<div className={`${styles.R} boxsiz`}> <div className={`${styles.r} boxsiz`}>
<p className='row'> <p className='row'>
<span className={styles.items}>库存:{sku_info.stock} </span> <span className={styles.items}>库存:{sku_info.stock} </span>
<span className={styles.items}>交期:HK {sku_info.hk_delivery_time}</span> <span className={styles.items}>交期:HK {sku_info.hk_delivery_time}</span>
...@@ -43,7 +43,7 @@ const DetailHead = (props: DetailResponseType) => { ...@@ -43,7 +43,7 @@ const DetailHead = (props: DetailResponseType) => {
<span className={styles.items}>递增: {sku_info.multiple}</span> <span className={styles.items}>递增: {sku_info.multiple}</span>
</p> </p>
{ {
sku_info.ladder_price.map((item,index) => { (sku_info.ladder_price||[]).map((item,index) => {
return ( return (
<p className='row' key={index}> <p className='row' key={index}>
<span className={styles.items}> {item.purchase}+</span> <span className={styles.items}> {item.purchase}+</span>
......
import Link from 'next/link' import Link from 'next/link'
import type { DetailResponseType } from '../types' import type { DetailResponseType } from '@/types/detailTypes'
import styles from '../index.module.scss' import styles from '../index.module.scss'
......
...@@ -14,7 +14,7 @@ import { getHomeData } from "../server/getHomeData"; ...@@ -14,7 +14,7 @@ import { getHomeData } from "../server/getHomeData";
import type {ResponseTypeCateList} from '@/components/Header/components/NavBig/types' import type {ResponseTypeCateList} from '@/components/Header/components/NavBig/types'
import type {ResponseTypeHome} from './index/types' import type {ResponseTypeHome} from '@/types/indexTypes'
const Page=(props:{cateList:ResponseTypeCateList,homepageList:ResponseTypeHome})=>{ const Page=(props:{cateList:ResponseTypeCateList,homepageList:ResponseTypeHome})=>{
...@@ -42,7 +42,7 @@ const Page=(props:{cateList:ResponseTypeCateList,homepageList:ResponseTypeHome}) ...@@ -42,7 +42,7 @@ const Page=(props:{cateList:ResponseTypeCateList,homepageList:ResponseTypeHome})
//getServerSideProps //getServerSideProps
export const getStaticProps: GetServerSideProps = async () => { export const getServerSideProps: GetServerSideProps = async () => {
return getHomeData() return getHomeData()
} }
......
...@@ -4,6 +4,8 @@ import { Swiper, SwiperSlide } from 'swiper/react'; ...@@ -4,6 +4,8 @@ import { Swiper, SwiperSlide } from 'swiper/react';
import { Autoplay, Pagination } from 'swiper/modules'; import { Autoplay, Pagination } from 'swiper/modules';
import 'swiper/css'; import 'swiper/css';
import 'swiper/css/pagination'; import 'swiper/css/pagination';
import Image from 'next/image';
const HomeBanner = () => { const HomeBanner = () => {
const bannerList = [ const bannerList = [
{ {
......
import styles from '../index.module.scss' import styles from '../index.module.scss'
import Link from 'next/link'; import Link from 'next/link';
import type { ResponseTypeHome } from '../types'; import type { ResponseTypeHome } from '@/types/indexTypes';
const HomeFloor1 = (props: ResponseTypeHome) => { const HomeFloor1 = (props: ResponseTypeHome) => {
const on_sale_list = props!.data?.on_sale_list || [] const on_sale_list = props!.data?.on_sale_list || []
...@@ -27,9 +27,9 @@ const HomeFloor1 = (props: ResponseTypeHome) => { ...@@ -27,9 +27,9 @@ const HomeFloor1 = (props: ResponseTypeHome) => {
</div> </div>
<a href='/' className={styles.floor1ad}> <Link href='/' className={styles.floor1ad}>
<img src="https://img.ichunt.com/test/images/cms/202405/30/a263b85bf297ae7d85f68a01b5db320d.jpg" alt="" /> <img src="https://img.ichunt.com/test/images/cms/202405/30/a263b85bf297ae7d85f68a01b5db320d.jpg" alt="" />
</a> </Link>
</div> </div>
</> </>
) )
......
import Link from 'next/link'; import Link from 'next/link';
import styles from '../index.module.scss' import styles from '../index.module.scss'
import type { ResponseTypeHome } from '../types'; import type { ResponseTypeHome } from '@/types/indexTypes';
const HomeFloor2 = (props: ResponseTypeHome) => { const HomeFloor2 = (props: ResponseTypeHome) => {
const recommend_goods_list = props!.data?.recommend_goods_list || [] const recommend_goods_list = props!.data?.recommend_goods_list || []
return ( return (
......
import Link from 'next/link'; import Link from 'next/link';
import styles from '../index.module.scss' import styles from '../index.module.scss'
import type { ResponseTypeHome } from '../types'; import type { ResponseTypeHome } from '@/types/indexTypes';
const HomeFloor3 = (props: ResponseTypeHome) => { const HomeFloor3 = (props: ResponseTypeHome) => {
const recommend_brand_list = props!.data?.recommend_brand_list || [] const recommend_brand_list = props!.data?.recommend_brand_list || []
......
...@@ -7,14 +7,14 @@ import { GetServerSideProps } from 'next'; ...@@ -7,14 +7,14 @@ import { GetServerSideProps } from 'next';
import { getCateList } from "@/server/getCateList"; import { getCateList } from "@/server/getCateList";
import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types' import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types'
export const getStaticProps: GetServerSideProps = async () => { export const getServerSideProps: GetServerSideProps = async () => {
return getCateList() return getCateList()
} }
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import FilterDate from './FilterDate'; import FilterDate from './FilterDate';
import useRequest from '../../hooks/useRequest'; import useRequest from '../../hooks/useRequest';
import type { NoticeResponseType, listType } from './types' import type { NoticeResponseType, listType } from '@/types/noticeTypes'
......
...@@ -7,8 +7,8 @@ import BreadNav from '../../components/BreadNav'; ...@@ -7,8 +7,8 @@ import BreadNav from '../../components/BreadNav';
import ListSort from '../../components/ListSort'; import ListSort from '../../components/ListSort';
import ListOneItem from '../../components/ListOneItem'; import ListOneItem from '../../components/ListOneItem';
import { brandsAndClasssReducer, supplierDataReducer } from './reducer'; import { brandsAndClasssReducer, supplierDataReducer } from '@/reducers/searchReducers';
import type { ResponseTypeSearch, supplierDataType } from './types' import type { ResponseTypeSearch, supplierDataType } from '@/types/searchTypes'
import useRequest from '../../hooks/useRequest'; import useRequest from '../../hooks/useRequest';
import ListNoData from '../../components/ListNoData'; import ListNoData from '../../components/ListNoData';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
...@@ -21,7 +21,7 @@ import { GetServerSideProps } from 'next'; ...@@ -21,7 +21,7 @@ import { GetServerSideProps } from 'next';
import { getCateList } from "@/server/getCateList"; import { getCateList } from "@/server/getCateList";
import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types' import type { ResponseTypeCateList } from '@/components/Header/components/NavBig/types'
export const getStaticProps: GetServerSideProps = async () => { export const getServerSideProps: GetServerSideProps = async () => {
return getCateList() return getCateList()
} }
const supplierIdS = ['', '24'] const supplierIdS = ['', '24']
...@@ -106,7 +106,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => { ...@@ -106,7 +106,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
<> <>
<main> <main>
<Header {...props.cateList} /> <Header {...props.cateList} />
<BreadNav><strong>"{keyword}"的型号搜索结果</strong></BreadNav> <BreadNav><strong>&quot;{keyword}&quot;的型号搜索结果</strong></BreadNav>
<div className={`${styles.mvSearchPage} w1226`} > <div className={`${styles.mvSearchPage} w1226`} >
<div className={styles.shiftBox}> <div className={styles.shiftBox}>
<div className={`${styles.shiftGroup} row`} > <div className={`${styles.shiftGroup} row`} >
......
import type { BrandAndClassType, supplierDataType } from './types' import type { BrandAndClassType, supplierDataType } from '@/types/searchTypes'
import type { ListSortType } from '../../components/ListSort/types' import type { ListSortType } from '@/components/ListSort/types'
export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) => { export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) => {
if (action.type === 'brandsInit' || action.type === 'classsInit') { if (action.type === 'brandsInit' || action.type === 'classsInit') {
...@@ -122,3 +122,5 @@ export const supplierDataReducer = (state: Array<supplierDataType>, action: {typ ...@@ -122,3 +122,5 @@ export const supplierDataReducer = (state: Array<supplierDataType>, action: {typ
import {API_URL} from '../configReact' import {API_URL} from '../configReact'
export async function getCateList() { export async function getCateList() {
const res = await fetch(API_URL+'/api/home/getCateList'); const res = await fetch(API_URL+'/api/home/getCateList');
const cateList= await res.json() const cateList = await res.json();
// 将数据作为 props 返回 return { props: { cateList } };
return { props: { cateList} };
} }
...@@ -4,6 +4,8 @@ export async function getHomeData() { ...@@ -4,6 +4,8 @@ export async function getHomeData() {
// 在这里进行异步数据获取 // 在这里进行异步数据获取
const res = await fetch(API_URL+'/api/home/getCateList'); const res = await fetch(API_URL+'/api/home/getCateList');
const res2 = await fetch(API_URL+'/api/home/getHomepageList'); const res2 = await fetch(API_URL+'/api/home/getHomepageList');
const [cateList, homepageList] = await Promise.all([ const [cateList, homepageList] = await Promise.all([
res.json(), res.json(),
res2.json() res2.json()
......
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
"noEmit": true, "noEmit": true,
"esModuleInterop": true, "esModuleInterop": true,
"module": "esnext", "module": "esnext",
"moduleResolution": "bundler", "moduleResolution": "node",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve", "jsx": "preserve",
...@@ -18,9 +22,20 @@ ...@@ -18,9 +22,20 @@
} }
], ],
"paths": { "paths": {
"@/*": ["./*"] "@/*": [
} "./*"
]
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "target": "es5",
"exclude": ["node_modules"] "forceConsistentCasingInFileNames": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }
...@@ -12,3 +12,5 @@ export type brandItenType={ ...@@ -12,3 +12,5 @@ export type brandItenType={
brand_logo:string, brand_logo:string,
brand_name:string brand_name:string
} }
import type { dataListItemType } from '../../components/ListOneItem/types' import type { dataListItemType } from '@/components/ListOneItem/types'
export type brandResponseType = { export type brandResponseType = {
code: number | string, code: number | string,
data: { data: {
...@@ -33,3 +33,4 @@ export type brandInfoType = { ...@@ -33,3 +33,4 @@ export type brandInfoType = {
"brand_desc": string "brand_desc": string
} }
import type { dataListItemType } from '../../components/ListOneItem/types' import type { dataListItemType } from '@/components/ListOneItem/types'
export type classResponseType = { export type classResponseType = {
code: number|string, code: number|string,
data: { data: {
...@@ -21,3 +21,4 @@ export type requestDataType={ ...@@ -21,3 +21,4 @@ export type requestDataType={
...@@ -9,3 +9,5 @@ export type classItemType = { ...@@ -9,3 +9,5 @@ export type classItemType = {
"goods_type_name": string, "goods_type_name": string,
child?:classItemType[] child?:classItemType[]
} }
export type DetailResponseType = { export type DetailResponseType = {
code: number|string, code: number|string,
data: { data: {
sku_info:skuInfoResponseType|null, sku_info:skuInfoResponseType,
other_sku_list:Array<{ other_sku_list:Array<{
sku_name:string, sku_name:string,
sku_id:string|number, sku_id:string|number,
...@@ -15,7 +15,7 @@ export type DetailResponseType = { ...@@ -15,7 +15,7 @@ export type DetailResponseType = {
export type skuInfoResponseType = { export type skuInfoResponseType = {
sku_name:string, sku_name:string,
brand_name?:string, brand_name?:string,
goods_images:string, goods_images?:string,
encap:string, encap:string,
batch_sn:string, batch_sn:string,
remark:string, remark:string,
...@@ -32,4 +32,5 @@ export type skuInfoResponseType = { ...@@ -32,4 +32,5 @@ export type skuInfoResponseType = {
price_us:number, price_us:number,
purchase:number purchase:number
}> }>
} }|undefined|null
\ No newline at end of file
...@@ -27,3 +27,4 @@ export type recommendGoodsListType = { ...@@ -27,3 +27,4 @@ export type recommendGoodsListType = {
single_price:string|number, single_price:string|number,
sku_name:string sku_name:string
} }
import type { dataListItemType } from '../../components/ListOneItem/types' import type { dataListItemType } from '@/components/ListOneItem/types'
export type ResponseTypeSearch = { export type ResponseTypeSearch = {
code: number | string, code: number | string,
data:Array<supplierDataType>, data:Array<supplierDataType>,
...@@ -21,3 +21,6 @@ export type BrandAndClassType = Array<{ ...@@ -21,3 +21,6 @@ export type BrandAndClassType = Array<{
}> }>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment