Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
89ba34b3
提交
89ba34b3
authored
6月 30, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:商城,设备租赁下单
上级
2e3b4331
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
13 行增加
和
12 行删除
+13
-12
index.tsx
...quipmentLeasing/detail/components/orderForGoods/index.tsx
+4
-9
index.tsx
pages/mall/detail/components/orderForGoods/index.tsx
+9
-3
没有找到文件。
pages/equipmentLeasing/detail/components/orderForGoods/index.tsx
浏览文件 @
89ba34b3
...
@@ -19,7 +19,7 @@ interface PropsBox {
...
@@ -19,7 +19,7 @@ interface PropsBox {
export
default
function
OrderForGoods
(
props
:
PropsBox
)
{
export
default
function
OrderForGoods
(
props
:
PropsBox
)
{
const
{
setIsorderForGoods
,
shopDetail
,
days
,
detailData
,
wareSkuList
,
discount
}
=
props
;
const
{
setIsorderForGoods
,
shopDetail
,
days
,
detailData
,
wareSkuList
,
discount
}
=
props
;
const
[
value
,
setValue
]
=
useState
(
1
);
const
[
value
,
setValue
]
=
useState
(
-
1
);
const
[
areaValue
,
setAreaValue
]
=
useState
<
string
>
();
const
[
areaValue
,
setAreaValue
]
=
useState
<
string
>
();
const
[
list
,
setList
]
=
useState
<
Array
<
UserAddress
>
|
null
>
();
const
[
list
,
setList
]
=
useState
<
Array
<
UserAddress
>
|
null
>
();
const
[
detail
,
setDetail
]
=
useState
<
ShopDetail
>
();
const
[
detail
,
setDetail
]
=
useState
<
ShopDetail
>
();
...
@@ -33,9 +33,7 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -33,9 +33,7 @@ export default function OrderForGoods(props: PropsBox) {
};
};
const
detailSumbit
=
()
=>
{
const
detailSumbit
=
()
=>
{
if
(
!
list
?.
length
)
return
message
.
warning
(
'暂无地址信息,请前往云享飞添加地址'
);
if
(
!
list
?.
length
)
return
message
.
warning
(
'暂无地址信息,请前往云享飞添加地址'
);
console
.
log
(
value
!==
0
);
if
(
value
===
-
1
)
return
message
.
warning
(
'请选择地址'
);
if
(
list
?.
length
&&
!
value
&&
value
!==
0
)
return
message
.
warning
(
'请选择地址'
);
if
(
detailData
&&
shopDetail
&&
list
?.
length
&&
wareSkuList
)
{
if
(
detailData
&&
shopDetail
&&
list
?.
length
&&
wareSkuList
)
{
const
pushList
=
{
const
pushList
=
{
actualPay
:
discount
?.
specPrice
[
0
]?.
price
!
*
shopDetail
?.
num
!
*
days
!
||
0
,
actualPay
:
discount
?.
specPrice
[
0
]?.
price
!
*
shopDetail
?.
num
!
*
days
!
||
0
,
...
@@ -83,11 +81,8 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -83,11 +81,8 @@ export default function OrderForGoods(props: PropsBox) {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
setList
(
res
.
result
);
setList
(
res
.
result
);
res
.
result
?.
map
((
item
,
index
)
=>
{
let
index
:
number
=
res
.
result
?.
findIndex
((
item
)
=>
item
.
type
===
0
)
as
number
;
if
(
item
.
type
===
0
)
{
setValue
(
index
);
setValue
(
index
);
}
});
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
...
pages/mall/detail/components/orderForGoods/index.tsx
浏览文件 @
89ba34b3
...
@@ -29,10 +29,12 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -29,10 +29,12 @@ export default function OrderForGoods(props: PropsBox) {
const
[
list
,
setList
]
=
useState
<
Array
<
UserAddress
>
|
null
>
();
const
[
list
,
setList
]
=
useState
<
Array
<
UserAddress
>
|
null
>
();
const
onChange
=
(
e
:
RadioChangeEvent
)
=>
{
const
onChange
=
(
e
:
RadioChangeEvent
)
=>
{
console
.
log
(
'数据-->'
,
e
.
target
.
value
);
setValue
(
e
.
target
.
value
);
setValue
(
e
.
target
.
value
);
};
};
const
onChangeValue
=
(
index
:
number
)
=>
{
const
onChangeValue
=
(
id
:
number
)
=>
{
setValue
(
index
);
console
.
log
(
'数据id-->'
,
id
);
setValue
(
id
);
};
};
const
detailSumbit
=
()
=>
{
const
detailSumbit
=
()
=>
{
if
(
!
list
?.
length
)
return
message
.
warning
(
'暂无地址信息,请前往云享飞添加地址'
);
if
(
!
list
?.
length
)
return
message
.
warning
(
'暂无地址信息,请前往云享飞添加地址'
);
...
@@ -245,7 +247,11 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -245,7 +247,11 @@ export default function OrderForGoods(props: PropsBox) {
</
div
>
</
div
>
<
div
className=
'bottom'
>
<
div
className=
'bottom'
>
<
div
className=
'value'
>
寄送至
</
div
>
<
div
className=
'value'
>
寄送至
</
div
>
{
list
?
<
div
className=
'value-content'
>
{
list
!
[
value
]?.
takeAddress
}
</
div
>
:
null
}
{
list
?
(
<
div
className=
'value-content'
>
{
list
!
[
list
.
findIndex
((
v
)
=>
v
.
id
===
value
)]?.
takeAddress
}
</
div
>
)
:
null
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'detail-sumbit'
>
<
div
className=
'detail-sumbit'
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论