Commit 01309165 authored by GuanHua's avatar GuanHua

fix: 创建采购门户-归属地址更改成业务所在地

parent 44da6fd1
......@@ -301,7 +301,7 @@ export default {
'detail.purchase.null': 'None',
'detail.purchase.thanks': 'Thank you letter',
'detail.purchase.respect': 'Respected',
'detail.purchase.areaBOList': 'Attribution to city',
'detail.purchase.areaBOList': 'Business Location',
'detail.purchase.pageName': 'Page Name',
'detail.purchase.doorIndex': 'Purchase portal home page',
'detail.purchase.aboutUs': 'About Us',
......
......@@ -301,7 +301,7 @@ export default {
'detail.purchase.null': '없음',
'detail.purchase.thanks': '감사 편지',
'detail.purchase.respect': '존경했어',
'detail.purchase.areaBOList': '귀속지',
'detail.purchase.areaBOList': '사업장 위치',
'detail.purchase.pageName': '페이지 이름',
'detail.purchase.doorIndex': '구매 포털 첫 페이지',
'detail.purchase.aboutUs': '우리',
......
......@@ -301,7 +301,7 @@ export default {
'detail.purchase.null': '无',
'detail.purchase.thanks': '感谢函',
'detail.purchase.respect': '尊敬的',
'detail.purchase.areaBOList': '归属地市',
'detail.purchase.areaBOList': '业务所在地',
'detail.purchase.pageName': '页面名称',
'detail.purchase.doorIndex': '采购门户首页',
'detail.purchase.aboutUs': '关于我们',
......
......@@ -8,7 +8,7 @@ import {
} from '@ant-design/icons';
import { postMemberLogin } from '@/services/MemberV2Api';
import { setAuth, setRouters } from '@/utils/auth';
import { encryptedByAES } from '@/utils/cryptoAes';
import { encryptedByAES, Base64 } from '@/utils/cryptoAes';
import { setUserCookie } from '@/utils/siteCookie';
import { omit } from '@/utils';
const intl = getIntl();
......@@ -31,7 +31,7 @@ const LoginWrap: React.FC = () => {
setAuth(data)
// 此处需使用href跳转, 否则无法触发app.ts中的路由初始化校验
if (redirect) {
window.location.replace(decodeURIComponent(atob(redirect)))
window.location.replace(decodeURIComponent(Base64.decode(redirect)))
} else {
window.location.replace('/memberCenter/home')
}
......
......@@ -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 (
<Fragment>
<Helmet>
......@@ -88,7 +93,7 @@ const User: React.FC = () => {
<LoginWrap />
<Row justify='end' style={{ marginTop: 16 }}>
<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>
</Space>
</Row>
......
......@@ -11,12 +11,12 @@ import im_success from '../../../mockStatic/im_success.png'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import useCountDown from '@/utils/hooks';
import { GlobalConfig } from '@/global/config';
import { omit, transFormSchema, filterUndef } from '@/utils';
import { omit, transFormSchema, filterUndef, getUrlMemberId } from '@/utils';
import { getManageContentNoticeFindAllByColumnType } from '@/services/ManageV2Api';
import { getMemberMenuRegisterDetail, postMemberRegister } from '@/services/MemberV2Api'
import NiceForm from '@/components/NiceForm';
import schemas from './schema';
import { encryptedByAES } from '@/utils/cryptoAes';
import { Base64, encryptedByAES } from '@/utils/cryptoAes';
import PasswordInput from './components/PasswordInput'
import godEvent from '@/utils/event'
const intl = getIntl();
......@@ -79,10 +79,11 @@ let timeChange: any; // 定时器
const actions = createFormActions()
const UserRegistry = () => {
const [current, setCurrent] = useState(0)
const [current, setCurrent] = useState(1)
const [subStep, setSubStep] = useState(false)
const [submitLoading, setSubmitLoading] = useState(false)
const [agreementList, setAgreementList] = useState([])
const { source, redirect } = history.location.query
const stepList = [
{ title: intl.formatMessage({id: 'user.tianxiexinxi'}), key: 'message', name: 'message' },
......@@ -92,6 +93,16 @@ const UserRegistry = () => {
]
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()
}, [])
......
......@@ -703,6 +703,17 @@ export function arrayMoveImmutable<T>(array: T[], fromIndex: number, toIndex: nu
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 {
isArray,
isObject,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment