Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
435ab5f1
Commit
435ab5f1
authored
Jun 24, 2024
by
武广
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-20240520-jishi' into 'master'
小咩POP店上线 See merge request
!110
parents
02e874cc
01765fe4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
12 deletions
+65
-12
index.jsx
src/components/CustomTree/index.jsx
+3
-2
AvatarDropdown.jsx
src/components/GlobalHeader/AvatarDropdown.jsx
+16
-3
index.less
src/components/GlobalHeader/index.less
+19
-0
SecurityLayout.jsx
src/layouts/SecurityLayout.jsx
+3
-0
user.js
src/models/user.js
+15
-1
index.jsx
src/pages/businessManage/info/index.jsx
+0
-3
service.js
src/pages/businessManage/service.js
+1
-1
index.jsx
src/pages/distributionArea/addArea/index.jsx
+1
-2
user.js
src/services/user.js
+7
-0
No files found.
src/components/CustomTree/index.jsx
View file @
435ab5f1
...
@@ -268,8 +268,9 @@ const CustomTree = forwardRef(props => {
...
@@ -268,8 +268,9 @@ const CustomTree = forwardRef(props => {
));
));
// 隐藏所有子树
// 隐藏所有子树
const
handleMouseUp
=
e
=>
{
const
handleMouseUp
=
event
=>
{
const
isCur
=
e
?.
path
?.
some
(
const
path
=
event
.
path
||
(
event
.
composedPath
&&
event
.
composedPath
());
const
isCur
=
path
?.
some
(
item
=>
item
=>
item
.
className
&&
item
.
className
&&
typeof
item
.
className
===
'
string
'
&&
typeof
item
.
className
===
'
string
'
&&
...
...
src/components/GlobalHeader/AvatarDropdown.jsx
View file @
435ab5f1
...
@@ -35,8 +35,15 @@ class AvatarDropdown extends React.Component {
...
@@ -35,8 +35,15 @@ class AvatarDropdown extends React.Component {
avatar
:
''
,
avatar
:
''
,
name
:
''
,
name
:
''
,
},
},
businessInfo
=
{},
menu
,
menu
,
}
=
this
.
props
;
}
=
this
.
props
;
const
platform
=
{
560761
:
'
咩咩自营
'
,
1000020
:
'
吉集优品
'
,
};
const
menuHeaderDropdown
=
(
const
menuHeaderDropdown
=
(
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
this
.
onMenuClick
}
>
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
this
.
onMenuClick
}
>
{
menu
&&
(
{
menu
&&
(
...
@@ -64,13 +71,18 @@ class AvatarDropdown extends React.Component {
...
@@ -64,13 +71,18 @@ class AvatarDropdown extends React.Component {
);
);
return
currentUser
&&
currentUser
.
name
?
(
return
currentUser
&&
currentUser
.
name
?
(
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
div
className=
{
`${styles.action} ${styles.account}`
}
>
<
Avatar
<
Avatar
icon=
{
<
UserOutlined
/>
}
icon=
{
<
UserOutlined
/>
}
style=
{
{
backgroundColor
:
'
#388bd8
'
,
marginRight
:
'
10px
'
}
}
style=
{
{
backgroundColor
:
'
#388bd8
'
,
marginRight
:
'
10px
'
}
}
/>
/>
<
span
className=
{
styles
.
name
}
>
{
currentUser
.
name
}
</
span
>
<
div
className=
{
styles
.
nameBox
}
>
</
span
>
<
div
className=
{
styles
.
name
}
>
{
currentUser
.
name
}
</
div
>
{
businessInfo
.
channelId
&&
(
<
div
className=
{
styles
.
subName
}
>
(
{
platform
[
businessInfo
.
channelId
]
}
)
</
div
>
)
}
</
div
>
</
div
>
</
HeaderDropdown
>
</
HeaderDropdown
>
)
:
(
)
:
(
<
Spin
<
Spin
...
@@ -86,4 +98,5 @@ class AvatarDropdown extends React.Component {
...
@@ -86,4 +98,5 @@ class AvatarDropdown extends React.Component {
export
default
connect
(({
user
})
=>
({
export
default
connect
(({
user
})
=>
({
currentUser
:
user
.
currentUser
,
currentUser
:
user
.
currentUser
,
businessInfo
:
user
.
businessInfo
,
}))(
AvatarDropdown
);
}))(
AvatarDropdown
);
src/components/GlobalHeader/index.less
View file @
435ab5f1
...
@@ -37,6 +37,8 @@
...
@@ -37,6 +37,8 @@
}
}
.right {
.right {
display: flex;
align-items: center;
float: right;
float: right;
height: 100%;
height: 100%;
margin-left: auto;
margin-left: auto;
...
@@ -65,6 +67,9 @@
...
@@ -65,6 +67,9 @@
}
}
}
}
.account {
.account {
display: flex;
align-items: center;
justify-content: center;
.avatar {
.avatar {
margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
margin-right: 8px;
margin-right: 8px;
...
@@ -75,6 +80,20 @@
...
@@ -75,6 +80,20 @@
}
}
}
}
.nameBox {
text-align: center;
}
.name {
line-height: 20px;
text-align: center;
}
.subName {
color: #666;
font-size: 12px;
line-height: 20px;
text-align: center;
}
.dark {
.dark {
height: @layout-header-height;
height: @layout-header-height;
.action {
.action {
...
...
src/layouts/SecurityLayout.jsx
View file @
435ab5f1
...
@@ -17,6 +17,9 @@ class SecurityLayout extends React.Component {
...
@@ -17,6 +17,9 @@ class SecurityLayout extends React.Component {
dispatch
({
dispatch
({
type
:
'
user/fetchCurrent
'
,
type
:
'
user/fetchCurrent
'
,
});
});
dispatch
({
type
:
'
user/fetchBusinessInfo
'
,
});
}
}
const
delaySet
=
()
=>
this
.
setState
({
isReady
:
true
});
const
delaySet
=
()
=>
this
.
setState
({
isReady
:
true
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
src/models/user.js
View file @
435ab5f1
// queryUsers
// queryUsers
import
{
queryCurrent
,
homeInfo
}
from
'
@/services/user
'
;
import
{
queryCurrent
,
homeInfo
,
apiBusinessDetail
}
from
'
@/services/user
'
;
import
localStorage
from
'
@/utils/localStorage
'
;
import
localStorage
from
'
@/utils/localStorage
'
;
import
sessionStorage
from
'
@/utils/sessionStorage
'
;
import
sessionStorage
from
'
@/utils/sessionStorage
'
;
...
@@ -31,6 +31,16 @@ const UserModel = {
...
@@ -31,6 +31,16 @@ const UserModel = {
payload
:
response
.
data
,
payload
:
response
.
data
,
});
});
},
},
*
fetchBusinessInfo
(
_
,
{
call
,
put
})
{
const
response
=
yield
call
(
apiBusinessDetail
);
if
(
response
.
code
===
2000
)
{
localStorage
.
set
(
'
business-info
'
,
JSON
.
stringify
(
response
.
data
));
}
yield
put
({
type
:
'
saveCurrentBusiness
'
,
payload
:
response
.
data
,
});
},
*
homeInfo
(
_
,
{
call
,
put
})
{
*
homeInfo
(
_
,
{
call
,
put
})
{
const
response
=
yield
call
(
homeInfo
);
const
response
=
yield
call
(
homeInfo
);
yield
put
({
yield
put
({
...
@@ -45,6 +55,9 @@ const UserModel = {
...
@@ -45,6 +55,9 @@ const UserModel = {
saveCurrentUser
(
state
,
action
)
{
saveCurrentUser
(
state
,
action
)
{
return
{
...
state
,
currentUser
:
action
.
payload
||
{}
};
return
{
...
state
,
currentUser
:
action
.
payload
||
{}
};
},
},
saveCurrentBusiness
(
state
,
action
)
{
return
{
...
state
,
businessInfo
:
action
.
payload
||
{}
};
},
saveData
(
state
,
action
)
{
saveData
(
state
,
action
)
{
const
data
=
action
.
payload
;
const
data
=
action
.
payload
;
return
{
...
state
,
...
data
};
return
{
...
state
,
...
data
};
...
@@ -53,6 +66,7 @@ const UserModel = {
...
@@ -53,6 +66,7 @@ const UserModel = {
changeNotifyCount
(
changeNotifyCount
(
state
=
{
state
=
{
currentUser
:
{},
currentUser
:
{},
businessInfo
:
{},
},
},
action
,
action
,
)
{
)
{
...
...
src/pages/businessManage/info/index.jsx
View file @
435ab5f1
...
@@ -37,13 +37,10 @@ import {
...
@@ -37,13 +37,10 @@ import {
}
from
'
./data
'
;
}
from
'
./data
'
;
import
{
validatePhone
,
validateEMail
,
validNumber
}
from
'
@/utils/validator
'
;
import
{
validatePhone
,
validateEMail
,
validNumber
}
from
'
@/utils/validator
'
;
import
{
getErrorMessage
}
from
'
@/utils/utils
'
;
import
{
getErrorMessage
}
from
'
@/utils/utils
'
;
import
MapModal
from
'
@/components/BaiduMap
'
;
import
{
apiCategoryList
,
apiEditStoreInfo
,
apiRecognize
}
from
'
../service
'
;
import
{
apiCategoryList
,
apiEditStoreInfo
,
apiRecognize
}
from
'
../service
'
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
{
Item
:
FormItem
}
=
Form
;
const
{
Item
:
FormItem
}
=
Form
;
const
{
RangePicker
}
=
DatePicker
;
const
{
TabPane
}
=
Tabs
;
const
carID
=
301008
;
// 汽车类商家
const
carID
=
301008
;
// 汽车类商家
const
fileterBrandOptions
=
(
input
,
options
)
=>
options
.
children
.
includes
(
input
);
const
fileterBrandOptions
=
(
input
,
options
)
=>
options
.
children
.
includes
(
input
);
class
BusinessInfo
extends
Component
{
class
BusinessInfo
extends
Component
{
...
...
src/pages/businessManage/service.js
View file @
435ab5f1
...
@@ -53,5 +53,5 @@ export const apiEditStoreInfo = params =>
...
@@ -53,5 +53,5 @@ export const apiEditStoreInfo = params =>
request
.
post
(
'
/api/merchants/suppliers/info/edit
'
,
{
prefix
:
kdspApi
,
data
:
params
});
request
.
post
(
'
/api/merchants/suppliers/info/edit
'
,
{
prefix
:
kdspApi
,
data
:
params
});
// 查询商户详情
// 查询商户详情
export
const
apiBusinessDetail
=
businessId
=>
export
const
apiBusinessDetail
=
()
=>
request
.
get
(
'
/api/merchants/suppliers/pops/detail
'
,
{
prefix
:
kdspApi
});
request
.
get
(
'
/api/merchants/suppliers/pops/detail
'
,
{
prefix
:
kdspApi
});
src/pages/distributionArea/addArea/index.jsx
View file @
435ab5f1
import
{
Form
}
from
'
@ant-design/compatible
'
;
import
{
Form
}
from
'
@ant-design/compatible
'
;
import
'
@ant-design/compatible/assets/index.css
'
;
import
'
@ant-design/compatible/assets/index.css
'
;
import
{
Modal
,
Input
,
Select
,
Cascader
,
Tag
,
notification
,
Tree
,
Col
,
Row
}
from
'
antd
'
;
import
{
Modal
,
Input
,
notification
}
from
'
antd
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
el
}
from
'
date-fns/locale
'
;
import
{
areaList
,
getAddTemplate
,
forbiddenAddress
}
from
'
../services
'
;
import
{
areaList
,
getAddTemplate
,
forbiddenAddress
}
from
'
../services
'
;
import
CustomTree
from
'
@/components/CustomTree
'
;
import
CustomTree
from
'
@/components/CustomTree
'
;
...
...
src/services/user.js
View file @
435ab5f1
import
{
APP_CODE
}
from
'
@/utils/constants
'
;
import
{
APP_CODE
}
from
'
@/utils/constants
'
;
import
request
from
'
@/utils/request
'
;
import
request
from
'
@/utils/request
'
;
import
config
from
'
../../config/env.config
'
;
const
{
kdspApi
}
=
config
;
export
async
function
queryCurrent
()
{
export
async
function
queryCurrent
()
{
// 查询用户信息
// 查询用户信息
return
request
.
post
(
'
/v2/oauth/currentuserinfo
'
);
return
request
.
post
(
'
/v2/oauth/currentuserinfo
'
);
}
}
// 查询商户信息
export
const
apiBusinessDetail
=
()
=>
request
.
get
(
'
/api/merchants/suppliers/pops/detail
'
,
{
prefix
:
kdspApi
});
export
async
function
homeInfo
()
{
export
async
function
homeInfo
()
{
// 查询主页信息
// 查询主页信息
return
request
.
post
(
'
/home/info
'
);
return
request
.
post
(
'
/home/info
'
);
...
...
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