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
shenshaokai
jinfa-platform
Commits
01309165
Commit
01309165
authored
Mar 11, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 创建采购门户-归属地址更改成业务所在地
parent
44da6fd1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
9 deletions
+36
-9
purchase.ts
src/locales/en-US/purchase.ts
+1
-1
purchase.ts
src/locales/ko-KR/purchase.ts
+1
-1
purchase.ts
src/locales/zh-CN/purchase.ts
+1
-1
LoginWrap.tsx
src/pages/user/components/LoginWrap.tsx
+2
-2
index.tsx
src/pages/user/index.tsx
+6
-1
register.tsx
src/pages/user/register.tsx
+14
-3
index.tsx
src/utils/index.tsx
+11
-0
No files found.
src/locales/en-US/purchase.ts
View file @
01309165
...
@@ -301,7 +301,7 @@ export default {
...
@@ -301,7 +301,7 @@ export default {
'detail.purchase.null'
:
'None'
,
'detail.purchase.null'
:
'None'
,
'detail.purchase.thanks'
:
'Thank you letter'
,
'detail.purchase.thanks'
:
'Thank you letter'
,
'detail.purchase.respect'
:
'Respected'
,
'detail.purchase.respect'
:
'Respected'
,
'detail.purchase.areaBOList'
:
'
Attribution to city
'
,
'detail.purchase.areaBOList'
:
'
Business Location
'
,
'detail.purchase.pageName'
:
'Page Name'
,
'detail.purchase.pageName'
:
'Page Name'
,
'detail.purchase.doorIndex'
:
'Purchase portal home page'
,
'detail.purchase.doorIndex'
:
'Purchase portal home page'
,
'detail.purchase.aboutUs'
:
'About Us'
,
'detail.purchase.aboutUs'
:
'About Us'
,
...
...
src/locales/ko-KR/purchase.ts
View file @
01309165
...
@@ -301,7 +301,7 @@ export default {
...
@@ -301,7 +301,7 @@ export default {
'detail.purchase.null'
:
'없음'
,
'detail.purchase.null'
:
'없음'
,
'detail.purchase.thanks'
:
'감사 편지'
,
'detail.purchase.thanks'
:
'감사 편지'
,
'detail.purchase.respect'
:
'존경했어'
,
'detail.purchase.respect'
:
'존경했어'
,
'detail.purchase.areaBOList'
:
'
귀속지
'
,
'detail.purchase.areaBOList'
:
'
사업장 위치
'
,
'detail.purchase.pageName'
:
'페이지 이름'
,
'detail.purchase.pageName'
:
'페이지 이름'
,
'detail.purchase.doorIndex'
:
'구매 포털 첫 페이지'
,
'detail.purchase.doorIndex'
:
'구매 포털 첫 페이지'
,
'detail.purchase.aboutUs'
:
'우리'
,
'detail.purchase.aboutUs'
:
'우리'
,
...
...
src/locales/zh-CN/purchase.ts
View file @
01309165
...
@@ -301,7 +301,7 @@ export default {
...
@@ -301,7 +301,7 @@ export default {
'detail.purchase.null'
:
'无'
,
'detail.purchase.null'
:
'无'
,
'detail.purchase.thanks'
:
'感谢函'
,
'detail.purchase.thanks'
:
'感谢函'
,
'detail.purchase.respect'
:
'尊敬的'
,
'detail.purchase.respect'
:
'尊敬的'
,
'detail.purchase.areaBOList'
:
'
归属地市
'
,
'detail.purchase.areaBOList'
:
'
业务所在地
'
,
'detail.purchase.pageName'
:
'页面名称'
,
'detail.purchase.pageName'
:
'页面名称'
,
'detail.purchase.doorIndex'
:
'采购门户首页'
,
'detail.purchase.doorIndex'
:
'采购门户首页'
,
'detail.purchase.aboutUs'
:
'关于我们'
,
'detail.purchase.aboutUs'
:
'关于我们'
,
...
...
src/pages/user/components/LoginWrap.tsx
View file @
01309165
...
@@ -8,7 +8,7 @@ import {
...
@@ -8,7 +8,7 @@ import {
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
postMemberLogin
}
from
'@/services/MemberV2Api'
;
import
{
postMemberLogin
}
from
'@/services/MemberV2Api'
;
import
{
setAuth
,
setRouters
}
from
'@/utils/auth'
;
import
{
setAuth
,
setRouters
}
from
'@/utils/auth'
;
import
{
encryptedByAES
}
from
'@/utils/cryptoAes'
;
import
{
encryptedByAES
,
Base64
}
from
'@/utils/cryptoAes'
;
import
{
setUserCookie
}
from
'@/utils/siteCookie'
;
import
{
setUserCookie
}
from
'@/utils/siteCookie'
;
import
{
omit
}
from
'@/utils'
;
import
{
omit
}
from
'@/utils'
;
const
intl
=
getIntl
();
const
intl
=
getIntl
();
...
@@ -31,7 +31,7 @@ const LoginWrap: React.FC = () => {
...
@@ -31,7 +31,7 @@ const LoginWrap: React.FC = () => {
setAuth
(
data
)
setAuth
(
data
)
// 此处需使用href跳转, 否则无法触发app.ts中的路由初始化校验
// 此处需使用href跳转, 否则无法触发app.ts中的路由初始化校验
if
(
redirect
)
{
if
(
redirect
)
{
window
.
location
.
replace
(
decodeURIComponent
(
atob
(
redirect
)))
window
.
location
.
replace
(
decodeURIComponent
(
Base64
.
decode
(
redirect
)))
}
else
{
}
else
{
window
.
location
.
replace
(
'/memberCenter/home'
)
window
.
location
.
replace
(
'/memberCenter/home'
)
}
}
...
...
src/pages/user/index.tsx
View file @
01309165
...
@@ -55,6 +55,11 @@ const User: React.FC = () => {
...
@@ -55,6 +55,11 @@ const User: React.FC = () => {
})
})
}
}
const
getRegisterUrl
=
()
=>
{
const
{
redirect
,
source
}
=
history
.
location
.
query
return
`/user/register
${
redirect
?
`?redirect=
${
redirect
}
`
:
''
}${
source
?
`
${
redirect
?
'&'
:
'?'
}
source=
${
source
}
`
:
''
}
`
}
return
(
return
(
<
Fragment
>
<
Fragment
>
<
Helmet
>
<
Helmet
>
...
@@ -88,7 +93,7 @@ const User: React.FC = () => {
...
@@ -88,7 +93,7 @@ const User: React.FC = () => {
<
LoginWrap
/>
<
LoginWrap
/>
<
Row
justify=
'end'
style=
{
{
marginTop
:
16
}
}
>
<
Row
justify=
'end'
style=
{
{
marginTop
:
16
}
}
>
<
Space
size=
{
32
}
>
<
Space
size=
{
32
}
>
<
TextLink
><
Link
to=
'/user/register'
style=
{
{
color
:
'#909399'
}
}
>
{
intl
.
formatMessage
({
id
:
'user.mianfeizhuce'
})
}
</
Link
></
TextLink
>
<
TextLink
><
Link
to=
{
getRegisterUrl
()
}
style=
{
{
color
:
'#909399'
}
}
>
{
intl
.
formatMessage
({
id
:
'user.mianfeizhuce'
})
}
</
Link
></
TextLink
>
<
TextLink
><
a
onClick=
{
forgetPassword
}
style=
{
{
color
:
'#909399'
}
}
>
{
intl
.
formatMessage
({
id
:
'user.wangjimima'
})
}
</
a
></
TextLink
>
<
TextLink
><
a
onClick=
{
forgetPassword
}
style=
{
{
color
:
'#909399'
}
}
>
{
intl
.
formatMessage
({
id
:
'user.wangjimima'
})
}
</
a
></
TextLink
>
</
Space
>
</
Space
>
</
Row
>
</
Row
>
...
...
src/pages/user/register.tsx
View file @
01309165
...
@@ -11,12 +11,12 @@ import im_success from '../../../mockStatic/im_success.png'
...
@@ -11,12 +11,12 @@ import im_success from '../../../mockStatic/im_success.png'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
useCountDown
from
'@/utils/hooks'
;
import
useCountDown
from
'@/utils/hooks'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
omit
,
transFormSchema
,
filterUndef
}
from
'@/utils'
;
import
{
omit
,
transFormSchema
,
filterUndef
,
getUrlMemberId
}
from
'@/utils'
;
import
{
getManageContentNoticeFindAllByColumnType
}
from
'@/services/ManageV2Api'
;
import
{
getManageContentNoticeFindAllByColumnType
}
from
'@/services/ManageV2Api'
;
import
{
getMemberMenuRegisterDetail
,
postMemberRegister
}
from
'@/services/MemberV2Api'
import
{
getMemberMenuRegisterDetail
,
postMemberRegister
}
from
'@/services/MemberV2Api'
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
schemas
from
'./schema'
;
import
schemas
from
'./schema'
;
import
{
encryptedByAES
}
from
'@/utils/cryptoAes'
;
import
{
Base64
,
encryptedByAES
}
from
'@/utils/cryptoAes'
;
import
PasswordInput
from
'./components/PasswordInput'
import
PasswordInput
from
'./components/PasswordInput'
import
godEvent
from
'@/utils/event'
import
godEvent
from
'@/utils/event'
const
intl
=
getIntl
();
const
intl
=
getIntl
();
...
@@ -79,10 +79,11 @@ let timeChange: any; // 定时器
...
@@ -79,10 +79,11 @@ let timeChange: any; // 定时器
const
actions
=
createFormActions
()
const
actions
=
createFormActions
()
const
UserRegistry
=
()
=>
{
const
UserRegistry
=
()
=>
{
const
[
current
,
setCurrent
]
=
useState
(
0
)
const
[
current
,
setCurrent
]
=
useState
(
1
)
const
[
subStep
,
setSubStep
]
=
useState
(
false
)
const
[
subStep
,
setSubStep
]
=
useState
(
false
)
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
)
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
)
const
[
agreementList
,
setAgreementList
]
=
useState
([])
const
[
agreementList
,
setAgreementList
]
=
useState
([])
const
{
source
,
redirect
}
=
history
.
location
.
query
const
stepList
=
[
const
stepList
=
[
{
title
:
intl
.
formatMessage
({
id
:
'user.tianxiexinxi'
}),
key
:
'message'
,
name
:
'message'
},
{
title
:
intl
.
formatMessage
({
id
:
'user.tianxiexinxi'
}),
key
:
'message'
,
name
:
'message'
},
...
@@ -92,6 +93,16 @@ const UserRegistry = () => {
...
@@ -92,6 +93,16 @@ const UserRegistry = () => {
]
]
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
redirect
)
{
const
redirectUrl
=
decodeURIComponent
(
Base64
.
decode
(
redirect
))
// 判断来源是自营商城时从链接获取自营商城的memberId
if
(
source
&&
source
===
'own'
)
{
const
memberId
=
getUrlMemberId
(
redirectUrl
)
console
.
log
(
memberId
,
source
,
redirectUrl
,
'memberId'
)
}
}
console
.
log
(
source
,
'source'
)
fetchAgreement
()
fetchAgreement
()
},
[])
},
[])
...
...
src/utils/index.tsx
View file @
01309165
...
@@ -703,6 +703,17 @@ export function arrayMoveImmutable<T>(array: T[], fromIndex: number, toIndex: nu
...
@@ -703,6 +703,17 @@ export function arrayMoveImmutable<T>(array: T[], fromIndex: number, toIndex: nu
return
array
;
return
array
;
}
}
export
const
getUrlMemberId
=
(
url
:
string
)
=>
{
const
tempParam
=
url
.
match
(
/
\/\d{1,}
/
)
if
(
tempParam
)
{
const
param
=
tempParam
[
0
]
as
unknown
as
string
if
(
param
)
{
return
Number
(
param
.
replace
(
'/'
,
''
))
}
}
return
undefined
}
export
default
{
export
default
{
isArray
,
isArray
,
isObject
,
isObject
,
...
...
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