Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
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
黄奎
mall.oytour.com
Commits
abd38c0d
Commit
abd38c0d
authored
Sep 28, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单栏调整
parent
956cf337
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
4 deletions
+85
-4
RB_MiniProgram.cs
Mall.Model/Entity/User/RB_MiniProgram.cs
+29
-2
RB_MiniProgram_Extend.cs
Mall.Model/Extend/User/RB_MiniProgram_Extend.cs
+4
-2
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+39
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+13
-0
No files found.
Mall.Model/Entity/User/RB_MiniProgram.cs
View file @
abd38c0d
...
...
@@ -434,7 +434,34 @@ namespace Mall.Model.Entity.User
}
public
class
MenuNavMoreModel
{
public
class
MenuNavMoreModel
{
/// <summary>
/// 排序
/// </summary>
public
int
Sort
{
get
;
set
;
}
/// <summary>
/// 菜单栏标题
/// </summary>
public
string
MenuNavTitle
{
get
;
set
;
}
/// <summary>
/// 标题样式 1标准
/// </summary>
public
int
TitleStyle
{
get
;
set
;
}
/// <summary>
/// 菜单栏样式(0-列表,1-九宫格)
/// </summary>
public
int
?
MenuNavStyle
{
get
;
set
;
}
/// <summary>
/// 菜单列表
/// </summary>
public
List
<
RB_MiniProgram_UserCenterMenu
>
MeunList
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_MiniProgram_Extend.cs
View file @
abd38c0d
...
...
@@ -100,8 +100,10 @@ namespace Mall.Model.Extend.User
/// 小程序用户中心【自定义】菜单列表
/// </summary>
public
List
<
RB_MiniProgram_UserCenterMenu_Extend
>
SelfMenuList
{
get
;
set
;
}
/// <summary>
/// 菜单栏 多组
/// </summary>
public
List
<
Entity
.
User
.
MenuNavMoreModel
>
NavMoreList
{
get
;
set
;
}
/// <summary>
/// 获取可跳转小程序
/// </summary>
...
...
Mall.Module.User/MiniProgramModule.cs
View file @
abd38c0d
...
...
@@ -478,6 +478,22 @@ namespace Mall.Module.User
extModel
.
AccountMenuList
=
menuList
?.
Where
(
qitem
=>
qitem
.
MenuType
==
2
)?.
ToList
();
extModel
.
SelfMenuList
=
menuList
?.
Where
(
qitem
=>
qitem
.
MenuType
==
4
).
OrderBy
(
qitem
=>
qitem
.
PageSort
)?.
ToList
();
}
if
(!
string
.
IsNullOrEmpty
(
extModel
.
MenuNavJson
)
&&
extModel
.
MenuNavJson
!=
"[]"
)
{
extModel
.
NavMoreList
=
JsonConvert
.
DeserializeObject
<
List
<
MenuNavMoreModel
>>(
extModel
.
MenuNavJson
);
}
else
{
extModel
.
NavMoreList
=
new
List
<
MenuNavMoreModel
>()
{
new
MenuNavMoreModel
(){
Sort
=
1
,
MenuNavTitle
=
""
,
MenuNavStyle
=
0
,
TitleStyle
=
1
,
MeunList
=
new
List
<
RB_MiniProgram_UserCenterMenu
>()
}
};
}
}
if
(
isGetHomeData
)
{
...
...
@@ -722,6 +738,28 @@ namespace Mall.Module.User
bool
flag
=
false
;
if
(
extModel
.
MallBaseId
>
0
)
{
#
region
组装菜单栏
if
(
extModel
.
NavMoreList
!=
null
&&
extModel
.
NavMoreList
.
Any
())
{
extModel
.
MenuNavJson
=
JsonConvert
.
SerializeObject
(
extModel
.
NavMoreList
.
Select
(
x
=>
new
{
x
.
Sort
,
x
.
MenuNavTitle
,
x
.
TitleStyle
,
x
.
MenuNavStyle
,
MeunList
=
x
.
MeunList
.
Select
(
z
=>
new
{
z
.
PageSort
,
z
.
MenuName
,
z
.
MenuIcon
,
z
.
MenuUrl
})
}));
}
else
{
extModel
.
MenuNavJson
=
"[]"
;
}
#
endregion
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_MiniProgram_Extend
.
DefaultBgImg
),
extModel
.
DefaultBgImg
},
...
...
@@ -736,6 +774,7 @@ namespace Mall.Module.User
{
nameof
(
RB_MiniProgram_Extend
.
IsShowMenuNav
),
extModel
.
IsShowMenuNav
},
{
nameof
(
RB_MiniProgram_Extend
.
MenuNavTitle
),
extModel
.
MenuNavTitle
},
{
nameof
(
RB_MiniProgram_Extend
.
MenuNavStyle
),
extModel
.
MenuNavStyle
},
{
nameof
(
RB_MiniProgram_Extend
.
MenuNavJson
),
extModel
.
MenuNavJson
},
};
if
(
extModel
.
FavoriteFootMenuList
!=
null
&&
extModel
.
FavoriteFootMenuList
.
Count
>
0
)
{
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
abd38c0d
...
...
@@ -535,6 +535,19 @@ namespace Mall.WebApi.Controllers.MallBase
@params
=
""
,
}),
nar_menus
=
miniProgram
?.
NavMoreList
?.
Select
(
x
=>
new
{
x
.
Sort
,
x
.
MenuNavTitle
,
x
.
TitleStyle
,
x
.
MenuNavStyle
,
MeunList
=
x
.
MeunList
.
OrderBy
(
qitem
=>
qitem
.
PageSort
).
Select
(
qitem
=>
new
{
icon_url
=
qitem
.
MenuIcon
,
name
=
qitem
.
MenuName
,
link_url
=
qitem
.
MenuUrl
.
Trim
(),
open_type
=
"navigate"
,
@params
=
""
,
})
}),
//订单菜单列表
order_bar
=
miniProgram
?.
OrderMenuList
?.
Select
(
qitem
=>
new
{
...
...
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