提交 7964d573 作者: 曹云

改-找回代码

上级 f9bc644f
...@@ -82,7 +82,8 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -82,7 +82,8 @@ export default function OrderForGoods(props: PropsBox) {
if (res.code === '200') { if (res.code === '200') {
message.success('提交成功') message.success('提交成功')
setPaymentDetail(res.result) setPaymentDetail(res.result)
setIsPaymentOpen(true) // setIsPaymentOpen(true)
setIsorderForGoods(false)
} else { } else {
message.error(res.message) message.error(res.message)
} }
...@@ -340,7 +341,7 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -340,7 +341,7 @@ export default function OrderForGoods(props: PropsBox) {
</div> </div>
</div> </div>
<Modal {/* <Modal
wrapClassName="Payment" wrapClassName="Payment"
open={isPaymentOpen} open={isPaymentOpen}
onOk={handleOkPayment} onOk={handleOkPayment}
...@@ -365,7 +366,7 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -365,7 +366,7 @@ export default function OrderForGoods(props: PropsBox) {
</div> </div>
<div>云享飞账号: {userInfo?.uid}</div> <div>云享飞账号: {userInfo?.uid}</div>
<div>付款方式: 可用(¥{paymentDetail?.balance})</div> <div>付款方式: 可用(¥{paymentDetail?.balance})</div>
</Modal> </Modal> */}
<Modal <Modal
wrapClassName="addAddress" wrapClassName="addAddress"
...@@ -383,8 +384,8 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -383,8 +384,8 @@ export default function OrderForGoods(props: PropsBox) {
preview={{ visible: false }} preview={{ visible: false }}
src={ src={
window.location.href.includes('https://test.iuav.shop/') window.location.href.includes('https://test.iuav.shop/')
? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial.jpg' ? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal1.jpg'
: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal.jpg' || : 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial1.jpg' ||
'' ''
} }
onClick={() => setAddressVisible(true)} onClick={() => setAddressVisible(true)}
...@@ -399,8 +400,8 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -399,8 +400,8 @@ export default function OrderForGoods(props: PropsBox) {
<Image <Image
src={ src={
window.location.href.includes('https://test.iuav.shop/') window.location.href.includes('https://test.iuav.shop/')
? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial.jpg' ? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal1.jpg'
: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal.jpg' || : 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial1.jpg' ||
'' ''
} }
/> />
......
import styles from "./index.module.scss"; import styles from './index.module.scss'
import Layout from "~/components/layout"; import Layout from '~/components/layout'
import { Space, Image as AImage, Row, Col, Button, Divider, Badge } from "antd"; import { Space, Image as AImage, Row, Col, Button, Divider, Badge } from 'antd'
import { useContext, useEffect, useState } from "react"; import { useContext, useEffect, useState } from 'react'
import { DownOutlined, RightOutlined } from "@ant-design/icons"; import { DownOutlined, RightOutlined } from '@ant-design/icons'
import Image from "next/image"; import Image from 'next/image'
import errImg from "~/assets/errImg"; import errImg from '~/assets/errImg'
import { useRouter } from "next/router"; import { useRouter } from 'next/router'
// Import Swiper React components // Import Swiper React components
import { Swiper, SwiperSlide } from "swiper/react"; import { Swiper, SwiperSlide } from 'swiper/react'
import { Navigation } from "swiper"; import { Navigation } from 'swiper'
import OrderForGoods from './components/orderForGoods'
// Import Swiper styles // Import Swiper styles
import "swiper/css"; import 'swiper/css'
import "swiper/css/navigation"; import 'swiper/css/navigation'
import api, { GetLeaseGoodsDetailResp, ProductSpecList } from "./api"; import api, { GetLeaseGoodsDetailResp } from './api'
import IntentionModal from "./components/intentionModal"; import IntentionModal from './components/intentionModal'
import { UserContext } from "~/lib/userProvider"; import { UserContext } from '~/lib/userProvider'
export default function MallDetail() { export default function MallDetail() {
const { userInfo, setNeedLogin } = useContext(UserContext); const { userInfo, setNeedLogin } = useContext(UserContext)
const [visible, setVisible] = useState(false); //商品图预览 const [visible, setVisible] = useState(false) //商品图预览
const router = useRouter(); const router = useRouter()
const [id, setId] = useState<number | null>(null); const [id, setId] = useState<number | null>(null)
const [detail, setDetail] = useState<GetLeaseGoodsDetailResp | null>(null); //详情数据 const [detail, setDetail] = useState<GetLeaseGoodsDetailResp | null>(null) //详情数据
const [intentionModalOpen, setIntentionModalOpen] = useState(false); //意向弹窗 const [intentionModalOpen, setIntentionModalOpen] = useState(false) //意向弹窗
const [productImg, setProductImg] = useState(""); //展示的商品图 const [productImg, setProductImg] = useState('') //展示的商品图
const [previewIndex, setPreviewIndex] = useState(0); //预览开始索引
const [checkItems, setCheckItems] = useState<ProductSpecList[]>([]); //选中的规格
const [specCount, setSpecCount] = useState(0); //规格数量
useEffect(() => {
if (detail) {
let count = 0;
detail.goodsSpec?.forEach((good) => {
good.productSpecList?.forEach((product) => {
count++;
});
});
setSpecCount(count);
}
}, [detail]);
//打开意向modal //打开意向modal
const openIntentionModal = () => { const openIntentionModal = () => {
if (userInfo) { if (userInfo) {
setIntentionModalOpen(true); setIntentionModalOpen(true)
} else { } else {
setNeedLogin(true); setNeedLogin(true)
} }
}; }
//提交意向 //提交意向
const handleIntentionOk = () => { const handleIntentionOk = () => {
setIntentionModalOpen(false); setIntentionModalOpen(false)
}; }
const handleIntentionCancel = () => { const handleIntentionCancel = () => {
setIntentionModalOpen(false); setIntentionModalOpen(false)
}; }
useEffect(() => { useEffect(() => {
setId(Number(router.query.id)); setId(Number(router.query.id))
}, [router]); }, [router])
useEffect(() => { useEffect(() => {
if (id) { if (id) {
...@@ -71,12 +57,23 @@ export default function MallDetail() { ...@@ -71,12 +57,23 @@ export default function MallDetail() {
type: 0, type: 0,
}) })
.then((res) => { .then((res) => {
setDetail(res.result || null); setDetail(res.result || null)
setProductImg(res.result?.images?.[0]?.imgUrl || ""); setProductImg(res.result?.images?.[0]?.imgUrl || '')
}); const wareList = res.result?.goodsSpec.map(
(item) => item.productSpecList
)
if (wareList) {
const List: any = wareList.flat()
setWareSkuList(List)
}
})
} }
}, [id]); }, [id])
//订单弹框
const [isorderForGoods, setIsorderForGoods] = useState(false)
const [wareSkuList, setWareSkuList] = useState<any>()
const [mallDetail, setMallDetail] = useState<any>()
return ( return (
<Layout> <Layout>
{/* 意向弹窗 */} {/* 意向弹窗 */}
...@@ -85,179 +82,189 @@ export default function MallDetail() { ...@@ -85,179 +82,189 @@ export default function MallDetail() {
detail={detail} detail={detail}
onOk={handleIntentionOk} onOk={handleIntentionOk}
onCancel={handleIntentionCancel} onCancel={handleIntentionCancel}
onChange={(items: ProductSpecList[]) => setCheckItems(items)} setIsorderForGoods={setIsorderForGoods}
setMallDetail={setMallDetail}
></IntentionModal> ></IntentionModal>
<div className="page" style={{ marginTop: 20, backgroundColor: "#fff" }}> {!isorderForGoods ? (
<div style={{ display: "none" }}> <div
<AImage.PreviewGroup className="page"
preview={{ style={{ marginTop: 20, backgroundColor: '#fff' }}
visible,
onVisibleChange: (vis) => setVisible(vis),
current: previewIndex,
}}
>
{detail?.images?.map((item) => {
return <AImage key={item.id} src={item.imgUrl} />;
})}
</AImage.PreviewGroup>
</div>
<Space
size={30}
style={{ padding: "22px 24px 0", alignItems: "start" }}
> >
{/* 商品图 */} <div style={{ display: 'none' }}>
<Space size={17} direction="vertical" style={{ width: 300 }}> <AImage.PreviewGroup
<AImage preview={{ visible, onVisibleChange: (vis) => setVisible(vis) }}
preview={{ visible: false }}
width={300}
height={300}
src={productImg}
onClick={() => setVisible(true)}
fallback={errImg}
style={{
borderRadius: 6,
}}
/>
<Swiper
modules={[Navigation]}
spaceBetween={6}
slidesPerView={5}
onSlideChange={() => console.log("slide change")}
onSwiper={(swiper) => console.log(swiper)}
> >
{detail?.images?.map((item, i) => { {detail?.images?.map((item) => {
return ( return <AImage key={item.id} src={item.imgUrl} />
<SwiperSlide key={item.id}>
<AImage
preview={false}
width={50}
height={50}
src={item.imgUrl}
fallback={errImg}
style={{ cursor: "pointer" }}
onClick={() => {
setProductImg(item.imgUrl), setPreviewIndex(i);
}}
/>
</SwiperSlide>
);
})} })}
</Swiper> </AImage.PreviewGroup>
</Space> </div>
<Space
<Space direction="vertical" size={17}> size={30}
<div className={`${styles.font1} ${styles.ellipsis}`}> style={{ padding: '22px 24px 0', alignItems: 'start' }}
{detail?.goodsName} >
</div> {/* 商品图 */}
<div className={`${styles.font2} ${styles.ellipsis2}`} style={{}}> <Space size={17} direction="vertical" style={{ width: 300 }}>
{detail?.goodsDetail?.goodsDesc} <AImage
</div> preview={{ visible: false }}
<Space width={300}
size={24} height={300}
direction="vertical" src={productImg}
style={{ onClick={() => setVisible(true)}
padding: "24px 40px 0px 0", fallback={errImg}
width: 470, style={{
}} borderRadius: 6,
> }}
<Row wrap={false} justify="space-between"> />
<Col span={12}> <Swiper
<Row> modules={[Navigation]}
<Col flex="60px" className={styles.font3}> spaceBetween={6}
选择 slidesPerView={5}
</Col> onSlideChange={() => console.log('slide change')}
<Col flex="auto" className={styles.font4} style={{}}> onSwiper={(swiper) => console.log(swiper)}
已选:{checkItems.length} >
</Col> {detail?.images?.map((item) => {
</Row> return (
</Col> <SwiperSlide key={item.id}>
<Col> <AImage
<Row align="middle" style={{ cursor: "pointer" }}> preview={false}
<Col className={styles.font4} onClick={openIntentionModal}> width={50}
{specCount}种可选 height={50}
</Col> src={item.imgUrl}
<Col style={{ marginLeft: 9 }}> fallback={errImg}
<DownOutlined style={{ cursor: 'pointer' }}
style={{ onClick={() => setProductImg(item.imgUrl)}
fontSize: 12,
color: "RGBA(219, 219, 219, 1)",
}}
/> />
</Col> </SwiperSlide>
</Row> )
</Col> })}
</Row> </Swiper>
<Row wrap={false}>
<Col flex="60px" className={styles.font3}>
送至
</Col>
<Col flex="auto" style={{ cursor: "pointer" }}>
<Space size={5}>
<Image
alt=""
width={18}
height={18}
src={require("./assets/locate.png")}
></Image>
<span className={`${styles.font3} ${styles.ellipsis}`}>
广东深圳市南山区万科云城创新谷6栋A座…
</span>
</Space>
<div className={styles.font4} style={{ marginTop: 7 }}>
现货,22:00前下单,预计后天(8月30日)送达
</div>
</Col>
</Row>
</Space> </Space>
<Space size={12} style={{ marginTop: 123 }}>
<Button className={styles.btn1} onClick={openIntentionModal}> <Space direction="vertical" size={17}>
加入购物车 <div className={`${styles.font1} ${styles.ellipsis}`}>
</Button> {detail?.goodsName}
<Button </div>
className={styles.btn2} <div className={`${styles.font2} ${styles.ellipsis2}`} style={{}}>
type="primary" {detail?.goodsDetail?.goodsDesc}
onClick={openIntentionModal} </div>
<Space
size={24}
direction="vertical"
style={{
padding: '24px 40px 0px 0',
width: 470,
}}
> >
提交意向 <Row wrap={false} justify="space-between">
</Button> <Col span={12}>
<Space size={20} style={{ marginLeft: 19 }}> <Row>
<div style={{ textAlign: "center", cursor: "pointer" }}> <Col flex="60px" className={styles.font3}>
<Image 选择
alt="" </Col>
src={require("./assets/phone.png")} <Col flex="auto" className={styles.font4} style={{}}>
width={20} 已选:1件
height={20} </Col>
></Image> </Row>
<div className={styles.font5} style={{ marginTop: 5 }}> </Col>
电话 <Col>
</div> <Row align="middle" style={{ cursor: 'pointer' }}>
</div> <Col
<div style={{ textAlign: "center", cursor: "pointer" }}> className={styles.font4}
<Badge count={55} size="small"> onClick={openIntentionModal}
>
共3种可选
</Col>
<Col style={{ marginLeft: 9 }}>
<DownOutlined
style={{
fontSize: 12,
color: 'RGBA(219, 219, 219, 1)',
}}
/>
</Col>
</Row>
</Col>
</Row>
<Row wrap={false}>
<Col flex="60px" className={styles.font3}>
送至
</Col>
<Col flex="auto" style={{ cursor: 'pointer' }}>
<Space size={5}>
<Image
alt=""
width={18}
height={18}
src={require('./assets/locate.png')}
></Image>
<span className={`${styles.font3} ${styles.ellipsis}`}>
广东深圳市南山区万科云城创新谷6栋A座…
</span>
</Space>
<div className={styles.font4} style={{ marginTop: 7 }}>
现货,22:00前下单,预计后天(8月30日)送达
</div>
</Col>
</Row>
</Space>
<Space size={12} style={{ marginTop: 123 }}>
<Button className={styles.btn1} onClick={openIntentionModal}>
加入购物车
</Button>
<Button
className={styles.btn2}
type="primary"
onClick={openIntentionModal}
>
提交意向
</Button>
<Space size={20} style={{ marginLeft: 19 }}>
<div style={{ textAlign: 'center', cursor: 'pointer' }}>
<Image <Image
alt="" alt=""
src={require("./assets/car.png")} src={require('./assets/phone.png')}
width={20} width={20}
height={20} height={20}
></Image> ></Image>
</Badge> <div className={styles.font5} style={{ marginTop: 5 }}>
<div className={styles.font5} style={{ marginTop: 5 }}> 电话
购物车 </div>
</div> </div>
</div> <div style={{ textAlign: 'center', cursor: 'pointer' }}>
<Badge count={55} size="small">
<Image
alt=""
src={require('./assets/car.png')}
width={20}
height={20}
></Image>
</Badge>
<div className={styles.font5} style={{ marginTop: 5 }}>
购物车
</div>
</div>
</Space>
</Space> </Space>
</Space> </Space>
</Space> </Space>
</Space> <Divider className={styles.divider}>商品详情</Divider>
<Divider className={styles.divider}>商品详情</Divider> <div style={{ textAlign: 'center' }}>
<div style={{ textAlign: "center" }}> <div
<div dangerouslySetInnerHTML={{
dangerouslySetInnerHTML={{ __html: detail?.goodsDetail?.content || '',
__html: detail?.goodsDetail?.content || "", }}
}} ></div>
></div> </div>
</div> </div>
</div> ) : (
//订单
<OrderForGoods
setIsorderForGoods={setIsorderForGoods}
detailData={detail}
mallDetail={mallDetail}
/>
)}
</Layout> </Layout>
); )
} }
import { Button, Col, Image, message, Modal, Row, Space } from "antd"; import {
import { useEffect, useState } from "react"; Button,
import errImg from "~/assets/errImg"; Col,
import { GetLeaseGoodsDetailResp, ProductSpecList } from "../../api"; Image,
import styles from "./index.module.scss"; message,
import api from "./api"; Modal,
import Item from "antd/es/list/Item"; Row,
Space,
InputNumber,
} from 'antd'
import { Dispatch, SetStateAction, useEffect, useState } from 'react'
import errImg from '~/assets/errImg'
import { GetLeaseGoodsDetailResp, ProductSpecList } from '../../api'
import styles from './index.module.scss'
import api from './api'
import Item from 'antd/es/list/Item'
type Props = { type Props = {
open?: boolean; open?: boolean
onOk?: () => void; onOk?: () => void
onCancel: () => void; onCancel: () => void
detail: GetLeaseGoodsDetailResp | null; detail: GetLeaseGoodsDetailResp | null
onChange?: (checkItems: ProductSpecList[]) => void; setIsorderForGoods: Dispatch<SetStateAction<boolean>>
}; setMallDetail: Dispatch<SetStateAction<any>>
}
export default function IntentionModal(props: Props) { export default function IntentionModal(props: Props) {
const [checkedMap, setCheckedMap] = useState<{ string?: boolean }>({}); //通过索引记录选中的产品规格 例: {'1,1': true|false} props.detail?.goodsSpec[1].productSpecList[1] const [checkedMap, setCheckedMap] = useState<{ string?: boolean }>({}) //通过索引记录选中的产品规格 例: {'1,1': true|false} props.detail?.goodsSpec[1].productSpecList[1]
const [checkItems, setCheckItems] = useState<ProductSpecList[]>([]); //选中的规格 const [checkItems, setCheckItems] = useState<ProductSpecList[]>([]) //选中的规格
const [loading, setLoading] = useState(false); //下单中 const [loading, setLoading] = useState(false) //下单中
const [numValue, setNumValue] = useState<number | null>(1) //数量
useEffect(() => { useEffect(() => {
let list: ProductSpecList[] = []; let list: ProductSpecList[] = []
Object.keys(checkedMap).forEach((key) => { Object.keys(checkedMap).forEach((key) => {
if (checkedMap[key as keyof typeof checkedMap]) { if (checkedMap[key as keyof typeof checkedMap]) {
let arr = key.split(","); let arr = key.split(',')
let item = let item =
props.detail?.goodsSpec[Number(arr[0])].productSpecList[ props.detail?.goodsSpec[Number(arr[0])].productSpecList[
Number(arr[1]) Number(arr[1])
]; ]
if (item) { if (item) {
list.push(item); list.push(item)
} }
} }
}); })
setCheckItems(list); setCheckItems(list)
props.onChange && props.onChange(list); setNumValue(1)
}, [checkedMap]); }, [checkedMap])
//添加规格到购物车 //添加规格到购物车
function addProductSpec(goodsSpecIndex: number, productSpecIndex: number) { function addProductSpec(goodsSpecIndex: number, productSpecIndex: number) {
let temp = {}; let temp = {}
//@ts-ignore //@ts-ignore
temp[`${goodsSpecIndex},${productSpecIndex}`] = temp[`${goodsSpecIndex},${productSpecIndex}`] =
//@ts-ignore //@ts-ignore
!checkedMap[`${goodsSpecIndex},${productSpecIndex}`]; !checkedMap[`${goodsSpecIndex},${productSpecIndex}`]
setCheckedMap({ setCheckedMap({
...checkedMap, ...checkedMap,
...temp, ...temp,
}); })
}
//数量
const onChangeNum = (value: number | null) => {
console.log('changed', value)
setNumValue(value)
} }
//提交 //提交
function onSubmit() { function onSubmit() {
let buyNum = 0; let buyNum = 0
let mallSpecIds: number[] = []; let mallSpecIds: number[] = []
Object.keys(checkedMap).forEach((key) => { Object.keys(checkedMap).forEach((key) => {
if (checkedMap[key as keyof typeof checkedMap]) { if (checkedMap[key as keyof typeof checkedMap]) {
buyNum++; buyNum++
let arr = key.split(","); let arr = key.split(',')
let specId = let specId =
props.detail?.goodsSpec[Number(arr[0])].productSpecList[ props.detail?.goodsSpec[Number(arr[0])].productSpecList[
Number(arr[1]) Number(arr[1])
].id; ].id
if (specId) { if (specId) {
mallSpecIds.push(specId); mallSpecIds.push(specId)
} }
} }
}); })
if (buyNum > 0) { if (buyNum > 0) {
setLoading(true); setLoading(true)
api api
.commitMallOrder({ .commitMallOrder({
buyNum, buyNum: numValue || 1,
directoryId: 1, directoryId: 1,
goodsInfoId: props.detail!.id, goodsInfoId: props.detail!.id,
mallSpecIds, mallSpecIds,
userAddressId: 1, userAddressId: 1,
}) })
.then((res) => { .then((res) => {
if (res.code == "200") { if (res.code == '200') {
message.success("提交意向成功"); message.success('提交意向成功')
//重置为未选中 //重置为未选中
let temp = { let temp = {
...checkedMap, ...checkedMap,
}; }
Object.keys(temp).forEach((key) => { Object.keys(temp).forEach((key) => {
temp[key as keyof typeof temp] = false; temp[key as keyof typeof temp] = false
}); })
setCheckedMap(temp); setCheckedMap(temp)
props.onCancel(); props.onCancel()
props.setIsorderForGoods(true)
props.setMallDetail({
...res.result,
buyNum: numValue || 1,
directoryId: 1,
goodsInfoId: props.detail!.id,
mallSpecIds,
userAddressId: 1,
})
} else { } else {
} }
setLoading(false); setLoading(false)
}) })
.catch((err) => { .catch((err) => {
message.error("提交意向失败"); message.error('提交意向失败')
console.log("err", err); console.log('err', err)
setLoading(false); setLoading(false)
}); })
} }
} }
...@@ -111,21 +136,20 @@ export default function IntentionModal(props: Props) { ...@@ -111,21 +136,20 @@ export default function IntentionModal(props: Props) {
style={{ padding: 0 }} style={{ padding: 0 }}
className={styles.model} className={styles.model}
footer={ footer={
<div style={{ padding: "13px 36px" }}> <div style={{ padding: '13px 36px' }}>
<Button <Button
type="primary" type="primary"
className={styles.font5} className={styles.font5}
style={{ width: "100%", height: 44 }} style={{ width: '100%', height: 44 }}
onClick={onSubmit} onClick={onSubmit}
loading={loading} loading={loading}
disabled={checkItems.length == 0}
> >
提交意向 提交意向
</Button> </Button>
</div> </div>
} }
> >
<Row style={{ padding: "22px 39px 12px 39px" }} wrap={false}> <Row style={{ padding: '22px 39px 12px 39px' }} wrap={false}>
<Col> <Col>
<Image <Image
width={100} width={100}
...@@ -146,12 +170,12 @@ export default function IntentionModal(props: Props) { ...@@ -146,12 +170,12 @@ export default function IntentionModal(props: Props) {
className={`${styles.font2} ${styles.ellipsis2}`} className={`${styles.font2} ${styles.ellipsis2}`}
style={{ marginTop: 7 }} style={{ marginTop: 7 }}
> >
已选:{" "} 已选:{' '}
{checkItems {checkItems
.map((item) => { .map((item) => {
return item.specName; return item.specName
}) })
.join("+")} .join('+')}
</div> </div>
</Col> </Col>
</Row> </Row>
...@@ -169,7 +193,7 @@ export default function IntentionModal(props: Props) { ...@@ -169,7 +193,7 @@ export default function IntentionModal(props: Props) {
> >
{item.goodsSpecName} {item.goodsSpecName}
</div> </div>
<Space size={10} direction="vertical" style={{ width: "100%" }}> <Space size={10} direction="vertical" style={{ width: '100%' }}>
{item.productSpecList?.map((product, productSpecIndex) => { {item.productSpecList?.map((product, productSpecIndex) => {
return ( return (
<Row <Row
...@@ -182,10 +206,10 @@ export default function IntentionModal(props: Props) { ...@@ -182,10 +206,10 @@ export default function IntentionModal(props: Props) {
border: checkedMap[ border: checkedMap[
`${goodsSpecIndex},${productSpecIndex}` `${goodsSpecIndex},${productSpecIndex}`
] ]
? "1px solid #FF552D" ? '1px solid #FF552D'
: "1px solid #d6d6d6", : '1px solid #d6d6d6',
height: 50, height: 50,
cursor: "pointer", cursor: 'pointer',
}} }}
onClick={() => onClick={() =>
addProductSpec(goodsSpecIndex, productSpecIndex) addProductSpec(goodsSpecIndex, productSpecIndex)
...@@ -207,14 +231,27 @@ export default function IntentionModal(props: Props) { ...@@ -207,14 +231,27 @@ export default function IntentionModal(props: Props) {
{product.specName} {product.specName}
</Col> </Col>
</Row> </Row>
); )
})} })}
</Space> </Space>
</div> </div>
); )
})} })}
<div className={styles.numBox}>
<div className={styles.numLeft}>
<div className={styles.label}>数量</div>
</div>
<div className={styles.numRight}>
<InputNumber
min={1}
max={100}
value={numValue}
onChange={onChangeNum}
/>
</div>
</div>
</div> </div>
</div> </div>
</Modal> </Modal>
); )
} }
...@@ -283,8 +283,8 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -283,8 +283,8 @@ export default function OrderForGoods(props: PropsBox) {
preview={{ visible: false }} preview={{ visible: false }}
src={ src={
window.location.href.includes('https://test.iuav.shop/') window.location.href.includes('https://test.iuav.shop/')
? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial.jpg' ? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal1.jpg'
: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal.jpg' || : 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial1.jpg' ||
'' ''
} }
onClick={() => setAddressVisible(true)} onClick={() => setAddressVisible(true)}
...@@ -299,8 +299,8 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -299,8 +299,8 @@ export default function OrderForGoods(props: PropsBox) {
<Image <Image
src={ src={
window.location.href.includes('https://test.iuav.shop/') window.location.href.includes('https://test.iuav.shop/')
? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial.jpg' ? 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal1.jpg'
: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-formal.jpg' || : 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/image/app-iuav-trial1.jpg' ||
'' ''
} }
/> />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论