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
4d725687
Commit
4d725687
authored
May 27, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义首页模板修改
parent
c38ee42c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+19
-8
No files found.
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
4d725687
...
...
@@ -95,7 +95,7 @@ namespace Mall.WebApi.Controllers.MallBase
},
isGetHome
:
true
);
List
<
object
>
list
=
new
List
<
object
>();
//测试使用
selfHomePage
.
Id
=
0
;
//
selfHomePage.Id = 0;
//自定义首页
if
(
selfHomePage
!=
null
&&
selfHomePage
.
Id
>
0
)
{
...
...
@@ -378,7 +378,15 @@ namespace Mall.WebApi.Controllers.MallBase
break
;
//商品分类
case
"cat"
:
var
tempGoodsList
=
new
List
<
GoodsDetailsItem2
>();
var
cats
=
new
catItem
()
{
goodsNum
=
6
,
id
=
subitem
.
relation_id
,
menuName
=
subitem
.
name
,
name
=
subitem
.
name
,
staticGoods
=
false
,
goodsList
=
new
List
<
GoodsDetailsItem2
>
()
};
if
(
subitem
.
relation_id
==
0
)
{
var
goodsList
=
productModule
.
GetProductGoodsPageList
(
1
,
6
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
...
...
@@ -388,9 +396,10 @@ namespace Mall.WebApi.Controllers.MallBase
});
if
(
goodsList
!=
null
&&
goodsList
.
Count
>
0
)
{
foreach
(
var
gItem
in
goodsList
)
{
tempG
oodsList
.
Add
(
new
GoodsDetailsItem2
()
cats
.
g
oodsList
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
gItem
?.
SellingPrice
??
0
,
...
...
@@ -412,7 +421,7 @@ namespace Mall.WebApi.Controllers.MallBase
{
foreach
(
var
gItem
in
goodsList
)
{
tempG
oodsList
.
Add
(
new
GoodsDetailsItem2
()
cats
.
g
oodsList
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
gItem
?.
SellingPrice
??
0
,
...
...
@@ -427,7 +436,7 @@ namespace Mall.WebApi.Controllers.MallBase
id
=
"goods"
,
data
=
new
goodsItem
()
{
showCat
=
fals
e
,
showCat
=
tru
e
,
catPosition
=
"top"
,
catStyle
=
0
,
addGoodsType
=
0
,
...
...
@@ -454,7 +463,8 @@ namespace Mall.WebApi.Controllers.MallBase
mode
=
1
,
backgroundHeight
=
100
,
backgroundWidth
=
100
,
list
=
tempGoodsList
list
=
new
List
<
GoodsDetailsItem2
>
(),
catList
=
new
List
<
catItem
>()
{
cats
}
}
});
templateData
.
data
.
Add
(
new
...
...
@@ -472,7 +482,8 @@ namespace Mall.WebApi.Controllers.MallBase
var
blockSource
=
programModule
.
GetMallMagicListModule
(
new
Model
.
Entity
.
User
.
RB_Mall_Magic_Extend
()
{
MallBaseId
=
miniProgram
.
MallBaseId
,
TenantId
=
Convert
.
ToInt32
(
miniProgram
.
TenantId
)
TenantId
=
Convert
.
ToInt32
(
miniProgram
.
TenantId
),
Id
=
subitem
.
relation_id
}).
FirstOrDefault
();
if
(
blockSource
!=
null
&&
blockSource
.
Id
>
0
)
{
...
...
@@ -1052,7 +1063,7 @@ namespace Mall.WebApi.Controllers.MallBase
},
width
=
"calc(50%)"
,
height
=
"calc(50%)"
,
left
=
"calc(
05
%)"
,
left
=
"calc(
50
%)"
,
top
=
"calc(50%)"
,
pic_url
=
Common
.
Config
.
GetFileUrl
(
blockSource
.
MagicDataList
[
3
].
ImgUrl
),
backgroundImage
=
""
,
...
...
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