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
a6403564
Commit
a6403564
authored
May 29, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0591a856
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
23 deletions
+44
-23
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+11
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+32
-22
ApiExceptionFilterAttribute.cs
Mall.WebApi/Filter/ApiExceptionFilterAttribute.cs
+1
-1
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
a6403564
...
...
@@ -2,6 +2,7 @@
using
Mall.Model.Entity.MarketingCenter
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.Text
;
namespace
Mall.Model.Extend.MarketingCenter
...
...
@@ -904,6 +905,11 @@ namespace Mall.Model.Extend.MarketingCenter
/// 售价
/// </summary>
public
decimal
price
{
get
;
set
;
}
/// <summary>
/// 【原价】前端使用
/// </summary>
public
decimal
OriginalPrice
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -1919,6 +1925,11 @@ namespace Mall.Model.Extend.MarketingCenter
public
string
key
{
get
;
set
;
}
/// <summary>
/// 网站链接
/// </summary>
public
string
url
{
get
;
set
;
}
//public string @params { get; set; }
}
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
a6403564
...
...
@@ -87,8 +87,8 @@ namespace Mall.WebApi.Controllers.MallBase
MiniAppId
=
RequestParm
.
MiniAppId
;
}
catch
(
Exception
ex
)
{
{
Common
.
Plugin
.
LogHelper
.
Error
(
"MallController_GetHome"
,
ex
);
}
var
homePage
=
new
object
();
//底部导航
...
...
@@ -100,7 +100,8 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
miniProgram
!=
null
&&
miniProgram
.
MallBaseId
>
0
)
{
//底部导航
navbar
=
new
{
navbar
=
new
{
//底部导航背景颜色
bottom_background_color
=
miniProgram
.
BottomNavBgColor
,
//顶部导航背景颜色
...
...
@@ -110,15 +111,16 @@ namespace Mall.WebApi.Controllers.MallBase
//导航底部是否开启阴影效果(0-未开启,1-开启)
shadow
=
miniProgram
.
BottomNavIsShadow
,
//导航栏
navs
=
miniProgram
.
BottomTagList
.
Select
(
qitem
=>
new
{
active_color
=
qitem
.
CheckedColor
,
active_icon
=
qitem
.
CheckedIcon
,
color
=
qitem
.
DefaultColor
,
text
=
qitem
.
TagName
,
icon
=
qitem
.
DefaultIcon
,
url
=
qitem
.
TagLink
,
open_type
=
"redirect"
,
key
=
qitem
.
TagLink
==
"/pages/live/index"
?
"live"
:
""
,
navs
=
miniProgram
.
BottomTagList
.
Select
(
qitem
=>
new
{
active_color
=
qitem
.
CheckedColor
,
active_icon
=
qitem
.
CheckedIcon
,
color
=
qitem
.
DefaultColor
,
text
=
qitem
.
TagName
,
icon
=
qitem
.
DefaultIcon
,
url
=
qitem
.
TagLink
,
open_type
=
"redirect"
,
key
=
qitem
.
TagLink
==
"/pages/live/index"
?
"live"
:
""
,
}),
};
...
...
@@ -434,9 +436,10 @@ namespace Mall.WebApi.Controllers.MallBase
cats
.
goodsList
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
gItem
?.
SellingPrice
??
0
,
price
=
Math
.
Round
(
gItem
?.
SellingPrice
??
0
,
2
)
,
name
=
gItem
.
Name
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
)
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
(
gItem
?.
OriginalPrice
??
0
,
2
)
});
}
}
...
...
@@ -456,9 +459,10 @@ namespace Mall.WebApi.Controllers.MallBase
cats
.
goodsList
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
gItem
?.
SellingPrice
??
0
,
price
=
Math
.
Round
(
gItem
?.
SellingPrice
??
0
,
2
)
,
name
=
gItem
.
Name
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
)
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
(
gItem
?.
OriginalPrice
??
0
,
2
)
});
}
}
...
...
@@ -1290,8 +1294,9 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
lastItem
.
name
=
tempGood
?.
Name
??
lastItem
.
name
;
lastItem
.
price
=
tempGood
?.
SellingPrice
??
lastItem
.
price
;
lastItem
.
price
=
Math
.
Round
((
tempGood
?.
SellingPrice
??
lastItem
.
price
),
2
)
;
lastItem
.
picUrl
=
tempGood
?.
CoverImage
!=
null
?
Common
.
Config
.
GetFileUrl
(
tempGood
.
CoverImage
)
:
Common
.
Config
.
GetFileUrl
(
lastItem
.
picUrl
);
lastItem
.
OriginalPrice
=
Math
.
Round
((
tempGood
?.
OriginalPrice
??
0
),
2
);
}
}
}
...
...
@@ -1313,9 +1318,10 @@ namespace Mall.WebApi.Controllers.MallBase
childItem
.
goodsList
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
gItem
?.
SellingPrice
??
0
,
price
=
Math
.
Round
((
gItem
?.
SellingPrice
??
0
),
2
)
,
name
=
gItem
.
Name
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
)
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
((
gItem
?.
OriginalPrice
??
0
),
2
)
});
}
}
...
...
@@ -1342,9 +1348,10 @@ namespace Mall.WebApi.Controllers.MallBase
goodsData
.
list
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
gItem
?.
SellingPrice
??
0
,
price
=
Math
.
Round
((
gItem
?.
SellingPrice
??
0
),
2
)
,
name
=
gItem
.
Name
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
)
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
((
gItem
?.
OriginalPrice
??
0
),
2
)
});
}
}
...
...
@@ -1367,8 +1374,9 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
childItem
.
name
=
tempGood
?.
Name
??
childItem
.
name
;
childItem
.
price
=
tempGood
?.
SellingPrice
??
childItem
.
price
;
childItem
.
price
=
Math
.
Round
((
tempGood
?.
SellingPrice
??
childItem
.
price
),
2
)
;
childItem
.
picUrl
=
tempGood
?.
CoverImage
!=
null
?
Common
.
Config
.
GetFileUrl
(
tempGood
.
CoverImage
)
:
Common
.
Config
.
GetFileUrl
(
childItem
.
picUrl
);
childItem
.
OriginalPrice
=
Math
.
Round
((
tempGood
?.
OriginalPrice
??
0
),
2
);
}
}
}
...
...
@@ -1597,6 +1605,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetUserCenter
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -1647,6 +1656,7 @@ namespace Mall.WebApi.Controllers.MallBase
icon_url
=
qitem
.
MenuIcon
,
name
=
qitem
.
MenuName
,
is_show
=
1
,
link_url
=
qitem
.
MenuUrl
,
}),
//自定义菜单
menus
=
miniProgram
?.
SelfMenuList
.
Select
(
qitem
=>
new
...
...
Mall.WebApi/Filter/ApiExceptionFilterAttribute.cs
View file @
a6403564
...
...
@@ -23,7 +23,7 @@ namespace Mall.WebApi.Filter
{
try
{
LogHelper
.
WriteInfo
(
"拦截异常信息:"
+
context
.
Exception
);
LogHelper
.
WriteInfo
(
"
ApiExceptionFilterAttribute_OnException
拦截异常信息:"
+
context
.
Exception
);
}
catch
{
...
...
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