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
7be5b724
Commit
7be5b724
authored
May 27, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4d725687
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
961 additions
and
953 deletions
+961
-953
RequestParm.cs
Mall.Common/API/RequestParm.cs
+5
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+956
-953
No files found.
Mall.Common/API/RequestParm.cs
View file @
7be5b724
...
...
@@ -67,5 +67,10 @@ namespace Mall.Common.API
/// 小程序Id
/// </summary>
public
string
MiniAppId
{
get
;
set
;
}
/// <summary>
/// 用户OpenId
/// </summary>
public
string
OpenId
{
get
;
set
;
}
}
}
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
7be5b724
...
...
@@ -82,8 +82,11 @@ namespace Mall.WebApi.Controllers.MallBase
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
//小程序Id
var
MiniAppId
=
parms
.
GetStringValue
(
"MiniAppId"
);
MiniAppId
=
RequestParm
.
MiniAppId
;
var
homePage
=
new
object
();
if
(
MiniAppId
!=
null
&&
!
string
.
IsNullOrEmpty
(
MiniAppId
))
{
//获取小程序信息
var
miniProgram
=
programModule
.
GetMiniProgramModule
(
new
Model
.
Extend
.
User
.
RB_MiniProgram_Extend
()
{
MiniAppId
=
MiniAppId
},
isGetHomeData
:
true
);
if
(
miniProgram
!=
null
&&
miniProgram
.
MallBaseId
>
0
)
...
...
@@ -94,8 +97,6 @@ namespace Mall.WebApi.Controllers.MallBase
TenantId
=
miniProgram
.
TenantId
,
},
isGetHome
:
true
);
List
<
object
>
list
=
new
List
<
object
>();
//测试使用
//selfHomePage.Id = 0;
//自定义首页
if
(
selfHomePage
!=
null
&&
selfHomePage
.
Id
>
0
)
{
...
...
@@ -121,7 +122,7 @@ namespace Mall.WebApi.Controllers.MallBase
{
foreach
(
var
subItem
in
item
.
ComponentDataList
)
{
templateData
.
data
.
Add
(
PlusDataToObject
(
subItem
,
(
miniProgram
?.
TenantId
??
0
),
miniProgram
.
MallBaseId
));
templateData
.
data
.
Add
(
PlusDataToObject
(
subItem
,
(
miniProgram
?.
TenantId
??
0
),
miniProgram
.
MallBaseId
));
}
}
var
tempObj
=
new
...
...
@@ -327,7 +328,7 @@ namespace Mall.WebApi.Controllers.MallBase
break
;
//专题
case
"topic"
:
var
topicSourceList
=
contentModule
.
GetTopicListModule
(
new
Model
.
Entity
.
User
.
RB_Topic_Extend
()
var
topicSourceList
=
contentModule
.
GetTopicListModule
(
new
Model
.
Entity
.
User
.
RB_Topic_Extend
()
{
MallBaseId
=
miniProgram
.
MallBaseId
,
TenantId
=
miniProgram
.
TenantId
,
...
...
@@ -339,7 +340,7 @@ namespace Mall.WebApi.Controllers.MallBase
{
topic_list
.
Add
(
new
topicDetailsItem
()
{
cover_pic
=
Common
.
Config
.
GetFileUrl
(
tItem
.
CoverImg
)
,
cover_pic
=
Common
.
Config
.
GetFileUrl
(
tItem
.
CoverImg
)
,
read_count
=
0
,
title
=
tItem
.
Title
,
id
=
tItem
.
Id
,
...
...
@@ -356,7 +357,7 @@ namespace Mall.WebApi.Controllers.MallBase
count
=
subitem
.
topic_num
,
logo_1
=
Common
.
Config
.
GetFileUrl
(
subitem
.
topic_url
),
logo_2
=
Common
.
Config
.
GetFileUrl
(
subitem
.
topic_url_2
),
icon
=
Common
.
Config
.
GetFileUrl
(
subitem
.
label_url
)
,
icon
=
Common
.
Config
.
GetFileUrl
(
subitem
.
label_url
)
,
cat_show
=
false
,
list
=
new
List
<
topicTypeItem
>(),
topic_list
=
topic_list
...
...
@@ -385,7 +386,7 @@ namespace Mall.WebApi.Controllers.MallBase
menuName
=
subitem
.
name
,
name
=
subitem
.
name
,
staticGoods
=
false
,
goodsList
=
new
List
<
GoodsDetailsItem2
>
()
goodsList
=
new
List
<
GoodsDetailsItem2
>
()
};
if
(
subitem
.
relation_id
==
0
)
{
...
...
@@ -463,8 +464,8 @@ namespace Mall.WebApi.Controllers.MallBase
mode
=
1
,
backgroundHeight
=
100
,
backgroundWidth
=
100
,
list
=
new
List
<
GoodsDetailsItem2
>
(),
catList
=
new
List
<
catItem
>()
{
cats
}
list
=
new
List
<
GoodsDetailsItem2
>
(),
catList
=
new
List
<
catItem
>()
{
cats
}
}
});
templateData
.
data
.
Add
(
new
...
...
@@ -483,14 +484,14 @@ namespace Mall.WebApi.Controllers.MallBase
{
MallBaseId
=
miniProgram
.
MallBaseId
,
TenantId
=
Convert
.
ToInt32
(
miniProgram
.
TenantId
),
Id
=
subitem
.
relation_id
Id
=
subitem
.
relation_id
}).
FirstOrDefault
();
if
(
blockSource
!=
null
&&
blockSource
.
Id
>
0
)
if
(
blockSource
!=
null
&&
blockSource
.
Id
>
0
)
{
var
rubikData
=
new
rubikItem
()
{
style
=
Convert
.
ToInt32
(
blockSource
.
Style
),
space
=
0
,
space
=
0
,
list
=
new
List
<
rubikDetailItem
>(),
};
switch
(
rubikData
.
style
)
...
...
@@ -498,29 +499,30 @@ namespace Mall.WebApi.Controllers.MallBase
//1张图
case
0
:
rubikData
.
height
=
"360"
;
rubikData
.
w
=
"1"
;
rubikData
.
w
=
"1"
;
rubikData
.
h
=
1
;
rubikData
.
list
.
Add
(
new
rubikDetailItem
()
{
backgroundColor
=
""
,
numberX
=
0
,
numberY
=
0
,
backgroundColor
=
""
,
numberX
=
0
,
numberY
=
0
,
w
=
1
,
h
=
1
,
x
=
0
,
y
=
0
,
link
=
new
rubikLinkItem
()
{
new_link_url
=
blockSource
.
MagicDataList
[
0
].
Link
link
=
new
rubikLinkItem
()
{
new_link_url
=
blockSource
.
MagicDataList
[
0
].
Link
},
width
=
"calc(100%)"
,
height
=
"calc(100%)"
,
left
=
"0%"
,
top
=
"0%"
,
pic_url
=
Common
.
Config
.
GetFileUrl
(
blockSource
.
MagicDataList
[
0
].
ImgUrl
),
backgroundImage
=
""
,
backgroundRepeat
=
"no-repeat"
,
backgroundSize
=
"cover"
,
backgroundPosition
=
"center"
width
=
"calc(100%)"
,
height
=
"calc(100%)"
,
left
=
"0%"
,
top
=
"0%"
,
pic_url
=
Common
.
Config
.
GetFileUrl
(
blockSource
.
MagicDataList
[
0
].
ImgUrl
),
backgroundImage
=
""
,
backgroundRepeat
=
"no-repeat"
,
backgroundSize
=
"cover"
,
backgroundPosition
=
"center"
});
break
;
//两张图
...
...
@@ -1114,7 +1116,7 @@ namespace Mall.WebApi.Controllers.MallBase
{
homePage
=
new
{
id
=
-
1
,
id
=
miniProgram
.
MallBaseId
,
title
=
miniProgram
.
MallName
,
show_navs
=
1
,
is_home_page
=
1
,
...
...
@@ -1123,6 +1125,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
}
}
var
objResult
=
new
{
home_pages
=
homePage
...
...
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