Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
3d05695e
提交
3d05695e
authored
6月 12, 2023
作者:
曹云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
改-设备租赁-列表,详情渠道价格判断
改-作业服务-详情-介绍数据 添-设备租赁,产品商城-详情-订单页面-无收货地址则显示添加地址,二维码扫码跳转至对应页面
上级
822ac16e
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
354 行增加
和
120 行删除
+354
-120
index.tsx
api/index.tsx
+47
-46
[id].page.tsx
pages/equipmentLeasing/detail/[id].page.tsx
+10
-7
index.tsx
...quipmentLeasing/detail/components/orderForGoods/index.tsx
+101
-22
styled.tsx
...uipmentLeasing/detail/components/orderForGoods/styled.tsx
+34
-3
styled.tsx
pages/equipmentLeasing/detail/styled.tsx
+2
-0
index.page.tsx
pages/equipmentLeasing/index.page.tsx
+11
-5
styled.tsx
pages/equipmentLeasing/styled.tsx
+11
-11
[id].page.tsx
pages/jobServices/detail/[id].page.tsx
+5
-2
index.tsx
pages/mall/detail/components/orderForGoods/index.tsx
+99
-21
styled.tsx
pages/mall/detail/components/orderForGoods/styled.tsx
+34
-3
没有找到文件。
api/index.tsx
浏览文件 @
3d05695e
import
request
,
{
Response
}
from
"~/api/request"
;
import
request
,
{
Response
}
from
'~/api/request'
import
config
from
"./config"
;
import
config
from
'./config'
export
interface
RegionResp
{
export
interface
RegionResp
{
childInfo
?:
RegionResp
[]
|
null
;
childInfo
?:
RegionResp
[]
|
null
id
:
number
;
id
:
number
level
:
number
;
level
:
number
name
:
string
;
name
:
string
pid
:
number
;
pid
:
number
}
}
export
interface
UserInfoResp
{
export
interface
UserInfoResp
{
id
:
number
;
id
:
number
accountType
:
number
;
accountType
:
number
uid
:
string
;
uid
:
string
phoneNum
:
string
;
phoneNum
:
string
userName
:
string
;
userName
:
string
nickName
:
string
;
nickName
:
string
userImg
:
string
;
userImg
:
string
userSex
:
number
;
userSex
:
number
email
:
string
;
email
:
string
source
:
number
;
source
:
number
accountStatus
:
number
;
accountStatus
:
number
remark
:
string
;
remark
:
string
portType
:
number
;
portType
:
number
createTime
:
string
;
createTime
:
string
companyAuthStatus
:
number
;
companyAuthStatus
:
number
token
:
string
;
token
:
string
cooperationTagId
:
number
|
null
}
}
export
interface
TestAppletLoginResp
{
export
interface
TestAppletLoginResp
{
userAccountId
:
number
;
userAccountId
:
number
token
:
string
;
token
:
string
uid
:
string
;
uid
:
string
phoneNum
?:
string
;
phoneNum
?:
string
nickName
:
string
;
nickName
:
string
sessionKey
?:
any
;
sessionKey
?:
any
}
}
export
default
{
export
default
{
//获取区域数据
//获取区域数据
region
:
():
Promise
<
Response
<
Array
<
RegionResp
>>>
=>
{
region
:
():
Promise
<
Response
<
Array
<
RegionResp
>>>
=>
{
return
request
(
"/pms/webDevice/getSecondDistrictInfo"
);
return
request
(
'/pms/webDevice/getSecondDistrictInfo'
)
},
},
//测试-小程序unionId登录-注册
//测试-小程序unionId登录-注册
testAppletLogin
:
():
Promise
<
Response
<
TestAppletLoginResp
>>
=>
{
testAppletLogin
:
():
Promise
<
Response
<
TestAppletLoginResp
>>
=>
{
let
params
=
new
URLSearchParams
()
;
let
params
=
new
URLSearchParams
()
params
.
append
(
"unionId"
,
"oQZEd5hy0Qrwaj10BGtP8xq8vH--s88888"
);
params
.
append
(
'unionId'
,
'oQZEd5hy0Qrwaj10BGtP8xq8vH--s88888'
)
return
request
(
return
request
(
"/userapp/auth/testAppletLogin"
,
'/userapp/auth/testAppletLogin'
,
"post"
,
'post'
,
{},
{},
{
{
headers
:
{
headers
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
},
body
:
params
,
body
:
params
,
}
}
)
;
)
},
},
//生成小程序码
//生成小程序码
getAppletQRCode
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
getAppletQRCode
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
return
request
(
"/userapp/wx/getAppletQRCode"
,
"get"
,
{
return
request
(
'/userapp/wx/getAppletQRCode'
,
'get'
,
{
page
:
"page-identity/identity-empower/index"
,
page
:
'page-identity/identity-empower/index'
,
scene
:
"randomLoginCode="
+
params
.
randomLoginCode
,
scene
:
'randomLoginCode='
+
params
.
randomLoginCode
,
})
;
})
},
},
//查询登录信息
//查询登录信息
getLoginInfo
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
getLoginInfo
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
return
request
(
"/userapp/temp-auth/getLoginInfo"
,
"get"
,
params
,
{
return
request
(
'/userapp/temp-auth/getLoginInfo'
,
'get'
,
params
,
{
hideError
:
true
//隐藏错误提示
hideError
:
true
,
//隐藏错误提示
})
;
})
},
},
//获取用户基本信息
//获取用户基本信息
userInfo
:
():
Promise
<
Response
<
UserInfoResp
>>
=>
{
userInfo
:
():
Promise
<
Response
<
UserInfoResp
>>
=>
{
return
request
(
"/userapp/user-account/info"
,
"get"
);
return
request
(
'/userapp/user-account/info'
,
'get'
)
},
},
//图片上传地址
//图片上传地址
imgOss
:
()
=>
{
imgOss
:
()
=>
{
return
config
.
baseUrl
+
"/pms/upload/imgOss"
;
return
config
.
baseUrl
+
'/pms/upload/imgOss'
},
},
}
;
}
pages/equipmentLeasing/detail/[id].page.tsx
浏览文件 @
3d05695e
...
@@ -231,10 +231,15 @@ export default function EquipmentLeasingDetail() {
...
@@ -231,10 +231,15 @@ export default function EquipmentLeasingDetail() {
)
:
(
)
:
(
<
div
className=
"function not"
></
div
>
<
div
className=
"function not"
></
div
>
)
}
)
}
<
div
className=
"menoy"
>
{
userInfo
?.
cooperationTagId
?
(
<
span
className=
"menoy-left"
>
{
`¥${detail?.price! | 0}`
}
</
span
>
<
div
className=
"menoy"
>
<
span
className=
"menoy-right"
>
/天起
</
span
>
<
span
className=
"menoy-left"
>
{
`¥${detail?.price! | 0}`
}
</
span
>
</
div
>
<
span
className=
"menoy-right"
>
/天起
</
span
>
</
div
>
)
:
(
<
div
className=
"menoy"
>
暂无报价
</
div
>
)
}
<
div
className=
"classification"
>
<
div
className=
"classification"
>
<
div
className=
"top"
>
<
div
className=
"top"
>
<
div
className=
"left"
>
<
div
className=
"left"
>
...
@@ -282,9 +287,7 @@ export default function EquipmentLeasingDetail() {
...
@@ -282,9 +287,7 @@ export default function EquipmentLeasingDetail() {
style=
{
{
textAlign
:
'center'
}
}
style=
{
{
textAlign
:
'center'
}
}
dangerouslySetInnerHTML=
{
{
__html
:
detail
?.
goodsDetail
.
content
}
}
dangerouslySetInnerHTML=
{
{
__html
:
detail
?.
goodsDetail
.
content
}
}
></
div
>
></
div
>
)
:
(
)
:
null
}
<
div
style=
{
{
textAlign
:
'center'
}
}
></
div
>
)
}
{
/* 立即租赁 */
}
{
/* 立即租赁 */
}
<
Modal
<
Modal
wrapClassName=
"application"
wrapClassName=
"application"
...
...
pages/equipmentLeasing/detail/components/orderForGoods/index.tsx
浏览文件 @
3d05695e
...
@@ -12,7 +12,6 @@ import {
...
@@ -12,7 +12,6 @@ import {
}
from
'../../api'
}
from
'../../api'
import
{
UserContext
}
from
'~/lib/userProvider'
import
{
UserContext
}
from
'~/lib/userProvider'
const
{
TextArea
}
=
Input
const
{
TextArea
}
=
Input
interface
PropsBox
{
interface
PropsBox
{
setIsorderForGoods
:
(
boolean
:
boolean
)
=>
void
setIsorderForGoods
:
(
boolean
:
boolean
)
=>
void
detailData
?:
GetWebDeviceDetailResult
|
null
detailData
?:
GetWebDeviceDetailResult
|
null
...
@@ -142,44 +141,78 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -142,44 +141,78 @@ export default function OrderForGoods(props: PropsBox) {
}
}
}
}
//扫码管理地址
const
[
isAddAddressOpen
,
setIsAddAddressOpen
]
=
useState
(
false
)
const
[
addressVisible
,
setAddressVisible
]
=
useState
(
false
)
return
(
return
(
<
OrderForGoodsBox
>
<
OrderForGoodsBox
>
<
div
className=
"address"
>
<
div
className=
"address"
>
<
div
className=
"top"
>
<
div
className=
"top"
>
<
div
className=
"left"
>
确认收货地址
</
div
>
<
div
className=
"left"
>
确认收货地址
</
div
>
<
div
className=
"right"
>
<
div
className=
"right"
>
<
Button
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
<
Button
onClick=
{
()
=>
setIsAddAddressOpen
(
true
)
}
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
管理收货地址
管理收货地址
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"bottom"
>
<
div
className=
"bottom"
>
{
list
?.
map
((
item
,
index
)
=>
(
{
list
?.
length
?
(
<
div
list
?.
map
((
item
,
index
)
=>
(
key=
{
item
.
id
}
<
div
className=
{
`item ${value === index ? 'active' : ''}`
}
key=
{
item
.
id
}
onClick=
{
()
=>
onChangeValue
(
index
)
}
className=
{
`item ${value === index ? 'active' : ''}`
}
>
onClick=
{
()
=>
onChangeValue
(
index
)
}
>
<
div
className=
"left"
>
<
div
className=
"active"
>
<
div
className=
"icon"
></
div
>
<
div
className=
"label"
>
寄送至
</
div
>
</
div
>
<
Radio
.
Group
onChange=
{
onChange
}
value=
{
value
}
>
<
Space
direction=
"vertical"
>
<
Radio
value=
{
index
}
>
{
item
.
takeAddress
}
</
Radio
>
</
Space
>
</
Radio
.
Group
>
</
div
>
{
value
===
index
?
(
<
div
className=
"right"
>
<
Button
onClick=
{
()
=>
setIsAddAddressOpen
(
true
)
}
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
修改地址
</
Button
>
</
div
>
)
:
null
}
</
div
>
))
)
:
(
<
div
className=
"item active"
>
<
div
className=
"left"
>
<
div
className=
"left"
>
<
div
className=
"active"
>
<
div
className=
"active"
>
<
div
className=
"icon"
></
div
>
<
div
className=
"icon"
></
div
>
<
div
className=
"label"
>
寄送至
</
div
>
<
div
className=
"label"
>
暂无地址,请打开手机端【云享飞】微信小程序,【我的】-【个人设置】-【地址管理】添加
</
div
>
</
div
>
</
div
>
<
Radio
.
Group
onChange=
{
onChange
}
value=
{
value
}
>
<
Space
direction=
"vertical"
>
<
Radio
value=
{
index
}
>
{
item
.
takeAddress
}
</
Radio
>
</
Space
>
</
Radio
.
Group
>
</
div
>
</
div
>
{
value
===
index
?
(
<
div
className=
"right"
>
<
div
className=
"right"
>
<
Button
<
Button
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
onClick=
{
()
=>
setIsAddAddressOpen
(
true
)
}
修改地址
type=
"link"
</
Button
>
style=
{
{
color
:
'#007aff'
}
}
</
div
>
>
)
:
null
}
添加地址
</
Button
>
</
div
>
</
div
>
</
div
>
)
)
}
)
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"info"
>
<
div
className=
"info"
>
...
@@ -206,6 +239,7 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -206,6 +239,7 @@ export default function OrderForGoods(props: PropsBox) {
<
div
className=
"body-item article"
style=
{
{
width
:
290
}
}
>
<
div
className=
"body-item article"
style=
{
{
width
:
290
}
}
>
<
div
className=
"image"
>
<
div
className=
"image"
>
<
Image
<
Image
className=
"image-box"
preview=
{
{
visible
:
false
}
}
preview=
{
{
visible
:
false
}
}
src=
{
(
wareSkuList
&&
wareSkuList
!
[
0
].
specImage
)
||
''
}
src=
{
(
wareSkuList
&&
wareSkuList
!
[
0
].
specImage
)
||
''
}
onClick=
{
()
=>
setVisible
(
true
)
}
onClick=
{
()
=>
setVisible
(
true
)
}
...
@@ -332,6 +366,51 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -332,6 +366,51 @@ export default function OrderForGoods(props: PropsBox) {
<
div
>
云享飞账号:
{
userInfo
?.
uid
}
</
div
>
<
div
>
云享飞账号:
{
userInfo
?.
uid
}
</
div
>
<
div
>
付款方式: 可用(¥
{
paymentDetail
?.
balance
}
)
</
div
>
<
div
>
付款方式: 可用(¥
{
paymentDetail
?.
balance
}
)
</
div
>
</
Modal
>
</
Modal
>
<
Modal
wrapClassName=
"addAddress"
open=
{
isAddAddressOpen
}
onCancel=
{
()
=>
setIsAddAddressOpen
(
false
)
}
getContainer=
{
false
}
maskClosable=
{
false
}
width=
{
420
}
footer=
{
false
}
>
<
div
className=
"title"
>
扫码管理地址
</
div
>
<
div
className=
"image"
>
<
Image
className=
"addressImg"
preview=
{
{
visible
:
false
}
}
src=
{
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-formal.jpg'
||
''
}
onClick=
{
()
=>
setAddressVisible
(
true
)
}
/>
<
div
style=
{
{
display
:
'none'
}
}
>
<
Image
.
PreviewGroup
preview=
{
{
visible
:
addressVisible
,
onVisibleChange
:
(
vis
)
=>
setAddressVisible
(
vis
),
}
}
>
<
Image
src=
{
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-formal.jpg'
||
''
}
/>
</
Image
.
PreviewGroup
>
</
div
>
</
div
>
<
div
className=
"content"
>
【打开微信扫一扫】-进入云享飞【我的】- 【个人设置】-【地址管理】
</
div
>
</
Modal
>
</
OrderForGoodsBox
>
</
OrderForGoodsBox
>
)
)
}
}
pages/equipmentLeasing/detail/components/orderForGoods/styled.tsx
浏览文件 @
3d05695e
...
@@ -106,10 +106,11 @@ export const OrderForGoodsBox = styled.div`
...
@@ -106,10 +106,11 @@ export const OrderForGoodsBox = styled.div`
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
.image {
.image {
width: 80px;
height: 80px;
background-color: pink;
margin-right: 10px;
margin-right: 10px;
.image-box {
width: 80px;
height: 80px;
}
}
}
.right {
.right {
.top {
.top {
...
@@ -309,4 +310,34 @@ export const OrderForGoodsBox = styled.div`
...
@@ -309,4 +310,34 @@ export const OrderForGoodsBox = styled.div`
color: #ff552d;
color: #ff552d;
}
}
}
}
.addAddress {
.title {
text-align: center;
height: 25px;
font-size: 20px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #000000;
line-height: 25px;
}
.image {
display: flex;
justify-content: center;
align-items: center;
padding: 48px 0 32px;
.addressImg {
width: 150px;
height: 150px;
}
}
.content {
text-align: center;
width: 311px;
height: 38px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #3e454d;
line-height: 19px;
}
}
`
`
pages/equipmentLeasing/detail/styled.tsx
浏览文件 @
3d05695e
...
@@ -35,6 +35,8 @@ export const Box = styled.div`
...
@@ -35,6 +35,8 @@ export const Box = styled.div`
}
}
.menoy {
.menoy {
margin-top: 17px;
margin-top: 17px;
font-size: 32px;
color: #ef2e00;
&-left {
&-left {
width: 79px;
width: 79px;
height: 41px;
height: 41px;
...
...
pages/equipmentLeasing/index.page.tsx
浏览文件 @
3d05695e
import
{
Pagination
}
from
'antd'
import
{
Pagination
}
from
'antd'
import
Image
from
'next/image'
import
Image
from
'next/image'
import
{
useRouter
}
from
'next/router'
import
{
useRouter
}
from
'next/router'
import
{
useEffect
,
useRef
,
useState
}
from
'react'
import
{
use
Context
,
use
Effect
,
useRef
,
useState
}
from
'react'
import
ContentBox
from
'~/components/contentBox'
import
ContentBox
from
'~/components/contentBox'
import
Filter
,
{
AdapterResult
,
FilterResult
}
from
'~/components/filter'
import
Filter
,
{
AdapterResult
,
FilterResult
}
from
'~/components/filter'
import
Layout
from
'~/components/layout'
import
Layout
from
'~/components/layout'
import
api
,
{
Advertisement
,
Device
}
from
'./api'
import
api
,
{
Advertisement
,
Device
}
from
'./api'
import
{
Box
}
from
'./styled'
import
{
Box
}
from
'./styled'
import
{
UserContext
}
from
'~/lib/userProvider'
// 此函数在构建时被调用
// 此函数在构建时被调用
export
async
function
getStaticProps
()
{
export
async
function
getStaticProps
()
{
//获取筛选数据,进行静态渲染
//获取筛选数据,进行静态渲染
...
@@ -18,6 +19,7 @@ export async function getStaticProps() {
...
@@ -18,6 +19,7 @@ export async function getStaticProps() {
type
Props
=
{}
type
Props
=
{}
export
default
function
EquipmentLeasing
(
props
:
Props
)
{
export
default
function
EquipmentLeasing
(
props
:
Props
)
{
const
{
userInfo
}
=
useContext
(
UserContext
)
const
router
=
useRouter
()
const
router
=
useRouter
()
const
[
productList
,
setProductList
]
=
useState
(
const
[
productList
,
setProductList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
Array
<
{
element
:
JSX
.
Element
}
>
...
@@ -42,10 +44,14 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -42,10 +44,14 @@ export default function EquipmentLeasing(props: Props) {
<
div
className=
"item-bottom-title"
title=
{
item
.
goodsName
}
>
<
div
className=
"item-bottom-title"
title=
{
item
.
goodsName
}
>
{
item
.
goodsName
}
{
item
.
goodsName
}
</
div
>
</
div
>
<
div
className=
"item-bottom-price"
>
{
userInfo
?.
cooperationTagId
?
(
<
span
className=
"money"
>
¥
{
item
.
price
}
</
span
>
<
div
className=
"item-bottom-price"
>
<
span
className=
"unit"
>
/天起
</
span
>
<
span
className=
"money"
>
¥
{
item
.
price
}
</
span
>
</
div
>
<
span
className=
"unit"
>
/天起
</
span
>
</
div
>
)
:
(
<
div
className=
"unit"
>
暂无报价
</
div
>
)
}
</
div
>
</
div
>
</
div
>
</
div
>
)
)
...
...
pages/equipmentLeasing/styled.tsx
浏览文件 @
3d05695e
import
styled
from
"styled-components"
;
import
styled
from
'styled-components'
export
default
function
Style
()
{
export
default
function
Style
()
{
return
<></>
;
return
<></>
}
}
export
const
Box
=
styled
.
div
`
export
const
Box
=
styled
.
div
`
...
@@ -54,14 +54,14 @@ export const Box = styled.div`
...
@@ -54,14 +54,14 @@ export const Box = styled.div`
color: #ff552d;
color: #ff552d;
line-height: 22px;
line-height: 22px;
}
}
.unit {
}
width: 58px;
.unit {
height: 22
px;
width: 58
px;
font-size: 14
px;
height: 22
px;
font-family: MicrosoftYaHei
;
font-size: 14px
;
color: #ff552d
;
font-family: MicrosoftYaHei
;
line-height: 22px
;
color: #ff552d
;
}
line-height: 22px;
}
}
}
}
}
}
...
@@ -76,4 +76,4 @@ export const Box = styled.div`
...
@@ -76,4 +76,4 @@ export const Box = styled.div`
.pagination-page {
.pagination-page {
text-align: right;
text-align: right;
}
}
`
;
`
pages/jobServices/detail/[id].page.tsx
浏览文件 @
3d05695e
...
@@ -46,7 +46,11 @@ export default function JobServicesDetail() {
...
@@ -46,7 +46,11 @@ export default function JobServicesDetail() {
src={detail?.teamPoster ? detail?.teamPoster : ''}
src={detail?.teamPoster ? detail?.teamPoster : ''}
alt="error"
alt="error"
/> */
}
/> */
}
{
detail
?.
serviceIntroduction
}
{
detail
?.
serviceIntroduction
?
(
<
div
dangerouslySetInnerHTML=
{
{
__html
:
detail
?.
serviceIntroduction
}
}
></
div
>
)
:
null
}
</
div
>
</
div
>
),
),
},
},
...
@@ -254,7 +258,6 @@ export default function JobServicesDetail() {
...
@@ -254,7 +258,6 @@ export default function JobServicesDetail() {
<
RangePicker
<
RangePicker
style=
{
{
width
:
376
,
marginTop
:
10
}
}
style=
{
{
width
:
376
,
marginTop
:
10
}
}
disabledDate=
{
disabledDate
}
disabledDate=
{
disabledDate
}
showTime
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
...
...
pages/mall/detail/components/orderForGoods/index.tsx
浏览文件 @
3d05695e
...
@@ -86,44 +86,77 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -86,44 +86,77 @@ export default function OrderForGoods(props: PropsBox) {
//图片预览
//图片预览
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
visible
,
setVisible
]
=
useState
(
false
)
//扫码管理地址
const
[
isAddAddressOpen
,
setIsAddAddressOpen
]
=
useState
(
false
)
const
[
addressVisible
,
setAddressVisible
]
=
useState
(
false
)
return
(
return
(
<
OrderForGoodsBox
>
<
OrderForGoodsBox
>
<
div
className=
"address"
>
<
div
className=
"address"
>
<
div
className=
"top"
>
<
div
className=
"top"
>
<
div
className=
"left"
>
确认收货地址
</
div
>
<
div
className=
"left"
>
确认收货地址
</
div
>
<
div
className=
"right"
>
<
div
className=
"right"
>
<
Button
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
<
Button
onClick=
{
()
=>
setIsAddAddressOpen
(
true
)
}
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
管理收货地址
管理收货地址
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"bottom"
>
<
div
className=
"bottom"
>
{
list
?.
map
((
item
,
index
)
=>
(
{
list
?.
length
?
(
<
div
list
?.
map
((
item
,
index
)
=>
(
key=
{
item
.
id
}
<
div
className=
{
`item ${value === item.id ? 'active' : ''}`
}
key=
{
item
.
id
}
onClick=
{
()
=>
onChangeValue
(
item
.
id
)
}
className=
{
`item ${value === item.id ? 'active' : ''}`
}
>
onClick=
{
()
=>
onChangeValue
(
item
.
id
)
}
>
<
div
className=
"left"
>
<
div
className=
"active"
>
<
div
className=
"icon"
></
div
>
<
div
className=
"label"
>
寄送至
</
div
>
</
div
>
<
Radio
.
Group
onChange=
{
onChange
}
value=
{
value
}
>
<
Space
direction=
"vertical"
>
<
Radio
value=
{
item
.
id
}
>
{
item
.
takeAddress
}
</
Radio
>
</
Space
>
</
Radio
.
Group
>
</
div
>
{
value
===
item
.
id
?
(
<
div
className=
"right"
>
<
Button
onClick=
{
()
=>
setIsAddAddressOpen
(
true
)
}
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
修改地址
</
Button
>
</
div
>
)
:
null
}
</
div
>
))
)
:
(
<
div
className=
"item active"
>
<
div
className=
"left"
>
<
div
className=
"left"
>
<
div
className=
"active"
>
<
div
className=
"active"
>
<
div
className=
"icon"
></
div
>
<
div
className=
"icon"
></
div
>
<
div
className=
"label"
>
寄送至
</
div
>
<
div
className=
"label"
>
暂无地址,请打开手机端【云享飞】微信小程序,【我的】-【个人设置】-【地址管理】添加
</
div
>
</
div
>
</
div
>
<
Radio
.
Group
onChange=
{
onChange
}
value=
{
value
}
>
<
Space
direction=
"vertical"
>
<
Radio
value=
{
item
.
id
}
>
{
item
.
takeAddress
}
</
Radio
>
</
Space
>
</
Radio
.
Group
>
</
div
>
</
div
>
{
value
===
item
.
id
?
(
<
div
className=
"right"
>
<
div
className=
"right"
>
<
Button
<
Button
type=
"link"
style=
{
{
color
:
'#007aff'
}
}
>
onClick=
{
()
=>
setIsAddAddressOpen
(
true
)
}
修改地址
type=
"link"
</
Button
>
style=
{
{
color
:
'#007aff'
}
}
</
div
>
>
)
:
null
}
添加地址
</
Button
>
</
div
>
</
div
>
</
div
>
)
)
}
)
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"info"
>
<
div
className=
"info"
>
...
@@ -148,6 +181,7 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -148,6 +181,7 @@ export default function OrderForGoods(props: PropsBox) {
<
div
className=
"body-item article"
style=
{
{
width
:
290
}
}
>
<
div
className=
"body-item article"
style=
{
{
width
:
290
}
}
>
<
div
className=
"image"
>
<
div
className=
"image"
>
<
Image
<
Image
className=
"image-box"
preview=
{
{
visible
:
false
}
}
preview=
{
{
visible
:
false
}
}
src=
{
item
.
prodSkuSpecImage
||
''
}
src=
{
item
.
prodSkuSpecImage
||
''
}
onClick=
{
()
=>
setVisible
(
true
)
}
onClick=
{
()
=>
setVisible
(
true
)
}
...
@@ -233,6 +267,50 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -233,6 +267,50 @@ export default function OrderForGoods(props: PropsBox) {
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
Modal
wrapClassName=
"addAddress"
open=
{
isAddAddressOpen
}
onCancel=
{
()
=>
setIsAddAddressOpen
(
false
)
}
getContainer=
{
false
}
maskClosable=
{
false
}
width=
{
420
}
footer=
{
false
}
>
<
div
className=
"title"
>
扫码管理地址
</
div
>
<
div
className=
"image"
>
<
Image
className=
"addressImg"
preview=
{
{
visible
:
false
}
}
src=
{
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-formal.jpg'
||
''
}
onClick=
{
()
=>
setAddressVisible
(
true
)
}
/>
<
div
style=
{
{
display
:
'none'
}
}
>
<
Image
.
PreviewGroup
preview=
{
{
visible
:
addressVisible
,
onVisibleChange
:
(
vis
)
=>
setAddressVisible
(
vis
),
}
}
>
<
Image
src=
{
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-formal.jpg'
||
''
}
/>
</
Image
.
PreviewGroup
>
</
div
>
</
div
>
<
div
className=
"content"
>
【打开微信扫一扫】-进入云享飞【我的】- 【个人设置】-【地址管理】
</
div
>
</
Modal
>
</
OrderForGoodsBox
>
</
OrderForGoodsBox
>
)
)
}
}
pages/mall/detail/components/orderForGoods/styled.tsx
浏览文件 @
3d05695e
...
@@ -106,10 +106,11 @@ export const OrderForGoodsBox = styled.div`
...
@@ -106,10 +106,11 @@ export const OrderForGoodsBox = styled.div`
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
.image {
.image {
width: 80px;
height: 80px;
background-color: pink;
margin-right: 10px;
margin-right: 10px;
.image-box {
width: 80px;
height: 80px;
}
}
}
.right {
.right {
.top {
.top {
...
@@ -272,4 +273,34 @@ export const OrderForGoodsBox = styled.div`
...
@@ -272,4 +273,34 @@ export const OrderForGoodsBox = styled.div`
color: #ff552d;
color: #ff552d;
}
}
}
}
.addAddress {
.title {
text-align: center;
height: 25px;
font-size: 20px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #000000;
line-height: 25px;
}
.image {
display: flex;
justify-content: center;
align-items: center;
padding: 48px 0 32px;
.addressImg {
width: 150px;
height: 150px;
}
}
.content {
text-align: center;
width: 311px;
height: 38px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #3e454d;
line-height: 19px;
}
}
`
`
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论