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
c74dd1b1
Commit
c74dd1b1
authored
Dec 17, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
59a9b94f
41ffbd00
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
67 additions
and
91 deletions
+67
-91
demo.js
demo.js
+10
-10
AvatarDropdown.tsx
src/layouts/components/AvatarDropdown.tsx
+6
-5
HeaderDropdown.tsx
src/layouts/components/HeaderDropdown.tsx
+2
-31
RightContent.tsx
src/layouts/components/RightContent.tsx
+4
-3
Roles.tsx
src/layouts/components/Roles.tsx
+1
-1
SelectLang.tsx
src/layouts/components/SelectLang.tsx
+2
-31
UserHeader.tsx
src/layouts/components/UserHeader.tsx
+5
-3
common.ts
src/locales/en-US/common.ts
+11
-3
components.ts
src/locales/ko-KR/afterService/components.ts
+1
-0
common.ts
src/locales/ko-KR/common.ts
+9
-0
components.ts
src/locales/zh-CN/afterService/components.ts
+1
-0
common.ts
src/locales/zh-CN/common.ts
+9
-0
index.tsx
...afterService/repairManage/components/DetailInfo/index.tsx
+1
-1
index.tsx
...Service/returnApplication/components/DetailInfo/index.tsx
+1
-1
viewProducts.tsx
src/pages/commodity/products/viewProducts.tsx
+1
-1
index.tsx
src/pages/member/memberMaintain/freeze/index.tsx
+0
-0
otherExplain.tsx
...ity/inquiryOffer/waitAddOffer/components/otherExplain.tsx
+1
-1
ModalTableOrder.tsx
...icsBillSubmit/addLogistics/components/ModalTableOrder.tsx
+2
-0
No files found.
demo.js
View file @
c74dd1b1
...
...
@@ -9,21 +9,21 @@ const mockData = {
key
:
'zh-CN'
,
icon
:
'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png'
},
//
{
//
name: 'English-EN',
//
key: 'en-US',
//
icon: 'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png'
//
},
{
name
:
'English-EN'
,
key
:
'en-US'
,
icon
:
'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png'
},
// {
// name: '日本語-JP',
// key: 'jp',
// icon: 'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png'
// },
//
{
//
name: '한국어-KO',
// key: 'ko
',
//
icon: 'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png'
//
}
{
name
:
'한국어-KO'
,
key
:
'ko-KR
'
,
icon
:
'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png'
}
]
}
}
...
...
src/layouts/components/AvatarDropdown.tsx
View file @
c74dd1b1
import
{
LogoutOutlined
,
LockOutlined
}
from
'@ant-design/icons'
;
import
{
Avatar
,
Menu
,
Spin
}
from
'antd'
;
import
React
from
'react'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
history
,
Link
,
useIntl
}
from
'umi'
;
import
PersonDropdown
from
'./PersonDropdown'
import
styles
from
'../styles/RightContent.less'
;
import
{
removeAuth
,
removeRouters
,
getAuth
}
from
'@/utils/auth'
;
...
...
@@ -9,8 +9,9 @@ import { inject, observer } from 'mobx-react'
import
Icon
from
'@ant-design/icons'
;
import
{
ReactComponent
as
DefaultAvatar
}
from
'@/assets/imgs/default_avatar.svg'
;
const
AvatarDropdown
=
(
props
)
=>
{
const
AvatarDropdown
=
(
props
)
=>
{
const
intl
=
useIntl
();
const
logout
=
()
=>
{
removeAuth
()
removeRouters
()
...
...
@@ -18,7 +19,7 @@ const AvatarDropdown = (props) => {
}
const
currentUser
=
{
name
:
getAuth
()?.
company
||
'未知用户'
,
name
:
getAuth
()?.
company
||
intl
.
formatMessage
({
id
:
'common.weizhiyonghu'
})
,
avatar
:
props
.
UserStore
.
avatar
||
''
,
}
...
...
@@ -34,11 +35,11 @@ const AvatarDropdown = (props) => {
</Menu.Item>
<Menu.Divider /> */
}
<
Menu
.
Item
key=
"changePwd"
>
<
Link
to=
"/memberCenter/systemSetting/accountSetting"
><
LockOutlined
/>
修改密码
</
Link
>
<
Link
to=
"/memberCenter/systemSetting/accountSetting"
><
LockOutlined
/>
{
intl
.
formatMessage
({
id
:
'common.xiugaimima'
})
}
</
Link
>
</
Menu
.
Item
>
<
Menu
.
Item
onClick=
{
logout
}
key=
"logout"
>
<
LogoutOutlined
/>
退出登录
{
intl
.
formatMessage
({
id
:
'common.tuichudenglu'
})
}
</
Menu
.
Item
>
</
Menu
>
)
...
...
src/layouts/components/HeaderDropdown.tsx
View file @
c74dd1b1
...
...
@@ -70,23 +70,6 @@ interface countryItem {
const
HeaderDropdown
:
React
.
FC
=
()
=>
{
// 此处暂时无接口, 对接接口后需用枚举类型做补充
const
[
currentLangKey
,
setCurrentLangKey
]
=
useState
<
string
>
(
'cn'
)
const
[
locales
]
=
useState
<
countryItem
[]
>
([
{
"name"
:
"简体中文-ZH"
,
"key"
:
"zh-CN"
,
"icon"
:
ChinaImg
},
{
"name"
:
"英文-US"
,
"key"
:
"en-US"
,
"icon"
:
us
},
{
"name"
:
"韩文-KR"
,
"key"
:
"ko-KR"
,
"icon"
:
korenImg
},
])
useEffect
(()
=>
{
console
.
log
(
getLocale
(),
"locale"
)
setCurrentLangKey
(
getLocale
())
...
...
@@ -99,14 +82,7 @@ const HeaderDropdown: React.FC = () => {
const
menuHeaderDropdown
=
(
<
Menu
selectedKeys=
{
[]
}
>
{
// GlobalConfig.publicSelect.siteList.map(v => <Menu.Item key=
{
v
.
key
}
onClick
=
{()
=>
setLang
(
v
)}
>
// <Space>
//
{
currentLangKey
===
v
.
key
?
<
img
src=
{
gou
}
style=
{
{
width
:
20
,
height
:
20
}
}
/>
:
<
div
style=
{
{
width
:
20
,
height
:
20
}
}
></
div
>}
// <img src=
{
v
.
icon
}
style
=
{{
width
:
24
,
height
:
17
}}
/
>
// <span>
{
v
.
name
}<
/
span
>
//
</
Space
>
// </Menu.Item>)
locales
.
map
(
v
=>
<
Menu
.
Item
key=
{
v
.
key
}
onClick=
{
()
=>
setLang
(
v
)
}
>
GlobalConfig
.
publicSelect
.
siteList
.
map
(
v
=>
<
Menu
.
Item
key=
{
v
.
key
}
onClick=
{
()
=>
setLang
(
v
)
}
>
<
Space
>
{
currentLangKey
===
v
.
key
?
<
img
src=
{
gou
}
style=
{
{
width
:
20
,
height
:
20
}
}
/>
:
<
div
style=
{
{
width
:
20
,
height
:
20
}
}
></
div
>
}
<
img
src=
{
v
.
icon
}
style=
{
{
width
:
24
,
height
:
17
}
}
/>
...
...
@@ -125,12 +101,7 @@ const HeaderDropdown: React.FC = () => {
const
renderCurrentLang
=
()
=>
{
let
currentLang
:
countryItem
// GlobalConfig.publicSelect.siteList.map(item => {
// if (item.key === currentLangKey) {
// currentLang = item
// }
// })
locales
.
map
(
item
=>
{
GlobalConfig
.
publicSelect
.
siteList
.
map
(
item
=>
{
if
(
item
.
key
===
currentLangKey
)
{
currentLang
=
item
}
...
...
src/layouts/components/RightContent.tsx
View file @
c74dd1b1
...
...
@@ -4,7 +4,7 @@ import React, { useCallback, useRef, useLayoutEffect, useState, useEffect, useMe
import
Avatar
from
'./AvatarDropdown'
;
import
SelectLang
from
'./SelectLang'
;
import
Location
from
'./Location'
;
import
{
history
,
Link
}
from
'umi'
import
{
history
,
Link
,
useIntl
}
from
'umi'
import
Roles
from
'./Roles'
;
import
{
inject
,
observer
}
from
'mobx-react'
import
styles
from
'../styles/RightContent.less'
;
...
...
@@ -40,6 +40,7 @@ type WsMessage = {
}
const
GlobalHeaderRight
:
React
.
FC
<
{
SiteStore
?:
any
,
isHome
:
boolean
}
>
=
(
props
)
=>
{
const
intl
=
useIntl
();
const
{
SiteStore
:
{
currentLayoutInfo
},
isHome
}
=
props
;
const
[
message
,
setMessage
]
=
useState
<
number
>
(
0
);
const
className
=
styles
.
right
;
...
...
@@ -119,11 +120,11 @@ const GlobalHeaderRight: React.FC<{ SiteStore?: any, isHome: boolean }> = (props
</
Link
>
</
div
>
<
div
className=
{
styles
.
rightContent
}
>
<
span
style=
{
{
color
:
'rgba(0, 0, 0, 0.85)'
,
cursor
:
"pointer"
}
}
onClick=
{
handleBackMall
}
>
返回商城
</
span
>
<
span
style=
{
{
color
:
'rgba(0, 0, 0, 0.85)'
,
cursor
:
"pointer"
}
}
onClick=
{
handleBackMall
}
>
{
intl
.
formatMessage
({
id
:
'common.fanhuishangcheng'
})
}
</
span
>
<
Roles
/>
{
/* <Location /> */
}
<
SelectLang
/>
<
Tooltip
title=
"消息"
>
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'common.xiaoxi'
})
}
>
<
Link
to=
"/memberCenter/systemSetting/message"
className=
{
styles
.
action
}
...
...
src/layouts/components/Roles.tsx
View file @
c74dd1b1
...
...
@@ -33,7 +33,7 @@ const Roles: React.FC = () => {
}
const
msg
=
message
.
loading
({
content
:
'正在切换角色...'
,
content
:
intl
.
formatMessage
({
id
:
'common.zhengzaiqiehuanjuese'
})
,
duration
:
0
,
});
...
...
src/layouts/components/SelectLang.tsx
View file @
c74dd1b1
...
...
@@ -19,23 +19,6 @@ interface countryItem {
const
SelectLang
:
React
.
FC
=
()
=>
{
// 此处暂时无接口, 对接接口后需用枚举类型做补充
const
[
currentLangKey
,
setCurrentLangKey
]
=
useState
<
string
>
(
'cn'
)
const
[
locales
]
=
useState
<
countryItem
[]
>
([
{
"name"
:
"简体中文-ZH"
,
"key"
:
"zh-CN"
,
"icon"
:
ChinaImg
},
{
"name"
:
"英文-US"
,
"key"
:
"en-US"
,
"icon"
:
us
},
{
"name"
:
"韩文-KR"
,
"key"
:
"ko-KR"
,
"icon"
:
korenImg
},
])
useEffect
(()
=>
{
console
.
log
(
getLocale
(),
"locale"
)
setCurrentLangKey
(
getLocale
())
...
...
@@ -48,14 +31,7 @@ const SelectLang: React.FC = () => {
const
menuHeaderDropdown
=
(
<
Menu
selectedKeys=
{
[]
}
>
{
// GlobalConfig.publicSelect.siteList.map(v => <Menu.Item key=
{
v
.
key
}
onClick
=
{()
=>
setLang
(
v
)}
>
// <Space>
//
{
currentLangKey
===
v
.
key
?
<
img
src=
{
gou
}
style=
{
{
width
:
20
,
height
:
20
}
}
/>
:
<
div
style=
{
{
width
:
20
,
height
:
20
}
}
></
div
>}
// <img src=
{
v
.
icon
}
style
=
{{
width
:
24
,
height
:
17
}}
/
>
// <span>
{
v
.
name
}<
/
span
>
//
</
Space
>
// </Menu.Item>)
locales
.
map
(
v
=>
<
Menu
.
Item
key=
{
v
.
key
}
onClick=
{
()
=>
setLang
(
v
)
}
>
GlobalConfig
.
publicSelect
.
siteList
.
map
(
v
=>
<
Menu
.
Item
key=
{
v
.
key
}
onClick=
{
()
=>
setLang
(
v
)
}
>
<
Space
>
{
currentLangKey
===
v
.
key
?
<
img
src=
{
gou
}
style=
{
{
width
:
20
,
height
:
20
}
}
/>
:
<
div
style=
{
{
width
:
20
,
height
:
20
}
}
></
div
>
}
<
img
src=
{
v
.
icon
}
style=
{
{
width
:
24
,
height
:
17
}
}
/>
...
...
@@ -74,12 +50,7 @@ const SelectLang: React.FC = () => {
const
renderCurrentLang
=
()
=>
{
let
currentLang
:
countryItem
// GlobalConfig.publicSelect.siteList.map(item => {
// if (item.key === currentLangKey) {
// currentLang = item
// }
// })
locales
.
map
(
item
=>
{
GlobalConfig
.
publicSelect
.
siteList
.
map
(
item
=>
{
if
(
item
.
key
===
currentLangKey
)
{
currentLang
=
item
}
...
...
src/layouts/components/UserHeader.tsx
View file @
c74dd1b1
...
...
@@ -6,6 +6,7 @@ import { isString } from '@/utils/type';
import
{
getCookie
}
from
'@/utils/cookie'
import
HeaderDropdown
from
'./HeaderDropdown'
;
import
{
useIntl
}
from
'umi'
;
export
interface
UserHeaderProps
{
logo
?:
React
.
ReactNode
,
...
...
@@ -16,6 +17,7 @@ export interface UserHeaderProps {
* 登录、注册等用户头部
*/
const
UserHeader
:
React
.
FC
<
UserHeaderProps
>
=
(
props
)
=>
{
const
intl
=
useIntl
();
const
{
pathname
}
=
props
?.
location
||
{}
const
[
title
,
setTitle
]
=
useState
<
string
>
()
...
...
@@ -26,14 +28,14 @@ const UserHeader: React.FC<UserHeaderProps> = (props) => {
const
getRouteName
=
()
=>
{
switch
(
pathname
)
{
case
'/user/login'
:
setTitle
(
"欢迎登录"
)
setTitle
(
intl
.
formatMessage
({
id
:
'common.huanyingdenglu'
})
)
break
case
'/user/register'
:
setTitle
(
"欢迎注册"
)
setTitle
(
intl
.
formatMessage
({
id
:
'common.huanyingzhuce'
})
)
break
case
'/user/getBack'
:
case
'/user/forget'
:
setTitle
(
"找回密码"
)
setTitle
(
intl
.
formatMessage
({
id
:
'common.zhaohuimima'
})
)
break
}
}
...
...
src/locales/en-US/common.ts
View file @
c74dd1b1
...
...
@@ -100,5 +100,14 @@
/** other */
'common.money'
:
'¥'
,
'common.money.yuan'
:
'元'
,
}
\ No newline at end of file
'common.money.yuan'
:
'yuan'
,
'common.weizhiyonghu'
:
'Unknown user'
,
'common.xiugaimima'
:
'Change the password'
,
'common.tuichudenglu'
:
'Log out'
,
'common.xiaoxi'
:
'The message'
,
'common.fanhuishangcheng'
:
'Return to the mall'
,
'common.zhengzaiqiehuanjuese'
:
'Switching roles...'
,
'common.zhaohuimima'
:
'Retrieve password'
,
'common.huanyingzhuce'
:
'Welcome to register'
,
'common.huanyingdenglu'
:
'Welcome to login'
,
}
src/locales/ko-KR/afterService/components.ts
View file @
c74dd1b1
...
...
@@ -179,6 +179,7 @@ export default {
'afterService.components.ReturnDetailInfo.title'
:
'환불 내역'
,
'afterService.components.ReturnDetailInfo.refund.tip'
:
'프롬프트'
,
'afterService.components.ReturnDetailInfo.refund.okText'
:
'확인'
,
'afterService.components.ReturnDetailInfo.refund.content'
:
'환불 확인되나요?'
,
'afterService.components.ReturnDetailInfo.refund.cancelText'
:
'취소'
,
'afterService.components.ReturnDetailInfo.payCount'
:
'지불 횟수'
,
'afterService.components.ReturnDetailInfo.outerStatus'
:
'컨디션'
,
...
...
src/locales/ko-KR/common.ts
View file @
c74dd1b1
...
...
@@ -101,4 +101,13 @@ export default {
/** 其他 */
'common.money'
:
'¥'
,
'common.money.yuan'
:
'원.'
,
'common.weizhiyonghu'
:
'알 수 없는 사용자'
,
'common.xiugaimima'
:
'비밀번호 변경'
,
'common.tuichudenglu'
:
'로그아웃'
,
'common.xiaoxi'
:
'소식'
,
'common.fanhuishangcheng'
:
'귀환 쇼핑몰'
,
'common.zhengzaiqiehuanjuese'
:
'역할 전환 중...'
,
'common.zhaohuimima'
:
'비밀번호 찾기'
,
'common.huanyingzhuce'
:
'등록을 환영합니다'
,
'common.huanyingdenglu'
:
'로그인을 환영합니다'
,
}
src/locales/zh-CN/afterService/components.ts
View file @
c74dd1b1
...
...
@@ -179,6 +179,7 @@ export default {
'afterService.components.ReturnDetailInfo.title'
:
'退款明细'
,
'afterService.components.ReturnDetailInfo.refund.tip'
:
'提示'
,
'afterService.components.ReturnDetailInfo.refund.okText'
:
'确认'
,
'afterService.components.ReturnDetailInfo.refund.content'
:
'是否确认退款?'
,
'afterService.components.ReturnDetailInfo.refund.cancelText'
:
'取消'
,
'afterService.components.ReturnDetailInfo.payCount'
:
'支付次数'
,
'afterService.components.ReturnDetailInfo.outerStatus'
:
'状态'
,
...
...
src/locales/zh-CN/common.ts
View file @
c74dd1b1
...
...
@@ -101,4 +101,13 @@ export default {
/** 其他 */
'common.money'
:
'¥'
,
'common.money.yuan'
:
'元'
,
'common.weizhiyonghu'
:
'未知用户'
,
'common.xiugaimima'
:
'修改密码'
,
'common.tuichudenglu'
:
'退出登录'
,
'common.xiaoxi'
:
'消息'
,
'common.fanhuishangcheng'
:
'返回商城'
,
'common.zhengzaiqiehuanjuese'
:
'正在切换角色...'
,
'common.zhaohuimima'
:
'找回密码'
,
'common.huanyingzhuce'
:
'欢迎注册'
,
'common.huanyingdenglu'
:
'欢迎登录'
,
}
src/pages/afterService/repairManage/components/DetailInfo/index.tsx
View file @
c74dd1b1
...
...
@@ -173,7 +173,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
faultFileList
,
supplierName
,
...
rest
,
fileList
:
faultFileList
.
map
(
item
=>
normalizeFiledata
(
item
.
filePath
))
,
fileList
:
faultFileList
?
faultFileList
.
map
(
item
=>
normalizeFiledata
(
item
.
filePath
))
:
[]
,
repairAddress
:
isJSONStr
(
repairAddress
)
||
null
,
});
}
...
...
src/pages/afterService/returnApplication/components/DetailInfo/index.tsx
View file @
c74dd1b1
...
...
@@ -286,7 +286,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
setDetailInfo
({
faultFileList
,
fileList
:
faultFileList
.
map
(
item
=>
normalizeFiledata
(
item
.
filePath
)),
fileList
:
faultFileList
?
.
map
(
item
=>
normalizeFiledata
(
item
.
filePath
)),
...
rest
,
});
}
...
...
src/pages/commodity/products/viewProducts.tsx
View file @
c74dd1b1
...
...
@@ -349,7 +349,7 @@ const viewProducts: React.FC<{}> = () => {
productDetail
?.
logistics
?.
carriageType
&&
<
Row
>
<
Col
span=
{
4
}
>
<
p
>
{
intl
.
formatMessage
({
id
:
'commodity.products.viewProducts.card.3.carriageType'
})
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'commodity.products.viewProducts.card.3.carriageType
Label
'
})
}
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
{
carriageTypeLabel
[
productDetail
?.
logistics
?.
carriageType
]
}
</
p
>
...
...
src/pages/member/memberMaintain/freeze/index.tsx
View file @
c74dd1b1
This diff is collapsed.
Click to expand it.
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/otherExplain.tsx
View file @
c74dd1b1
...
...
@@ -7,7 +7,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getMemberManageUsersPage
}
from
'@/services/MemberV2Api'
;
import
{
getIntl
}
from
'umi'
;
import
{
getManageCountryAreaGetTelCode
}
from
'@/services/ManageV2Api
/id13091
'
;
import
{
getManageCountryAreaGetTelCode
}
from
'@/services/ManageV2Api'
;
interface
OtherExplainLayoutProps
{
/** 获取联系人 */
...
...
src/pages/transaction/logisticsAbility/logisticsBillSubmit/addLogistics/components/ModalTableOrder.tsx
View file @
c74dd1b1
...
...
@@ -197,7 +197,9 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
getOrderCommonLogisticsPage
({
...
parmas
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
.
id
=
item
.
orderId
item
.
applyNo
=
item
.
orderNo
item
.
memberName
=
item
.
buyerMemberName
item
.
applyAbstract
=
item
.
orderThe
item
.
applyTime
=
item
.
createTime
})
...
...
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