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
黄庭坚
jinfa-platform
Commits
ca6b037e
Commit
ca6b037e
authored
Nov 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
d4c0540f
074b5fa8
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
415 additions
and
33 deletions
+415
-33
router.ts
config/router.ts
+9
-10
index.js
scripts/services/index.js
+6
-3
index.tsx
src/pages/appDownload/index.tsx
+98
-0
styles.less
src/pages/appDownload/styles.less
+52
-0
index.less
src/pages/appIntroduce/Footer/index.less
+47
-0
index.tsx
src/pages/appIntroduce/Footer/index.tsx
+138
-0
index.tsx
src/pages/appIntroduce/index.tsx
+1
-1
index.tsx
src/pages/home/components/AnyQuestion/index.tsx
+6
-3
index.tsx
src/pages/transaction/components/orderDeleveRecord/index.tsx
+12
-3
index.ts
src/pages/transaction/saleOrder/agentOrder/effects/index.ts
+14
-8
index.tsx
src/pages/transaction/saleOrder/agentOrder/index.tsx
+31
-5
index.ts
src/pages/transaction/saleOrder/agentOrder/schema/index.ts
+1
-0
No files found.
config/router.ts
View file @
ca6b037e
import
memberCenterRoute
from
'./routes'
import
mallRoute
from
'./mallRoutes'
/**
* @description 路由配置页, 更多配置可查看 https://umijs.org/zh-CN/docs/routing#routes
...
...
@@ -56,16 +55,16 @@ const router = [
name
:
'appDownload'
,
key
:
'appDownload'
,
hide
:
true
,
component
:
'@/pages/lxMall/appDownload'
,
},
{
// 移动端资讯详情
path
:
'/information/mobile/detail'
,
name
:
'infomationMobileDetail'
,
key
:
'infomationMobileDetail'
,
hide
:
true
,
component
:
'@/pages/lxMall/information/mobileDetail'
,
component
:
'@/pages/appDownload'
,
},
// {
// // 移动端资讯详情
// path: '/information/mobile/detail',
// name: 'infomationMobileDetail',
// key: 'infomationMobileDetail',
// hide: true,
// component: '@/pages/lxMall/information/mobileDetail',
// },
memberCenterRoute
,
// ...mallRoute,
{
...
...
scripts/services/index.js
View file @
ca6b037e
...
...
@@ -71,9 +71,12 @@ const serviceConfig = {
id
:
SITE_ID
},
method
:
'get'
}
}
},
imConfig
:
{
url
:
'/manage/online/service/find/config'
,
method
:
'get'
},
},
}
// 批量组装接口
...
...
src/pages/appDownload/index.tsx
0 → 100644
View file @
ca6b037e
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Button
}
from
'antd'
import
{
Helmet
}
from
'umi'
import
{
GlobalConfig
}
from
'@/global/config'
import
styles
from
'./styles.less'
import
{
getManageAppDownloadLinkFind
}
from
'@/services/ManageV2Api'
const
AppDownload
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
.
filter
((
item
)
=>
item
.
type
===
1
&&
item
.
environment
===
4
)
const
appInfo
:
any
=
shopInfo
?
shopInfo
[
0
]
:
{}
const
[
appLink
,
setAppLink
]
=
useState
<
{
ios
:
string
,
android
:
string
}
>
()
const
[
maskVisble
,
setMaskVisible
]
=
useState
<
boolean
>
(
false
)
const
getDownLoadUrl
=
()
=>
{
getManageAppDownloadLinkFind
({
status
:
"1"
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
&&
res
.
data
)
{
const
temp
:
any
=
{}
res
.
data
.
forEach
((
item
)
=>
{
switch
(
item
.
title
)
{
case
1
:
temp
.
ios
=
item
.
link
break
case
2
:
temp
.
android
=
item
.
link
break
default
:
break
}
})
setAppLink
(
temp
)
}
})
}
useEffect
(()
=>
{
getDownLoadUrl
()
},
[])
const
judegeIsWeiXin
=
():
boolean
=>
{
const
ua
=
navigator
.
userAgent
.
toLowerCase
();
if
(
String
(
ua
.
match
(
/MicroMessenger/i
))
===
"micromessenger"
)
{
return
true
}
return
false
}
const
handleDownload
=
()
=>
{
// 如果是在微信
if
(
judegeIsWeiXin
())
{
console
.
log
(
"isweixin"
)
setMaskVisible
(
true
)
}
else
{
if
(
navigator
.
userAgent
.
match
(
/android/i
))
{
if
(
appLink
.
android
)
{
window
.
location
.
href
=
appLink
.
android
}
}
if
(
navigator
.
userAgent
.
match
(
/
(
iPhone|iPod|iPad
)
;
?
/i
))
{
if
(
appLink
.
ios
)
{
window
.
location
.
href
=
appLink
.
ios
}
}
}
}
return
(
<>
<
Helmet
>
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<
title
>
{
appInfo
.
name
}
</
title
>
</
Helmet
>
<
div
className=
{
styles
.
downloadContaiern
}
>
<
div
className=
{
styles
.
logoWrap
}
>
<
img
className=
{
styles
.
appLogo
}
src=
{
appInfo
.
logoUrl
}
/>
</
div
>
<
div
className=
{
styles
.
appName
}
>
{
appInfo
.
name
}
</
div
>
<
div
className=
{
styles
.
descrip
}
>
商业数字化有瓴犀
</
div
>
<
Button
className=
{
styles
.
downloadBtn
}
type=
"primary"
onClick=
{
()
=>
handleDownload
()
}
>
点击下载手机客户端
</
Button
>
</
div
>
{
maskVisble
&&
(
<
div
className=
{
styles
.
mask
}
>
<
div
className=
{
styles
.
maskBody
}
>
<
span
>
点击右上角选择浏览器打开
</
span
>
</
div
>
</
div
>
)
}
</>
)
}
export
default
AppDownload
src/pages/appDownload/styles.less
0 → 100644
View file @
ca6b037e
.downloadContaiern {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
.logoWrap {
padding-top: 170px;
padding-bottom: 16px;
.appLogo {
width: 88px;
height: 88px;
border-radius: 8px;
}
}
.appName {
font-size: 18px;
font-size: 500;
}
.descrip {
margin-top: 8px;
font-size: 12px;
}
.downloadBtn {
height: 36px;
margin-top: 36px;
}
}
.mask {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, .6);
z-index: 9;
.maskBody {
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
font-weight: bold;
color: #FFF;
padding-top: 120px;
}
}
src/pages/appIntroduce/Footer/index.less
0 → 100644
View file @
ca6b037e
.footer {
width: 100%;
background-color: #FAFAFA;
// margin-top: 52px;
&_container {
width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-between;
padding: 0 88px 50px 88px;
.footer_nav_item {
padding: 0;
margin: 0;
padding-top: 52px;
&>li {
list-style: none;
font-size: 12px;
color: #909399;
margin-bottom: 10px;
&>a {
color: #909399;
}
&.title {
font-size: 14px;
color: #606266;
margin-bottom: 15px;
}
}
}
}
.copyright {
background-color: #F4F5F7;
height: 50px;
line-height: 50px;
text-align: center;
font-size: 12px;
color: #909399;
}
}
\ No newline at end of file
src/pages/appIntroduce/Footer/index.tsx
0 → 100644
View file @
ca6b037e
import
React
from
'react'
import
'./index.less'
const
Footer
:
React
.
FC
=
()
=>
{
const
baseUrl
=
'https://www.yuque.com/xsnnko/kh076h'
const
footerNavList
=
[
{
title
:
'会员服务'
,
children
:
[
{
path
:
`
${
baseUrl
}
/bzci9x`
,
title
:
'会员注册'
},
{
path
:
`
${
baseUrl
}
/pz44gw`
,
title
:
'会员登录'
},
{
path
:
`
${
baseUrl
}
/ia27ef`
,
title
:
'会员服务'
},
{
path
:
`
${
baseUrl
}
/xupg3d`
,
title
:
'忘记密码'
}
]
},
{
title
:
'采购&供应'
,
children
:
[
{
path
:
`
${
baseUrl
}
/il6eqw`
,
title
:
'发布供应'
},
{
path
:
`
${
baseUrl
}
/aeob5u`
,
title
:
'发布需求'
},
{
path
:
`
${
baseUrl
}
/eh909i`
,
title
:
'购买现货'
},
{
path
:
`
${
baseUrl
}
/yks6bd`
,
title
:
'询价报价'
}
]
},
{
title
:
'账户&安全'
,
children
:
[
{
path
:
`
${
baseUrl
}
/gxx84r`
,
title
:
'账户查询'
},
{
path
:
`
${
baseUrl
}
/bufen8`
,
title
:
'账户管理'
},
{
path
:
`
${
baseUrl
}
/qsmohg`
,
title
:
'安全中心'
},
{
path
:
`
${
baseUrl
}
/arsh01`
,
title
:
'密码服务'
}
]
},
{
title
:
'信用评价'
,
children
:
[
{
path
:
`
${
baseUrl
}
/klpeox`
,
title
:
'发布评价'
},
{
path
:
`
${
baseUrl
}
/tkp309`
,
title
:
'查看评价'
},
{
path
:
`
${
baseUrl
}
/svdz9o`
,
title
:
'投诉举报'
},
{
path
:
`
${
baseUrl
}
/ngkh0k`
,
title
:
'评价规则'
}
]
},
{
title
:
'关于我们'
,
children
:
[
{
path
:
`
${
baseUrl
}
/eoegc4`
,
title
:
'平台介绍'
},
{
path
:
`
${
baseUrl
}
/yttpx7`
,
title
:
'联系我们'
},
{
path
:
`
${
baseUrl
}
/cyd7rb`
,
title
:
'服务条款'
},
{
path
:
`
${
baseUrl
}
/uht4qm`
,
title
:
'免责声明'
}
]
}
]
return
(
<
div
className=
"footer"
>
<
div
className=
"footer_container"
>
{
footerNavList
.
map
((
item
,
index
)
=>
(
<
ul
className=
"footer_nav_item"
key=
{
`footer_nav_item_${index}`
}
>
<
li
className=
"title"
>
{
item
.
title
}
</
li
>
{
item
.
children
.
map
((
item
,
index
)
=>
(
<
li
key=
{
`footer_nav_item_${index}`
}
><
a
href=
{
item
.
path
}
target=
"_blank"
rel=
"noreferrer"
>
{
item
.
title
}
</
a
></
li
>
))
}
</
ul
>
))
}
</
div
>
<
div
className=
"copyright"
>
Copy Right©广州市数商云网络科技有限公司 粤ICP备13044797号-5
</
div
>
</
div
>
)
}
export
default
Footer
src/pages/appIntroduce/index.tsx
View file @
ca6b037e
import
React
from
'react'
import
{
Helmet
}
from
'umi'
import
Footer
from
'
@/pages/lxMall/components
/Footer'
import
Footer
from
'
.
/Footer'
import
styles
from
'./index.less'
const
AppIntroduct
=
()
=>
{
...
...
src/pages/home/components/AnyQuestion/index.tsx
View file @
ca6b037e
...
...
@@ -3,6 +3,8 @@ import styles from './index.less';
import
ask
from
'@/assets/imgs/ask.png'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
configUsr
,
initQiyuImServer
,
toChatRoom
}
from
'@/utils/im'
;
import
{
GlobalConfig
}
from
'@/global/config'
import
{
PublicApi
}
from
'@/services/api'
;
interface
Iprops
{}
...
...
@@ -11,12 +13,13 @@ const AnyQuestion: React.FC<Iprops> = () => {
const
authInfo
:
any
=
getAuth
()
||
{}
// @todo 根据pass平台接口配置 决定是跳转lx-IM还是网易七鱼IM 先接七鱼
const
_self
=
false
const
_self
=
GlobalConfig
?.
global
?.
imConfig
?.
type
===
1
//自有
useEffect
(()
=>
{
if
(
!
_self
)
{
// 判断是否接入过
// 判断是否接入过自有
const
s
=
GlobalConfig
?.
global
?.
imConfig
?.
paramConfigList
[
0
][
'value'
]
const
_window
:
any
=
window
!
_window
?.
ysf
&&
initQiyuImServer
(
'f5e5143fcbf14e0ad6126681dd359f0c'
)
!
_window
?.
ysf
&&
initQiyuImServer
(
s
)
}
},
[])
...
...
src/pages/transaction/components/orderDeleveRecord/index.tsx
View file @
ca6b037e
...
...
@@ -8,14 +8,14 @@ import { OrderKindType } from '@/constants/order'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
import
ModalForm
from
'@/components/ModalForm'
import
{
createFormActions
,
createAsyncFormActions
}
from
'@formily/antd'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getAuth
}
from
'@/utils/auth'
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
OverflowText
from
'@/components/OverflowText'
export
interface
OrderDeleveRecordProps
{}
const
receiveActions
=
create
Async
FormActions
()
const
receiveActions
=
createFormActions
()
// 订单发货记录
const
OrderDeleveRecord
:
React
.
FC
<
OrderDeleveRecordProps
>
=
(
props
)
=>
{
...
...
@@ -28,6 +28,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const
isReturn
=
pathname
.
indexOf
(
'readyConfirmReturnOrder'
)
!==
-
1
// 用于储存已经修改过的订单id
const
dataRef
=
useRef
<
any
>
([])
const
receiveParams
=
useRef
<
any
>
({})
const
receiveRef
=
useRef
<
any
>
({})
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -429,7 +430,10 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
// } else {
// setDisabled(false)
// }
receiveParams
.
current
=
{
'orderId'
:
data
.
orderId
,
'batchNo'
:
record
.
batchNo
,
}
receiveActions
.
setFieldValue
(
'orderId'
,
data
.
orderId
)
receiveActions
.
setFieldValue
(
'batchNo'
,
record
.
batchNo
)
receiveRef
.
current
.
setVisible
(
true
)
...
...
@@ -442,6 +446,11 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
if
(
values
.
receiveBill
&&
values
.
receiveBill
[
0
])
{
values
.
receiveBill
=
values
.
receiveBill
[
0
][
'data'
]
}
if
(
receiveParams
.
current
?.
orderId
)
{
values
.
orderId
=
receiveParams
.
current
.
orderId
values
.
batchNo
=
receiveParams
.
current
.
batchNo
}
console
.
log
(
values
,
'values'
)
const
result
=
await
PublicApi
.
postOrderBuyerValidateReceiveConfirm
(
values
)
if
(
result
.
code
===
1000
)
{
receiveActions
.
reset
()
...
...
src/pages/transaction/saleOrder/agentOrder/effects/index.ts
View file @
ca6b037e
...
...
@@ -133,18 +133,24 @@ export const useOrderDeliverTimeEffect = async (ctx: ISchemaFormActions | ISchem
ctx
.
setFieldState
(
'timeLine'
,
state
=>
{
if
(
data
.
paramList
?.
length
)
{
state
.
visible
=
true
state
.
props
.
enum
=
data
.
paramList
.
map
(
item
=>
({
label
:
`
${
item
.
startTime
}
-
${
item
.
endTime
}
`
,
value
:
`
${
item
.
startTime
}
-
${
item
.
endTime
}
`
}))
console
.
log
(
moment
().
format
(
'HH:mm'
))
state
.
props
.
enum
=
data
.
paramList
.
map
(
item
=>
({
label
:
`
${
item
.
startTime
}
-
${
item
.
endTime
}
`
,
value
:
`
${
item
.
startTime
}
-
${
item
.
endTime
}
`
,
// disabled: moment().format('HH:mm') > item.startTime,
}))
}
else
{
state
.
visible
=
false
}
})
// 默认选择第一个时间段
setTimeout
(()
=>
{
if
(
data
.
paramList
?.
length
)
{
const
timeObj
=
data
.
paramList
[
0
]
ctx
.
setFieldValue
(
'timeLine'
,
`
${
timeObj
.
startTime
}
-
${
timeObj
.
endTime
}
`
)
}
},
600
)
// // 默认选择第一个时间段
// setTimeout(() => {
// if(data.paramList?.length) {
// // const timeObj = data.paramList.filter(item => item.startTime > moment().format('HH:mm'))[0]
// const timeObj = data.paramList[0]
// ctx.setFieldValue('timeLine', `${timeObj.startTime}-${timeObj.endTime}`)
// }
// }, 600)
}
}
...
...
src/pages/transaction/saleOrder/agentOrder/index.tsx
View file @
ca6b037e
import
React
,
{
useRef
,
useState
,
useEffect
,
useMemo
}
from
'react'
import
{
history
}
from
'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
ReutrnEle
from
'@/components/ReturnEle'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
Button
,
Card
,
Row
,
Col
,
message
,
Spin
}
from
'antd'
import
{
Button
,
Row
,
Col
,
message
,
Spin
}
from
'antd'
import
{
createFormActions
,
registerVirtualBox
,
useFormSpy
}
from
'@formily/antd'
import
{
SaveOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
...
...
@@ -20,8 +18,6 @@ import { useProductTable } from './model/useProductTable'
import
styled
from
'styled-components'
import
{
useUpdate
}
from
'@umijs/hooks'
import
{
PublicApi
}
from
'@/services/api'
import
{
changeRouterTitleByStatus
}
from
'../../_public/order/utils'
import
{
ReadyAddOrderDetailContext
}
from
'../context'
import
{
help
}
from
'../../common'
import
styles
from
'./index.less'
import
{
getAuth
}
from
'@/utils/auth'
;
...
...
@@ -33,6 +29,7 @@ import { FormDetailContext } from '@/formSchema/context'
import
FormDetailHeader
from
'@/components/FormDetailHeader'
import
FormDetailWrapper
from
'@/components/FormDetailWrapper'
import
{
useFormDetail
}
from
'@/formSchema/effects/useFormDetail'
import
moment
from
'moment'
export
interface
AgentOrderDetailProps
{}
...
...
@@ -457,6 +454,35 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
})
})
// 控制时间段禁用
$
(
'onFieldValueChange'
,
'deliverDate'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
const
currentDay
=
moment
().
format
(
'YYYY-MM-DD'
)
const
timeLineState
=
ctx
.
getFieldState
(
'timeLine'
)
const
enumLists
=
timeLineState
.
props
.
enum
// 先清空已选择的时间段
ctx
.
setFieldValue
(
'timeLine'
,
null
)
if
(
enumLists
.
length
)
{
if
(
value
>
currentDay
)
{
ctx
.
setFieldState
(
'timeLine'
,
tstate
=>
{
tstate
.
props
.
enum
=
enumLists
.
map
(
item
=>
({
label
:
item
.
label
,
value
:
item
.
value
,
disabled
:
false
}))
})
}
else
{
ctx
.
setFieldState
(
'timeLine'
,
tstate
=>
{
tstate
.
props
.
enum
=
enumLists
.
map
(
item
=>
({
label
:
item
.
label
,
value
:
item
.
value
,
disabled
:
moment
().
format
(
'HH:mm'
)
>
item
.
value
,
}))
})
}
}
})
// 注入表单完成进度
formContext
.
useAttachmentChangeForContext
(
ctx
)
...
...
src/pages/transaction/saleOrder/agentOrder/schema/index.ts
View file @
ca6b037e
...
...
@@ -241,6 +241,7 @@ const submitInfo: ISchema = {
type
:
'radio'
,
enum
:
[],
visible
:
false
,
required
:
true
,
"x-component-props"
:
{
disabled
:
false
,
optionType
:
'button'
,
...
...
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