Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-platform
Commits
637e6418
Commit
637e6418
authored
Nov 16, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:1.商品logo链接问题;2.申请会员按钮添加确认提示;
parent
0264a1f0
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
162 additions
and
57 deletions
+162
-57
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+1
-1
index.tsx
src/pages/lxMall/components/AboutUs/index.tsx
+2
-2
index.less
src/pages/lxMall/components/ChannelHeader/index.less
+1
-1
index.tsx
src/pages/lxMall/components/ChannelHeader/index.tsx
+3
-1
index.tsx
src/pages/lxMall/components/CommonHeader/index.tsx
+21
-2
index.tsx
src/pages/lxMall/components/Recommand/index.tsx
+2
-2
index.less
src/pages/lxMall/components/ShopHeader/index.less
+1
-1
index.tsx
src/pages/lxMall/components/ShopHeader/index.tsx
+3
-1
LXIChannelLayout.tsx
src/pages/lxMall/layouts/LXIChannelLayout.tsx
+34
-27
index.tsx
src/pages/lxMall/pay/components/credit/index.tsx
+1
-0
index.tsx
src/pages/lxMall/pay/components/transfer/index.tsx
+2
-1
index.tsx
src/pages/lxMall/pay/components/wechat/index.tsx
+34
-3
index.tsx
src/pages/lxMall/pay/index.tsx
+1
-1
index.less
src/pages/lxMall/shopAbout/index.less
+26
-1
index.tsx
src/pages/lxMall/shopAbout/index.tsx
+30
-13
No files found.
src/pages/lxMall/commodityDetail/index.tsx
View file @
637e6418
...
...
@@ -262,7 +262,7 @@ const CommodityDetail = (props) => {
}
/**
* 获取会员权益
餐宿
* 获取会员权益
参数
* @param memberId
* @param memberRoleId
*/
...
...
src/pages/lxMall/components/AboutUs/index.tsx
View file @
637e6418
...
...
@@ -35,10 +35,10 @@ const AboutUs: React.FC<AboutUsPropsType> = (props) => {
link
=
`/shop/about?shopId=
${
shopUrlParam
}
`
break
case
LAYOUT_TYPE
.
channel
:
link
=
`
${
GlobalConfig
.
channelRootRoute
}
/about?
i
d=
${
shopUrlParam
}
`
link
=
`
${
GlobalConfig
.
channelRootRoute
}
/about?
channelI
d=
${
shopUrlParam
}
`
break
case
LAYOUT_TYPE
.
ichannel
:
link
=
`
${
GlobalConfig
.
ichannelRootRoute
}
/about?
i
d=
${
shopUrlParam
}
`
link
=
`
${
GlobalConfig
.
ichannelRootRoute
}
/about?
channelI
d=
${
shopUrlParam
}
`
break
}
return
link
...
...
src/pages/lxMall/components/ChannelHeader/index.less
View file @
637e6418
...
...
@@ -20,7 +20,7 @@
position: relative;
margin: auto 97px auto 20px;
&>
img {
img {
display: block;
margin: 0 auto;
max-width: 145px;
...
...
src/pages/lxMall/components/ChannelHeader/index.tsx
View file @
637e6418
...
...
@@ -53,7 +53,9 @@ const Header: React.FC<HeaderPropsType> = (props) => {
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
header_container
}
>
<
div
className=
{
styles
.
logo
}
>
<
img
src=
{
shopInfo
?.
logo
}
/>
<
a
href=
{
`${type === LAYOUT_TYPE.channel ? GlobalConfig.channelRootRoute : GlobalConfig.ichannelRootRoute}?channelId=${shopUrlParam}`
}
>
<
img
src=
{
shopInfo
?.
logo
}
/>
</
a
>
</
div
>
<
div
className=
{
styles
.
mall_search
}
>
<
div
className=
{
styles
.
mall_search_box
}
>
...
...
src/pages/lxMall/components/CommonHeader/index.tsx
View file @
637e6418
import
React
from
'react'
import
styles
from
'./index.less'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
GlobalConfig
}
from
'@/global/config'
interface
ShopHeaderPropsType
{
title
?:
string
;
...
...
@@ -11,13 +12,31 @@ interface ShopHeaderPropsType {
const
CommonHeader
:
React
.
FC
<
ShopHeaderPropsType
>
=
(
props
)
=>
{
const
{
title
,
logoUrl
}
=
props
const
{
title
,
logoUrl
,
type
,
shopUrlParam
}
=
props
const
getLink
=
()
=>
{
let
url
:
string
=
''
switch
(
type
)
{
case
LAYOUT_TYPE
.
channel
:
url
=
`
${
GlobalConfig
.
channelRootRoute
}
?channelId=
${
shopUrlParam
}
`
break
case
LAYOUT_TYPE
.
ichannel
:
url
=
`
${
GlobalConfig
.
ichannelRootRoute
}
?channelId=
${
shopUrlParam
}
`
break
default
:
url
=
'/'
break
}
return
url
}
return
(
<
div
className=
{
styles
.
common_header
}
>
<
div
className=
{
styles
.
common_header_container
}
>
<
div
className=
{
styles
.
logo
}
>
<
img
src=
{
logoUrl
}
/>
<
a
href=
{
getLink
()
}
>
<
img
src=
{
logoUrl
}
/>
</
a
>
</
div
>
<
div
className=
{
styles
.
common_header_split
}
></
div
>
<
div
className=
{
styles
.
common_header_title
}
>
{
title
}
</
div
>
...
...
src/pages/lxMall/components/Recommand/index.tsx
View file @
637e6418
...
...
@@ -184,7 +184,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
return
link
}
return
(
return
(
list
&&
list
.
length
>
0
)
?
(
<
div
className=
{
styles
.
recommand
}
>
<
div
className=
{
styles
.
recommand_title
}
>
买家还在看
</
div
>
<
div
className=
{
styles
.
recommand_list
}
>
...
...
@@ -206,7 +206,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
}
</
div
>
</
div
>
)
)
:
null
}
export
default
inject
(
'SiteStore'
)(
observer
(
Recommand
))
src/pages/lxMall/components/ShopHeader/index.less
View file @
637e6418
...
...
@@ -55,7 +55,7 @@
height: 48px;
margin-right: 8px;
&>
img {
img {
width: 48px;
height: 48px;
}
...
...
src/pages/lxMall/components/ShopHeader/index.tsx
View file @
637e6418
...
...
@@ -95,7 +95,9 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
<
div
className=
{
styles
.
shop_header_split
}
></
div
>
<
div
className=
{
styles
.
shop_header_info
}
>
<
div
className=
{
styles
.
shop_header_info_logo
}
>
<
img
src=
{
shopInfo
?.
logo
}
/>
<
a
href=
{
`/shop?shopId=${shopUrlParam}`
}
>
<
img
src=
{
shopInfo
?.
logo
}
/>
</
a
>
</
div
>
<
div
className=
{
styles
.
shop_header_info_content
}
>
<
div
className=
{
styles
.
shop_header_info_content_name
}
>
...
...
src/pages/lxMall/layouts/LXIChannelLayout.tsx
View file @
637e6418
import
React
,
{
useEffect
,
useState
}
from
'react'
import
React
,
{
Fragment
,
useEffect
,
useState
}
from
'react'
import
{
BasicLayoutProps
as
ProLayoutProps
,
getMenuData
}
from
'@ant-design/pro-layout'
import
SelectLang
from
'@/layouts/components/SelectLang'
import
{
useIntl
}
from
'umi'
import
{
useIntl
,
Helmet
}
from
'umi'
import
{
LAYOUT_TYPE
}
from
"@/constants"
import
{
inject
,
observer
}
from
'mobx-react'
import
TopBar
from
'../components/TopBar'
...
...
@@ -82,34 +82,41 @@ const LXIChannelLayout: React.FC<LXIChannelLayoutPropsType> = (props) => {
},
[
shopInfo
])
return
(
<
div
className=
{
styles
.
lxmall_page
}
>
<
TopBar
langComponent=
{
<
SelectLang
/>
}
name=
{
shopInfo
?.
company
}
type=
{
LAYOUT_TYPE
.
ichannel
}
shopUrlParam=
{
channelId
}
/>
<
div
className=
{
styles
.
content
}
>
<
Fragment
>
<
Helmet
>
{
!
menuRouter
?.
hideHeader
&&
(
<>
<
ChannelHeader
id=
{
query
.
shopId
}
shopUrlParam=
{
channelId
}
shopInfo=
{
shopInfo
}
type=
{
LAYOUT_TYPE
.
ichannel
}
/>
<
MainNav
menuData=
{
menuData
}
pathname=
{
location
.
pathname
}
type=
{
LAYOUT_TYPE
.
ichannel
}
memberId=
{
query
.
memberId
}
shopId=
{
query
.
shopId
}
shopUrlParam=
{
channelId
}
/>
</>
)
}
{
!
loading
?
shopInfo
?
children
&&
React
.
Children
.
map
(
children
,
(
child
:
any
)
=>
{
return
React
.
cloneElement
(
child
,
{
layoutType
:
LAYOUT_TYPE
.
ichannel
,
shopId
:
query
.
shopId
,
memberId
:
query
.
memberId
,
shopUrlParam
:
channelId
,
shopInfo
},
);
})
:
<
SearchShopResult
type
=
{
2
}
/> : nul
l
shopInfo
?
<
title
>
{
shopInfo
.
company
}
</
title
>
:
null
}
</
Helmet
>
<
div
className=
{
styles
.
lxmall_page
}
>
<
TopBar
langComponent=
{
<
SelectLang
/>
}
name=
{
shopInfo
?.
company
}
type=
{
LAYOUT_TYPE
.
ichannel
}
shopUrlParam=
{
channelId
}
/>
<
div
className=
{
styles
.
content
}
>
{
!
menuRouter
?.
hideHeader
&&
(
<>
<
ChannelHeader
id=
{
query
.
shopId
}
shopUrlParam=
{
channelId
}
shopInfo=
{
shopInfo
}
type=
{
LAYOUT_TYPE
.
ichannel
}
/>
<
MainNav
menuData=
{
menuData
}
pathname=
{
location
.
pathname
}
type=
{
LAYOUT_TYPE
.
ichannel
}
memberId=
{
query
.
memberId
}
shopId=
{
query
.
shopId
}
shopUrlParam=
{
channelId
}
/>
</>
)
}
{
!
loading
?
shopInfo
?
children
&&
React
.
Children
.
map
(
children
,
(
child
:
any
)
=>
{
return
React
.
cloneElement
(
child
,
{
layoutType
:
LAYOUT_TYPE
.
ichannel
,
shopId
:
query
.
shopId
,
memberId
:
query
.
memberId
,
shopUrlParam
:
channelId
,
shopInfo
},
);
})
:
<
SearchShopResult
type
=
{
2
}
/> : nul
l
}
</
div
>
<
Footer
/>
<
SideNav
type=
{
LAYOUT_TYPE
.
ichannel
}
shopUrlParam=
{
channelId
}
/>
</
div
>
<
Footer
/>
<
SideNav
type=
{
LAYOUT_TYPE
.
ichannel
}
shopUrlParam=
{
channelId
}
/>
</
div
>
</
Fragment
>
)
}
...
...
src/pages/lxMall/pay/components/credit/index.tsx
View file @
637e6418
...
...
@@ -80,6 +80,7 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
let
param
=
{
id
:
Number
(
orderId
),
paymentInformationId
:
Number
(
payInfo
.
paymentInformationId
),
payTypeId
:
payInfo
.
paymentChannelsId
,
payPassword
:
Number
(
payPassword
)
}
setConfirmLoading
(
true
)
...
...
src/pages/lxMall/pay/components/transfer/index.tsx
View file @
637e6418
...
...
@@ -70,8 +70,9 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => {
return
}
let
param
=
{
id
:
orderId
,
id
:
Number
(
orderId
)
,
paymentInformationId
:
payInfo
.
paymentInformationId
,
payTypeId
:
payInfo
.
paymentChannelsId
,
payOrderUrls
:
JSON
.
stringify
([
payOrderUrl
])
}
setConfirmLoading
(
true
)
...
...
src/pages/lxMall/pay/components/wechat/index.tsx
View file @
637e6418
import
React
from
'react'
import
React
,
{
useEffect
}
from
'react'
import
{
GetOrderOrderPayDetailsResponse
}
from
'@/services/OrderApi'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
wechatIcon
from
'@/assets/imgs/wechat_icon.png'
import
wechatImg
from
'@/assets/imgs/wechat.png'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
PublicApi
}
from
'@/services/api'
import
styles
from
'./index.less'
import
{
useState
}
from
'react'
interface
WechatPayWayPropsType
{
payInfo
:
GetOrderOrderPayDetailsResponse
,
orderInfo
:
any
,
orderId
:
number
,
onChange
:
Function
,
layoutType
?:
LAYOUT_TYPE
,
shopUrlParam
?:
string
}
const
WechatPayWay
:
React
.
FC
<
WechatPayWayPropsType
>
=
(
props
)
=>
{
const
{
payInfo
,
orderId
,
onChange
,
orderInfo
,
layoutType
,
shopUrlParam
}
=
props
const
[
wechatPayUrl
,
setWechatPayUrl
]
=
useState
<
string
>
(
''
)
useEffect
(()
=>
{
pay
()
},
[])
const
pay
=
()
=>
{
let
param
=
{
id
:
Number
(
orderId
),
paymentInformationId
:
payInfo
.
paymentInformationId
,
payTypeId
:
payInfo
.
paymentChannelsId
,
}
//@ts-ignore
PublicApi
.
postOrderPendingOrderPay
(
param
).
then
(
res
=>
{
// setWechatPayUrl(res.data)
}).
catch
(()
=>
{
onChange
(
false
)
})
}
return
(
<>
...
...
@@ -22,7 +53,7 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
</
div
>
<
div
className=
{
styles
.
wechat_payway_needpay
}
>
<
label
>
当前需支付:
</
label
>
<
span
>
20,000
</
span
>
<
span
>
{
priceFormat
(
payInfo
.
payPrice
)
}
</
span
>
<
label
>
RMB
</
label
>
</
div
>
</
div
>
...
...
src/pages/lxMall/pay/index.tsx
View file @
637e6418
...
...
@@ -107,7 +107,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
case
PayWayType
.
credit
:
return
<
CreditPayWay
payInfo=
{
payInfo
}
orderInfo=
{
orderInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
{
...
props
}
/>
case
PayWayType
.
wechat
:
return
<
WechatPayWay
/>
return
<
WechatPayWay
payInfo=
{
payInfo
}
orderInfo=
{
orderInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
{
...
props
}
/>
case
PayWayType
.
bank
:
return
<
BankPayWay
/>
case
PayWayType
.
transfer
:
...
...
src/pages/lxMall/shopAbout/index.less
View file @
637e6418
...
...
@@ -24,7 +24,7 @@
padding-right: 60px;
}
.shop_about_btn {
.shop_about_btn {
padding: 0 15px;
height: 32px;
...
...
@@ -347,4 +347,28 @@
}
}
}
}
.mallComfirm {
position: relative;
:global {
.ant-modal-confirm-btns {
.ant-btn {
&:hover {
color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
.ant-btn-primary {
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
&:hover {
color: #ffffff;
}
}
}
}
}
\ No newline at end of file
src/pages/lxMall/shopAbout/index.tsx
View file @
637e6418
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
Rate
,
Button
,
message
}
from
'antd'
import
{
Rate
,
Button
,
message
,
Modal
}
from
'antd'
import
{
LeftOutlined
,
RightOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
shop_icon
from
'@/assets/imgs/shop_icon.png'
...
...
@@ -44,17 +44,34 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
const
applyFroVip
=
()
=>
{
if
(
shopInfo
)
{
let
param
=
{
memberId
:
shopInfo
.
memberId
,
roleId
:
shopInfo
.
roleId
}
setApplyLoading
(
true
)
PublicApi
.
postMemberAbilityMallSubApply
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
}
setApplyLoading
(
false
)
}).
catch
(()
=>
{
setApplyLoading
(
false
)
Modal
.
confirm
({
centered
:
true
,
className
:
styles
.
mallComfirm
,
content
:
layoutType
===
LAYOUT_TYPE
.
shop
?
`是否申请成为该店铺会员?`
:
'是否申请成为该渠道所属下级渠道会员?'
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
param
=
{
memberId
:
shopInfo
.
memberId
,
roleId
:
shopInfo
.
roleId
}
setApplyLoading
(
true
)
PublicApi
.
postMemberAbilityMallSubApply
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
resolve
()
}
else
{
reject
()
}
setApplyLoading
(
false
)
}).
catch
(()
=>
{
setApplyLoading
(
false
)
reject
()
})
})
}
})
}
}
...
...
@@ -106,7 +123,7 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
{
layoutType
===
LAYOUT_TYPE
.
shop
&&
<
div
className=
{
cx
(
styles
.
shop_about_btn
,
collectState
?
styles
.
active
:
""
)
}
onClick=
{
()
=>
handleCollect
()
}
>
{
collectState
?
'已收藏本店'
:
'收藏本店'
}
</
div
>
}
<
Button
loading=
{
applyLoading
}
className=
{
cx
(
styles
.
shop_about_btn
,
styles
.
primary
)
}
onClick=
{
()
=>
applyFroVip
()
}
>
申请成为本店会员
</
Button
>
<
Button
loading=
{
applyLoading
}
className=
{
cx
(
styles
.
shop_about_btn
,
styles
.
primary
)
}
onClick=
{
()
=>
applyFroVip
()
}
>
{
layoutType
===
LAYOUT_TYPE
.
shop
?
'申请成为本店会员'
:
'申请加盟'
}
</
Button
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
shop_about_info_item
,
styles
.
auto_width
)
}
>
...
...
@@ -137,7 +154,7 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
</
div
>
<
div
className=
{
styles
.
shop_about_split
}
>
<
div
className=
{
styles
.
shop_about_split_line
}
></
div
>
<
div
className=
{
styles
.
shop_about_split_text
}
>
公司
介绍
</
div
>
<
div
className=
{
styles
.
shop_about_split_text
}
>
公司介绍
</
div
>
<
div
className=
{
styles
.
shop_about_split_line
}
></
div
>
</
div
>
<
div
className=
{
styles
.
shop_workshopimg_list
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment