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
27cf9ecf
Commit
27cf9ecf
authored
May 24, 2024
by
guang.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加店铺平台名称
parent
be41941b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
28 deletions
+53
-28
AvatarDropdown.jsx
src/components/GlobalHeader/AvatarDropdown.jsx
+14
-3
index.less
src/components/GlobalHeader/index.less
+13
-0
SecurityLayout.jsx
src/layouts/SecurityLayout.jsx
+3
-0
user.js
src/models/user.js
+15
-1
data.js
src/pages/businessManage/info/data.js
+0
-6
index.jsx
src/pages/businessManage/info/index.jsx
+0
-17
service.js
src/pages/businessManage/service.js
+1
-1
user.js
src/services/user.js
+7
-0
No files found.
src/components/GlobalHeader/AvatarDropdown.jsx
View file @
27cf9ecf
...
...
@@ -35,8 +35,15 @@ class AvatarDropdown extends React.Component {
avatar
:
''
,
name
:
''
,
},
businessInfo
=
{},
menu
,
}
=
this
.
props
;
const
platform
=
{
560761
:
'
自营店铺
'
,
1000020
:
'
大兴吉石
'
,
};
const
menuHeaderDropdown
=
(
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
this
.
onMenuClick
}
>
{
menu
&&
(
...
...
@@ -64,13 +71,16 @@ class AvatarDropdown extends React.Component {
);
return
currentUser
&&
currentUser
.
name
?
(
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
div
className=
{
`${styles.action} ${styles.account}`
}
>
<
Avatar
icon=
{
<
UserOutlined
/>
}
style=
{
{
backgroundColor
:
'
#388bd8
'
,
marginRight
:
'
10px
'
}
}
/>
<
span
className=
{
styles
.
name
}
>
{
currentUser
.
name
}
</
span
>
</
span
>
<
div
className=
{
styles
.
nameBox
}
>
<
div
className=
{
styles
.
name
}
>
{
currentUser
.
name
}
</
div
>
<
div
className=
{
styles
.
name
}
>
(
{
platform
[
businessInfo
.
channelId
]
}
)
</
div
>
</
div
>
</
div
>
</
HeaderDropdown
>
)
:
(
<
Spin
...
...
@@ -86,4 +96,5 @@ class AvatarDropdown extends React.Component {
export
default
connect
(({
user
})
=>
({
currentUser
:
user
.
currentUser
,
businessInfo
:
user
.
businessInfo
,
}))(
AvatarDropdown
);
src/components/GlobalHeader/index.less
View file @
27cf9ecf
...
...
@@ -37,6 +37,8 @@
}
.right {
display: flex;
align-items: center;
float: right;
height: 100%;
margin-left: auto;
...
...
@@ -65,6 +67,9 @@
}
}
.account {
display: flex;
align-items: center;
justify-content: center;
.avatar {
margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
margin-right: 8px;
...
...
@@ -75,6 +80,14 @@
}
}
.nameBox {
text-align: center;
}
.name {
line-height: 20px;
text-align: center;
}
.dark {
height: @layout-header-height;
.action {
...
...
src/layouts/SecurityLayout.jsx
View file @
27cf9ecf
...
...
@@ -17,6 +17,9 @@ class SecurityLayout extends React.Component {
dispatch
({
type
:
'
user/fetchCurrent
'
,
});
dispatch
({
type
:
'
user/fetchBusinessInfo
'
,
});
}
const
delaySet
=
()
=>
this
.
setState
({
isReady
:
true
});
setTimeout
(()
=>
{
...
...
src/models/user.js
View file @
27cf9ecf
// queryUsers
import
{
queryCurrent
,
homeInfo
}
from
'
@/services/user
'
;
import
{
queryCurrent
,
homeInfo
,
apiBusinessDetail
}
from
'
@/services/user
'
;
import
localStorage
from
'
@/utils/localStorage
'
;
import
sessionStorage
from
'
@/utils/sessionStorage
'
;
...
...
@@ -31,6 +31,16 @@ const UserModel = {
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
})
{
const
response
=
yield
call
(
homeInfo
);
yield
put
({
...
...
@@ -45,6 +55,9 @@ const UserModel = {
saveCurrentUser
(
state
,
action
)
{
return
{
...
state
,
currentUser
:
action
.
payload
||
{}
};
},
saveCurrentBusiness
(
state
,
action
)
{
return
{
...
state
,
businessInfo
:
action
.
payload
||
{}
};
},
saveData
(
state
,
action
)
{
const
data
=
action
.
payload
;
return
{
...
state
,
...
data
};
...
...
@@ -53,6 +66,7 @@ const UserModel = {
changeNotifyCount
(
state
=
{
currentUser
:
{},
businessInfo
:
{},
},
action
,
)
{
...
...
src/pages/businessManage/info/data.js
View file @
27cf9ecf
...
...
@@ -39,12 +39,6 @@ export const businessModel = [
{
label
:
'
到店业务(服务类业务)
'
,
value
:
3
},
];
// POP归属
export
const
POPModel
=
[
{
label
:
'
自营店铺
'
,
value
:
560761
},
{
label
:
'
大兴吉石
'
,
value
:
1000020
},
];
export
const
signDateTypeList
=
[{
label
:
'
自商品售卖起默认一年
'
,
value
:
1
}];
export
const
legalPersonList
=
[{
label
:
'
长期
'
,
value
:
'
长期
'
}];
...
...
src/pages/businessManage/info/index.jsx
View file @
27cf9ecf
...
...
@@ -34,7 +34,6 @@ import {
businessTypeDesc
,
signDateTypeList
,
legalPersonList
,
POPModel
,
}
from
'
./data
'
;
import
{
validatePhone
,
validateEMail
,
validNumber
}
from
'
@/utils/validator
'
;
import
{
getErrorMessage
}
from
'
@/utils/utils
'
;
...
...
@@ -378,22 +377,6 @@ class BusinessInfo extends Component {
)
}
</
FormItem
>
</
Col
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"POP归属"
labelCol=
{
{
span
:
4
}
}
>
{
getFieldDecorator
(
'
channelId
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请选择POP归属!
'
}],
initialValue
:
businessInfo
.
channelId
,
})(
<
Radio
.
Group
disabled
>
{
POPModel
.
map
(
pop
=>
(
<
Radio
value=
{
pop
.
value
}
key=
{
pop
.
value
}
>
{
pop
.
label
}
</
Radio
>
))
}
</
Radio
.
Group
>,
)
}
</
FormItem
>
</
Col
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"主营类目"
labelCol=
{
{
span
:
4
}
}
>
{
getFieldDecorator
(
'
mainCategoryId
'
,
{
...
...
src/pages/businessManage/service.js
View file @
27cf9ecf
...
...
@@ -53,5 +53,5 @@ export const apiEditStoreInfo = 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
});
src/services/user.js
View file @
27cf9ecf
import
{
APP_CODE
}
from
'
@/utils/constants
'
;
import
request
from
'
@/utils/request
'
;
import
config
from
'
../../config/env.config
'
;
const
{
kdspApi
}
=
config
;
export
async
function
queryCurrent
()
{
// 查询用户信息
return
request
.
post
(
'
/v2/oauth/currentuserinfo
'
);
}
// 查询商户信息
export
const
apiBusinessDetail
=
()
=>
request
.
get
(
'
/api/merchants/suppliers/pops/detail
'
,
{
prefix
:
kdspApi
});
export
async
function
homeInfo
()
{
// 查询主页信息
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