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
c5f878cc
Commit
c5f878cc
authored
Dec 03, 2021
by
danzw1995
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
5ad47bcb
ca309d1c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
46 deletions
+58
-46
index.tsx
src/components/CouponBox/index.tsx
+1
-2
common.ts
src/locales/zh-CN/common.ts
+17
-6
403.tsx
src/pages/403.tsx
+10
-10
404.tsx
src/pages/404.tsx
+13
-12
500.tsx
src/pages/500.tsx
+8
-7
useBusinessEffects.ts
...itted/components/CouponForm/effects/useBusinessEffects.ts
+9
-9
No files found.
src/components/CouponBox/index.tsx
View file @
c5f878cc
...
@@ -10,4 +10,4 @@ const CouponBox:React.FC<CouponBoxProps> = (props) => {
...
@@ -10,4 +10,4 @@ const CouponBox:React.FC<CouponBoxProps> = (props) => {
CouponBox
.
defaultProps
=
{}
CouponBox
.
defaultProps
=
{}
export
default
CouponBox
export
default
CouponBox
\ No newline at end of file
src/locales/zh-CN/common.ts
View file @
c5f878cc
/**
/**
* 公共部分
* 公共部分
*/
*/
export
default
{
export
default
{
/** button */
/** button */
'common.button.save'
:
'保存'
,
'common.button.save'
:
'保存'
,
'common.button.confirm'
:
'确定'
,
'common.button.confirm'
:
'确定'
,
...
@@ -33,10 +33,10 @@
...
@@ -33,10 +33,10 @@
'common.tip.save.success'
:
'保存成功'
,
'common.tip.save.success'
:
'保存成功'
,
/** tabel */
/** tabel */
'common.table.action'
:
"操作"
,
'common.table.action'
:
'操作'
,
/** table */
/** table */
'common.table.status'
:
"状态"
,
'common.table.status'
:
'状态'
,
'common.table.columns.memberName'
:
"商家名称"
,
'common.table.columns.memberName'
:
'商家名称'
,
/** status */
/** status */
'common.status.effective'
:
'有效'
,
'common.status.effective'
:
'有效'
,
...
@@ -85,5 +85,16 @@
...
@@ -85,5 +85,16 @@
'common.form.rule.only.number'
:
'只允许填写数字'
,
'common.form.rule.only.number'
:
'只允许填写数字'
,
'common.form.upload.placeholder'
:
'请上传'
,
'common.form.upload.placeholder'
:
'请上传'
,
'common.error.nindangqianwuquan'
:
'您当前无权访问该页面'
,
}
'common.error.chongxindenglu'
:
'重新登录'
,
'common.error.aiya!yemian'
:
'哎呀!页面未找到'
,
'common.error.gaicuowukeneng'
:
'该错误可能由于如下原因所致'
,
'common.error.yemianyishixiao'
:
'页面已失效'
,
'common.error.yemianyixiugai'
:
'页面已修改或者删除'
,
'common.error.fanhuidaozhuye'
:
'返回到主页'
,
'common.error.aiya!wangluo'
:
'哎呀!网络连接出错了'
,
'common.error.diannaoweilianjie'
:
'电脑未连接到网络'
,
'common.error.fanghuoqianghuosha'
:
'防火墙或杀毒软件阻止'
,
'common.error.shuaxinyemianshi'
:
'刷新页面试试'
,
'common.error.shushangyunfu'
:
'数商云服务'
,
}
src/pages/403.tsx
View file @
c5f878cc
import
React
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
Row
,
Col
}
from
'antd'
;
import
{
Button
,
Row
,
Col
}
from
'antd'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
useIntl
}
from
'umi'
import
UserHeader
from
'../layouts/components/UserHeader'
;
import
styles
from
'./index.less'
import
styles
from
'./index.less'
import
Img
from
'../../mockStatic/illus.png'
import
Img
from
'../../mockStatic/illus.png'
const
NoFoundPage
:
React
.
FC
<
{}
>
=
()
=>
{
const
NoFoundPage
:
React
.
FC
<
{}
>
=
()
=>
{
const
intl
=
useIntl
()
const
handleReturn
=
()
=>
{
const
handleReturn
=
()
=>
{
history
.
replace
(
'/user/login'
)
history
.
replace
(
'/user/login'
)
}
}
return
(
return
(
<
div
className=
{
styles
.
wrapper
}
>
<
div
className=
{
styles
.
wrapper
}
>
<
div
className=
{
styles
.
errorBox
}
>
<
div
className=
{
styles
.
errorBox
}
>
<
Row
>
<
Row
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
div
className=
{
styles
.
desc
}
>
<
div
className=
{
styles
.
desc
}
>
<
h1
>
您当前无权访问该页面
</
h1
>
<
h1
>
{
intl
.
formatMessage
({
id
:
'common.error.nindangqianwuquan'
,
defaultMessage
:
'您当前无权访问该页面'
})
}
</
h1
>
<
Button
<
Button
type=
"primary"
type=
"primary"
size=
"large"
size=
"large"
style=
{
{
marginTop
:
100
}
}
style=
{
{
marginTop
:
100
}
}
onClick=
{
handleReturn
}
onClick=
{
handleReturn
}
>
重新登录
</
Button
>
>
{
intl
.
formatMessage
({
id
:
'common.error.chongxindenglu'
,
defaultMessage
:
'重新登录'
})
}
</
Button
>
</
div
>
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
img
className=
{
styles
.
image
}
src=
{
Img
}
alt=
"数商云服务"
/>
<
img
className=
{
styles
.
image
}
src=
{
Img
}
alt=
{
intl
.
formatMessage
({
id
:
'common.error.shushangyunfu'
,
defaultMessage
:
'数商云服务'
})
}
/>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
div
>
</
div
>
...
...
src/pages/404.tsx
View file @
c5f878cc
import
React
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
Button
,
Row
,
Col
}
from
'antd'
;
import
{
Button
,
Row
,
Col
}
from
'antd'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
UserHeader
from
'../layouts/components/UserHeader'
;
import
UserHeader
from
'../layouts/components/UserHeader'
;
...
@@ -7,32 +7,33 @@ import styles from './index.less'
...
@@ -7,32 +7,33 @@ import styles from './index.less'
import
Img
from
'../../mockStatic/illus.png'
import
Img
from
'../../mockStatic/illus.png'
const
NoFoundPage
:
React
.
FC
<
{}
>
=
()
=>
{
const
NoFoundPage
:
React
.
FC
<
{}
>
=
()
=>
{
const
intl
=
useIntl
()
const
handleReturn
=
()
=>
{
const
handleReturn
=
()
=>
{
history
.
go
(
-
1
)
history
.
go
(
-
1
)
}
}
return
(
return
(
<
div
className=
{
styles
.
wrapper
}
>
<
div
className=
{
styles
.
wrapper
}
>
<
UserHeader
logo=
{
GlobalConfig
.
global
.
siteInfo
.
logo
}
/>
<
UserHeader
logo=
{
GlobalConfig
.
global
.
siteInfo
.
logo
}
/>
<
div
className=
{
styles
.
errorBox
}
>
<
div
className=
{
styles
.
errorBox
}
>
<
Row
>
<
Row
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
div
className=
{
styles
.
desc
}
>
<
div
className=
{
styles
.
desc
}
>
<
h1
>
哎呀!页面未找到
</
h1
>
<
h1
>
{
intl
.
formatMessage
({
id
:
'common.error.aiya!yemian'
,
defaultMessage
:
'哎呀!页面未找到'
})
}
</
h1
>
<
h4
>
该错误可能由于如下原因所致
:
</
h4
>
<
h4
>
{
intl
.
formatMessage
({
id
:
'common.error.gaicuowukeneng'
,
defaultMessage
:
'该错误可能由于如下原因所致'
})
}
:
</
h4
>
<
p
>
·
页面已失效
</
p
>
<
p
>
·
{
intl
.
formatMessage
({
id
:
'common.error.yemianyishixiao'
,
defaultMessage
:
'页面已失效'
})
}
</
p
>
<
p
>
·
页面已修改或者删除
</
p
>
<
p
>
·
{
intl
.
formatMessage
({
id
:
'common.error.yemianyixiugai'
,
defaultMessage
:
'页面已修改或者删除'
})
}
</
p
>
<
Button
<
Button
type=
"primary"
type=
"primary"
size=
"large"
size=
"large"
style=
{
{
marginTop
:
100
}
}
style=
{
{
marginTop
:
100
}
}
onClick=
{
handleReturn
}
onClick=
{
handleReturn
}
>
返回到主页
</
Button
>
>
{
intl
.
formatMessage
({
id
:
'common.error.fanhuidaozhuye'
,
defaultMessage
:
'返回到主页'
})
}
</
Button
>
</
div
>
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
img
className=
{
styles
.
image
}
src=
{
Img
}
alt=
"数商云服务"
/>
<
img
className=
{
styles
.
image
}
src=
{
Img
}
alt=
{
intl
.
formatMessage
({
id
:
'common.error.shushangyunfu'
,
defaultMessage
:
'数商云服务'
})
}
/>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
div
>
</
div
>
...
...
src/pages/500.tsx
View file @
c5f878cc
import
React
from
'react'
;
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
Button
,
Row
,
Col
}
from
'antd'
;
import
{
Button
,
Row
,
Col
}
from
'antd'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
{
GlobalConfig
}
from
'@/global/config'
;
import
UserHeader
from
'../layouts/components/UserHeader'
;
import
UserHeader
from
'../layouts/components/UserHeader'
;
...
@@ -7,6 +7,7 @@ import styles from './index.less'
...
@@ -7,6 +7,7 @@ import styles from './index.less'
import
Img
from
'../../mockStatic/Artwork.png'
import
Img
from
'../../mockStatic/Artwork.png'
const
InternetError
:
React
.
FC
<
{}
>
=
()
=>
{
const
InternetError
:
React
.
FC
<
{}
>
=
()
=>
{
const
intl
=
useIntl
()
const
handleReload
=
()
=>
{
const
handleReload
=
()
=>
{
history
.
go
(
-
1
)
history
.
go
(
-
1
)
...
@@ -19,20 +20,20 @@ const InternetError: React.FC<{}> = () => {
...
@@ -19,20 +20,20 @@ const InternetError: React.FC<{}> = () => {
<
Row
>
<
Row
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
div
className=
{
styles
.
desc
}
>
<
div
className=
{
styles
.
desc
}
>
<
h1
>
哎呀!网络连接出错了
</
h1
>
<
h1
>
{
intl
.
formatMessage
({
id
:
'common.error.aiya!wangluo'
,
defaultMessage
:
'哎呀!网络连接出错了'
})
}
</
h1
>
<
h4
>
该错误可能由于如下原因所致
:
</
h4
>
<
h4
>
{
intl
.
formatMessage
({
id
:
'common.error.gaicuowukeneng'
,
defaultMessage
:
'该错误可能由于如下原因所致'
})
}
:
</
h4
>
<
p
>
·
电脑未连接到网络
</
p
>
<
p
>
·
{
intl
.
formatMessage
({
id
:
'common.error.diannaoweilianjie'
,
defaultMessage
:
'电脑未连接到网络'
})
}
</
p
>
<
p
>
·
防火墙或杀毒软件阻止
</
p
>
<
p
>
·
{
intl
.
formatMessage
({
id
:
'common.error.fanghuoqianghuosha'
,
defaultMessage
:
'防火墙或杀毒软件阻止'
})
}
</
p
>
<
Button
<
Button
type=
"primary"
type=
"primary"
size=
"large"
size=
"large"
style=
{
{
marginTop
:
100
}
}
style=
{
{
marginTop
:
100
}
}
onClick=
{
handleReload
}
onClick=
{
handleReload
}
>
刷新页面试试
</
Button
>
>
{
intl
.
formatMessage
({
id
:
'common.error.shuaxinyemianshi'
,
defaultMessage
:
'刷新页面试试'
})
}
</
Button
>
</
div
>
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
img
className=
{
styles
.
image
}
src=
{
Img
}
alt=
"数商云服务"
/>
<
img
className=
{
styles
.
image
}
src=
{
Img
}
alt=
{
intl
.
formatMessage
({
id
:
'common.error.shushangyunfu'
,
defaultMessage
:
'数商云服务'
})
}
/>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
div
>
</
div
>
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/effects/useBusinessEffects.ts
View file @
c5f878cc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-1
1-30 20:07:59
* @LastEditTime: 2021-1
2-03 15:07:15
* @Description:
* @Description:
*/
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
...
@@ -300,15 +300,15 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
...
@@ -300,15 +300,15 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
const
{
value
}
=
state
;
const
{
value
}
=
state
;
const
releaseTimeEndValue
=
value
?.[
1
];
const
releaseTimeEndValue
=
value
?.[
1
];
const
effectiveTime
=
getFieldValue
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
// 券有效期
const
effectiveTime
=
getFieldValue
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
// 券有效期
const
effectiveTime
StartValue
=
effectiveTime
?.[
0
];
const
effectiveTime
EndValue
=
effectiveTime
?.[
1
];
if
(
if
(
releaseTimeEndValue
releaseTimeEndValue
&&
effectiveTime
Start
Value
&&
effectiveTime
End
Value
&&
moment
(
releaseTimeEndValue
)
>
moment
(
effectiveTimeStart
Value
)
&&
moment
(
releaseTimeEndValue
)
>
=
moment
(
effectiveTimeEnd
Value
)
)
{
)
{
setFieldState
(
'[releaseTimeStart, releaseTimeEnd]'
,
fieldState
=>
{
setFieldState
(
'[releaseTimeStart, releaseTimeEnd]'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'errors'
,
'领(发)券截止时间应该小于券有效期
起始
时间'
);
FormPath
.
setIn
(
fieldState
,
'errors'
,
'领(发)券截止时间应该小于券有效期
截止
时间'
);
});
});
}
else
{
}
else
{
actions
.
clearErrors
(
'[releaseTimeStart, releaseTimeEnd]'
);
actions
.
clearErrors
(
'[releaseTimeStart, releaseTimeEnd]'
);
...
@@ -318,17 +318,17 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
...
@@ -318,17 +318,17 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
// 券有效期始时间
// 券有效期始时间
onFieldValueChange$
(
'[effectiveTimeStart, effectiveTimeEnd]'
).
subscribe
(
state
=>
{
onFieldValueChange$
(
'[effectiveTimeStart, effectiveTimeEnd]'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
;
const
{
value
}
=
state
;
const
effectiveTime
StartValue
=
value
?.[
0
];
const
effectiveTime
EndValue
=
value
?.[
1
];
const
releaseTime
=
getFieldValue
(
'[releaseTimeStart, releaseTimeEnd]'
);
// 券有效期
const
releaseTime
=
getFieldValue
(
'[releaseTimeStart, releaseTimeEnd]'
);
// 券有效期
const
releaseTimeEndValue
=
releaseTime
?.[
1
];
const
releaseTimeEndValue
=
releaseTime
?.[
1
];
if
(
if
(
effectiveTime
Start
Value
effectiveTime
End
Value
&&
releaseTimeEndValue
&&
releaseTimeEndValue
&&
moment
(
effectiveTime
StartValue
)
<
moment
(
releaseTimeEndValue
)
&&
moment
(
effectiveTime
EndValue
)
<=
moment
(
releaseTimeEndValue
)
)
{
)
{
setFieldState
(
'[effectiveTimeStart, effectiveTimeEnd]'
,
fieldState
=>
{
setFieldState
(
'[effectiveTimeStart, effectiveTimeEnd]'
,
fieldState
=>
{
FormPath
.
setIn
(
fieldState
,
'errors'
,
'券有效期
起始时间应该大于等
于领(发)券截止时间'
);
FormPath
.
setIn
(
fieldState
,
'errors'
,
'券有效期
截止时间应该大
于领(发)券截止时间'
);
});
});
}
else
{
}
else
{
actions
.
clearErrors
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
actions
.
clearErrors
(
'[effectiveTimeStart, effectiveTimeEnd]'
);
...
...
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