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
XieZhiXiong
jinfa-platform
Commits
1d39ff57
Commit
1d39ff57
authored
Dec 21, 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
6f97f07e
f59ae35c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
45 additions
and
24 deletions
+45
-24
Phone.tsx
src/components/NiceForm/components/Phone.tsx
+3
-3
FormilyRangeTime.tsx
src/components/RangeTime/FormilyRangeTime.tsx
+1
-1
index.tsx
src/components/RangeTime/index.tsx
+3
-3
HeaderDropdown.tsx
src/layouts/components/HeaderDropdown.tsx
+9
-1
en-US.ts
src/locales/en-US.ts
+2
-0
common.ts
src/locales/en-US/afterService/common.ts
+1
-0
responseCode.ts
src/locales/en-US/responseCode.ts
+0
-0
ko-KR.ts
src/locales/ko-KR.ts
+2
-0
common.ts
src/locales/ko-KR/afterService/common.ts
+1
-0
responseCode.ts
src/locales/ko-KR/responseCode.ts
+0
-0
zh-CN.ts
src/locales/zh-CN.ts
+2
-0
common.ts
src/locales/zh-CN/afterService/common.ts
+1
-0
responseCode.ts
src/locales/zh-CN/responseCode.ts
+0
-0
schema.ts
...ages/afterService/returnManage/returnValetApply/schema.ts
+1
-0
index.tsx
...lity/components/FormilyFieldItem/CategoriesList/index.tsx
+1
-1
index.tsx
...marketingAbility/components/MemberCheckboxGroup/index.tsx
+3
-2
index.tsx
...nUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
+3
-2
index.tsx
...ntCouponUnsubmitted/components/CascaderFormItem/index.tsx
+1
-2
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+2
-2
index.tsx
...merchantCouponUnsubmitted/components/CouponForm/index.tsx
+2
-3
schema.tsx
...erchantCouponUnsubmitted/components/CouponForm/schema.tsx
+1
-2
auth.ts
src/utils/auth.ts
+2
-0
request.ts
src/utils/request.ts
+4
-2
No files found.
src/components/NiceForm/components/Phone.tsx
View file @
1d39ff57
...
...
@@ -5,8 +5,7 @@ import godEvent from '@/utils/event'
import
{
RiskCheck
}
from
'god'
;
import
{
decryptedByAES
,
encryptedByAES
}
from
'@/utils/cryptoAes'
;
import
{
getMemberCaptcha
,
getMemberRegisterPhoneCheck
,
postMemberRegisterPswSms
,
postMemberRegisterSms
}
from
'@/services/MemberV2Api'
;
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
import
{
useIntl
}
from
'umi'
;
// 滑块尺寸
const
FLAG_SIZE
=
60
const
IMG_WIDTH
=
352
...
...
@@ -18,6 +17,7 @@ const prefixCode = '+86'
const
Phone
=
(
props
)
=>
{
const
{
value
,
form
,
schema
}
=
props
const
intl
=
useIntl
();
const
{
text
,
isActive
,
start
}
=
useCountDown
({
maxTime
:
60
,
minTime
:
0
,
...
...
@@ -212,7 +212,7 @@ const Phone = (props) => {
yPoint=
{
remoteImg
.
y
}
shadowSize=
{
FLAG_SIZE
}
differ=
{
10
}
tipText=
{
intl
.
formatMessage
({
id
:
'component.riskCheckTips'
,
defaultMessage
:
''
})
}
tipText=
{
intl
.
formatMessage
({
id
:
'component
s
.riskCheckTips'
,
defaultMessage
:
''
})
}
onSuccess=
{
handleCheckSuccess
}
/>
</
Modal
>
...
...
src/components/RangeTime/FormilyRangeTime.tsx
View file @
1d39ff57
...
...
@@ -39,7 +39,7 @@ const FormilyRangeTime: React.FC<Iprops> = (props: Iprops) => {
};
return
(
<
div
>
<
div
style=
{
{
width
:
'100%'
}
}
>
<
RangeTime
disabled=
{
!
editable
}
rangeTime=
{
momentValue
}
onChange=
{
onChange
}
{
...
componentProps
}
/>
{
hasError
&&
(
...
...
src/components/RangeTime/index.tsx
View file @
1d39ff57
...
...
@@ -95,9 +95,9 @@ const RangeTime: React.FC<Iprops> = (props: Iprops) => {
}
if
(
partial
===
'end'
)
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
startTime
.
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
?
startTime
.
get
(
'minute'
)
:
0
),
disabledSeconds
:
()
=>
range
(
0
,
60
).
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
&&
current
.
isSame
(
startTime
,
'minute'
)
?
startTime
.
get
(
'second'
)
+
1
:
0
),
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
startTime
?
.
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
?
startTime
?
.
get
(
'minute'
)
:
0
),
disabledSeconds
:
()
=>
range
(
0
,
60
).
splice
(
0
,
current
&&
current
.
isSame
(
startTime
,
'hour'
)
&&
current
.
isSame
(
startTime
,
'minute'
)
?
startTime
?
.
get
(
'second'
)
+
1
:
0
),
};
}
return
{};
...
...
src/layouts/components/HeaderDropdown.tsx
View file @
1d39ff57
...
...
@@ -60,6 +60,9 @@ import korenImg from '../../../mockStatic/koren.png'
import
us
from
'../../../mockStatic/us.png'
import
'../styles/SelectLang.less'
import
{
getCookie
,
removeCookie
}
from
'@/utils/cookie'
import
{
getTopDomainByHost
}
from
'@/utils'
import
{
TOP_DOMAIN_NO_PORT
}
from
'@/constants'
interface
countryItem
{
name
:
string
,
...
...
@@ -69,9 +72,14 @@ interface countryItem {
const
HeaderDropdown
:
React
.
FC
=
()
=>
{
// 此处暂时无接口, 对接接口后需用枚举类型做补充
const
[
currentLangKey
,
setCurrentLangKey
]
=
useState
<
string
>
(
'cn'
)
const
[
currentLangKey
,
setCurrentLangKey
]
=
useState
<
string
>
(
'cn'
);
const
locales
=
getCookie
(
'locales'
);
useEffect
(()
=>
{
console
.
log
(
getLocale
(),
"locale"
)
if
(
locales
)
{
setLocale
(
locales
as
any
,
true
);
removeCookie
(
'locales'
,
{
path
:
'/'
,
domain
:
getTopDomainByHost
(
TOP_DOMAIN_NO_PORT
,
true
)
})
}
setCurrentLangKey
(
getLocale
())
},
[])
...
...
src/locales/en-US.ts
View file @
1d39ff57
...
...
@@ -34,6 +34,7 @@ import balance from './en-US/balance'
import
processRuleSetting
from
'./en-US/system/processRuleSetting'
import
afterService
from
'./en-US/afterService'
;
import
marketing
from
'./en-US/marketing'
import
responseCode
from
'./en-US/responseCode'
export
default
{
'global.siteName'
:
'瓴犀'
,
...
...
@@ -73,4 +74,5 @@ export default {
...
afterService
,
...
balance
,
...
marketing
,
...
responseCode
,
}
src/locales/en-US/afterService/common.ts
View file @
1d39ff57
...
...
@@ -211,6 +211,7 @@ export default {
'afterService.apply.pickupAddress-replace.required'
:
'Please select the replacement pickup address'
,
'afterService.apply.purchaser.nothing'
:
'Please select purchasing member first'
,
'afterService.apply.purchaser'
:
'Purchasing member'
,
'afterService.apply.purchaser.placeholder'
:
'Please enter the name of the purchasing member'
,
'afterService.apply.repairCount'
:
'Repair Quantity'
,
'afterService.apply.repairCount.required'
:
'Please fill in the repair quantity'
,
'afterService.apply.repairCount.legal'
:
'Please fill in a positive number and keep up to 3 decimal places'
,
...
...
src/locales/en-US/responseCode.ts
0 → 100644
View file @
1d39ff57
This diff is collapsed.
Click to expand it.
src/locales/ko-KR.ts
View file @
1d39ff57
...
...
@@ -34,6 +34,7 @@ import balance from './ko-KR/balance'
import
processRuleSetting
from
'./ko-KR/system/processRuleSetting'
import
afterService
from
'./ko-KR/afterService'
;
import
marketing
from
'./ko-KR/marketing'
import
responseCode
from
'./ko-KR/responseCode'
export
default
{
'global.siteName'
:
'瓴犀'
,
...
...
@@ -73,4 +74,5 @@ export default {
...
afterService
,
...
balance
,
...
marketing
,
...
responseCode
,
}
src/locales/ko-KR/afterService/common.ts
View file @
1d39ff57
...
...
@@ -211,6 +211,7 @@ export default {
'afterService.apply.pickupAddress-replace.required'
:
'교환 인수 주소 선택'
,
'afterService.apply.purchaser.nothing'
:
'먼저 구매 회원을 선택하세요'
,
'afterService.apply.purchaser'
:
'구매 회원'
,
'afterService.apply.purchaser.placeholder'
:
'구매 회원 명칭을 입력하세요'
,
'afterService.apply.repairCount'
:
'수리 수량'
,
'afterService.apply.repairCount.required'
:
'수리 수량을 기입해 주십시오'
,
'afterService.apply.repairCount.legal'
:
'정수를 기입하시고, 최대 3자리의 소수를 보존하십시오'
,
...
...
src/locales/ko-KR/responseCode.ts
0 → 100644
View file @
1d39ff57
This diff is collapsed.
Click to expand it.
src/locales/zh-CN.ts
View file @
1d39ff57
...
...
@@ -34,6 +34,7 @@ import balance from './zh-CN/balance'
import
processRuleSetting
from
'./zh-CN/system/processRuleSetting'
import
afterService
from
'./zh-CN/afterService'
;
import
marketing
from
'./zh-CN/marketing'
import
responseCode
from
'./zh-CN/responseCode'
export
default
{
'global.siteName'
:
'瓴犀'
,
...
...
@@ -73,4 +74,5 @@ export default {
...
afterService
,
...
balance
,
...
marketing
,
...
responseCode
,
}
src/locales/zh-CN/afterService/common.ts
View file @
1d39ff57
...
...
@@ -211,6 +211,7 @@ export default {
'afterService.apply.pickupAddress-replace.required'
:
'请选择换货自提地址'
,
'afterService.apply.purchaser.nothing'
:
'请先选择采购会员'
,
'afterService.apply.purchaser'
:
'采购会员'
,
'afterService.apply.purchaser.placeholder'
:
'请输入采购会员名称'
,
'afterService.apply.repairCount'
:
'维修数量'
,
'afterService.apply.repairCount.required'
:
'请填写维修数量'
,
'afterService.apply.repairCount.legal'
:
'请填写正数,最多保留3位小数'
,
...
...
src/locales/zh-CN/responseCode.ts
0 → 100644
View file @
1d39ff57
This diff is collapsed.
Click to expand it.
src/pages/afterService/returnManage/returnValetApply/schema.ts
View file @
1d39ff57
...
...
@@ -75,6 +75,7 @@ export const addSchema = (orderType: number): ISchema => {
title
:
intl
.
formatMessage
({
id
:
'afterService.apply.purchaser'
},
{
default
:
'采购会员'
}),
enum
:
[],
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'afterService.apply.purchaser.placeholder'
},
{
default
:
'请输入采购会员名称'
}),
showSearch
:
true
,
defaultActiveFirstOption
:
false
,
showArrow
:
false
,
...
...
src/pages/transaction/marketingAbility/components/FormilyFieldItem/CategoriesList/index.tsx
View file @
1d39ff57
import
{
useIntl
}
from
'umi'
;
/*
* @Author: XieZhiXiong
* @Date: 2021-06-25 14:43:51
...
...
@@ -7,6 +6,7 @@ import { useIntl } from 'umi';
* @Description: formily 品牌列表
*/
import
React
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Row
,
Col
,
Button
}
from
'antd'
;
import
{
PlusOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
ArrayList
}
from
'@formily/react-shared-components'
;
...
...
src/pages/transaction/marketingAbility/components/MemberCheckboxGroup/index.tsx
View file @
1d39ff57
import
{
useIntl
}
from
'umi'
;
/*
* @Author: XieZhiXiong
* @Date: 2021-06-25 11:34:36
...
...
@@ -7,6 +6,7 @@ import { useIntl } from 'umi';
* @Description: 会员方块复选框
*/
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Checkbox
,
Row
,
Col
,
Button
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
{
checkMore
}
from
'@/utils'
;
...
...
@@ -96,7 +96,6 @@ export type MemberCheckboxGroupProps = {
};
const
MemberCheckboxGroup
:
React
.
FC
<
MemberCheckboxGroupProps
>
=
(
props
)
=>
{
const
intl
=
useIntl
();
const
{
options
,
value
:
outerValue
,
...
...
@@ -116,6 +115,8 @@ const MemberCheckboxGroup: React.FC<MemberCheckboxGroupProps> = (props) => {
const
sizeRef
=
useRef
<
number
>
(
PAGE_SIZE
);
const
hasMoreRef
=
useRef
<
boolean
>
(
true
);
const
intl
=
useIntl
();
const
getOptions
:
()
=>
Promise
<
ResponseType
>
=
()
=>
{
if
(
fetchOptions
)
{
if
(
!
hasMoreRef
.
current
)
{
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/ApplicableGoodsFormItem/index.tsx
View file @
1d39ff57
...
...
@@ -6,14 +6,13 @@
* @Description: 适用商品 Form Item
*/
import
React
,
{
useState
}
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Button
,
message
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
PolymericTable
,
{
EditableColumns
}
from
'@/components/PolymericTable'
;
import
{
normalizeUnitPrice
}
from
'../../../utils'
;
import
GoodsDrawer
,
{
ProductItemType
}
from
'../GoodsDrawer'
;
import
styles
from
'./index.less'
;
import
{
getIntl
}
from
'umi'
const
intl
=
getIntl
();
const
ApplicableGoodsFormItem
=
(
props
)
=>
{
const
{
...
...
@@ -25,6 +24,8 @@ const ApplicableGoodsFormItem = (props) => {
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
const
intl
=
useIntl
();
const
handleDelete
=
(
id
:
number
)
=>
{
const
newData
=
[...
value
];
const
index
=
value
.
findIndex
((
item
)
=>
item
.
id
===
id
);
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CascaderFormItem/index.tsx
View file @
1d39ff57
...
...
@@ -7,7 +7,6 @@
*/
import
React
from
'react'
;
import
{
Cascader
}
from
'antd'
;
import
{
CascaderValueType
}
from
'antd/lib/cascader'
;
const
CascaderFormItem
=
(
props
)
=>
{
const
{
...
...
@@ -16,7 +15,7 @@ const CascaderFormItem = (props) => {
editable
,
}
=
props
;
const
handleChange
=
(
next
:
CascaderValueType
)
=>
{
const
handleChange
=
(
next
:
React
.
Key
[]
)
=>
{
mutators
.
change
(
next
);
};
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
1d39ff57
...
...
@@ -6,6 +6,7 @@
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
import
{
getIntl
}
from
'umi'
;
import
moment
from
'moment'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
...
...
@@ -23,7 +24,6 @@ import {
SUITABLE_TYPE_NEW_MEMBER
,
SUITABLE_TYPE_OLD_MEMBER
,
}
from
'@/constants/marketing'
;
import
{
useIntl
}
from
'umi'
const
{
onFieldInputChange$
,
...
...
@@ -32,7 +32,7 @@ const {
export
const
useBusinessEffects
=
(
context
,
actions
:
IFormActions
)
=>
{
const
{
getFieldValue
,
setFieldState
,
setFieldValue
,
getFieldState
}
=
actions
;
const
intl
=
use
Intl
();
const
intl
=
get
Intl
();
const
linkage
=
useLinkageUtils
();
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/index.tsx
View file @
1d39ff57
...
...
@@ -10,7 +10,7 @@ import { Spin, Button, message } from 'antd';
import
{
DeleteOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
Radio
,
DatePicker
,
ArrayTable
}
from
'@formily/antd-components'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
{
history
,
Prompt
,
useIntl
}
from
'umi'
;
import
moment
from
'moment'
;
import
{
MERCHANT_COUPON_TYPE_UNIVERSAL
,
...
...
@@ -19,6 +19,7 @@ import {
MERCHANT_COUPON_TYPE_PRODUCT
,
MERCHANT_COUPON_TYPE_VOUCHER
,
}
from
'@/constants/marketing'
;
import
{
getMarketingCouponWaitAuditGet
,
postMarketingCouponWaitAuditAdd
,
postMarketingCouponWaitAuditUpdate
}
from
'@/services/MarketingV2Api'
;
import
AnchorPage
from
'@/components/AnchorPage'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
FormilyRangeTime
from
'@/components/RangeTime/FormilyRangeTime'
;
...
...
@@ -32,8 +33,6 @@ import MemberCheckboxGroup from '../../../../components/FormilyFieldItem/MemberC
import
ApplicableList
from
'../../../../components/FormilyFieldItem/ApplicableList'
;
import
CategoriesList
from
'../../../../components/FormilyFieldItem/CategoriesList'
;
import
styles
from
'./index.less'
;
import
{
getMarketingCouponWaitAuditGet
,
postMarketingCouponWaitAuditAdd
,
postMarketingCouponWaitAuditUpdate
}
from
'@/services/MarketingV2Api'
;
import
{
useIntl
}
from
'umi'
const
formActions
=
createFormActions
();
const
{
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/schema.tsx
View file @
1d39ff57
import
{
useIntl
}
from
'umi'
;
/*
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:05:57
...
...
@@ -10,7 +9,7 @@ import { ISchema } from '@formily/antd';
import
moment
from
'moment'
;
import
themeConfig
from
'@/../config/lingxi.theme.config'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
getIntl
}
from
'umi'
import
{
getIntl
}
from
'umi'
const
intl
=
getIntl
();
...
...
src/utils/auth.ts
View file @
1d39ff57
...
...
@@ -16,6 +16,7 @@ export interface AuthInfo extends GetMemberLoginRegetResponse {
creditPoint
:
number
,
memberRoleType
:
number
,
memberRoleId
:
number
,
locales
?:
string
}
const
AUTH_KEY
=
'AUTH'
...
...
@@ -32,6 +33,7 @@ export const setAuth = (info: AuthInfo) => {
memberRoleType
:
info
.
memberRoleType
,
memberRoleId
:
info
.
memberRoleId
,
memberType
:
info
.
memberType
,
locales
:
info
.
locales
,
}
setCookie
(
AUTH_KEY
,
JSON
.
stringify
(
auth
),
{
domain
:
TOP_DOMAIN_NO_PORT
})
setCookie
(
AUTH_ROLES_KEY
,
JSON
.
stringify
(
info
.
roles
),
{
domain
:
TOP_DOMAIN_NO_PORT
})
...
...
src/utils/request.ts
View file @
1d39ff57
import
{
extend
,
ResponseError
,
OnionOptions
,
RequestOptionsInit
,
ResponseInterceptor
,
OnionMiddleware
,
Context
,
RequestMethod
}
from
'umi-request'
;
import
responseCode
from
'@/constants/responseCode'
import
{
IRequestError
,
IRequestSuccess
}
from
'..'
;
import
{
history
}
from
'umi'
import
{
getIntl
}
from
'umi'
import
{
message
}
from
'antd'
import
{
getCookieAuth
,
removeAuth
}
from
'./auth'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
...
...
@@ -25,6 +25,8 @@ export interface IApiRequest extends RequestOptionsInit {
type
httpStatus
=
{
[
key
:
number
]:
string
}
const
intl
=
getIntl
()
const
errorMessage
:
httpStatus
=
{
400
:
"发出的请求有错误,服务器没有进行新建或修改数据的操作。"
,
401
:
"用户没有权限(令牌、用户名、密码错误)。"
,
...
...
@@ -142,7 +144,7 @@ class ApiRequest {
if
(
url
!=
'/member/loginInfo'
)
{
// 这是展示接口错误信息,任何 ctlType 都可以,不然一些 get 请求出错了
// 错误信息无法展示给用户
res
.
message
&&
message
.
info
(
res
.
message
)
res
.
message
&&
message
.
info
(
intl
.
formatMessage
({
id
:
res
.
code
,
defaultMessage
:
res
.
message
})
)
}
}
...
...
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