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
a3ff3c25
Commit
a3ff3c25
authored
Feb 23, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0e405378
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
169 additions
and
4 deletions
+169
-4
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+113
-0
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+1
-1
RB_Miniprogram_TemplateRepository.cs
...tory/MarketingCenter/RB_Miniprogram_TemplateRepository.cs
+1
-1
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+30
-1
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+24
-1
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
a3ff3c25
...
...
@@ -230,6 +230,119 @@ namespace Mall.Model.Extend.MarketingCenter
public
int
backgroundWidth
{
get
;
set
;
}
}
/// <summary>
/// 导航页面组件
/// </summary>
public
class
navPageItem
{
/// <summary>
/// 颜色
/// </summary>
public
string
color
{
get
;
set
;
}
/// <summary>
/// 每页行数
/// </summary>
public
int
rows
{
get
;
set
;
}
/// <summary>
/// 每行个数
/// </summary>
public
int
columns
{
get
;
set
;
}
/// <summary>
/// 左右滑动
/// </summary>
public
bool
scroll
{
get
;
set
;
}
/// <summary>
/// 导航图标
/// </summary>
public
List
<
navPageIconItem
>
navs
{
get
;
set
;
}
/// <summary>
/// 背景图片
/// </summary>
public
bool
showImg
{
get
;
set
;
}
/// <summary>
/// 背景颜色
/// </summary>
public
string
backgroundColor
{
get
;
set
;
}
/// <summary>
/// 背景链接
/// </summary>
public
string
backgroundPicUrl
{
get
;
set
;
}
/// <summary>
/// 图片位置
/// </summary>
public
int
position
{
get
;
set
;
}
/// <summary>
/// 填充方式
/// </summary>
public
int
mode
{
get
;
set
;
}
/// <summary>
/// 背景图宽
/// </summary>
public
int
backgroundHeight
{
get
;
set
;
}
/// <summary>
/// 背景图高
/// </summary>
public
int
backgroundWidth
{
get
;
set
;
}
}
/// <summary>
/// 导航图标页面明细
/// </summary>
public
class
navPageIconItem
{
/// <summary>
/// 导航图标
/// </summary>
public
string
icon
{
get
;
set
;
}
/// <summary>
/// 导航名称
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
/// 组件方式(0-组件,1-模板)
/// </summary>
public
int
ShowType
{
get
;
set
;
}
/// <summary>
/// 组件URL
/// </summary>
public
string
url
{
get
;
set
;
}
/// <summary>
/// 组件名称
/// </summary>
public
string
ComponentName
{
get
;
set
;
}
/// <summary>
/// 模板编号
/// </summary>
public
int
TemplateId
{
get
;
set
;
}
/// <summary>
/// 显示名称
/// </summary>
public
string
TemplateShowName
{
get
;
set
;
}
/// <summary>
/// 模板数据
/// </summary>
public
object
TemplateData
{
get
;
set
;
}
}
/// <summary>
/// 导航图标明细
/// </summary>
...
...
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
a3ff3c25
...
...
@@ -622,7 +622,7 @@ namespace Mall.Module.MarketingCenter
item
.
data
=
storeModel
;
break
;
//导航-页面
case
"nav-page"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
navItem
>(
item
.
data
.
ToString
());
break
;
case
"nav-page"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
nav
Page
Item
>(
item
.
data
.
ToString
());
break
;
}
}
...
...
Mall.Repository/MarketingCenter/RB_Miniprogram_TemplateRepository.cs
View file @
a3ff3c25
...
...
@@ -30,7 +30,7 @@ namespace Mall.Repository.MarketingCenter
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Miniprogram_Template_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
Tenant
Id
>
0
)
if
(
query
.
MallBase
Id
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Miniprogram_Template_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
a3ff3c25
...
...
@@ -88,6 +88,11 @@ namespace Mall.WebApi.Controllers
/// </summary>
private
static
ReserveModule
reserveModule
=
new
ReserveModule
();
/// <summary>
/// 模板处理类
/// </summary>
private
static
MiniprogramTemplateModule
miniprogramTemplateModule
=
new
MiniprogramTemplateModule
();
/// <summary>
/// 解析插件数据为对象
...
...
@@ -131,7 +136,31 @@ namespace Mall.WebApi.Controllers
};
break
;
case
"nav-page"
:
var
navPageData
=
subItem
.
data
as
navItem
;
var
navPageData
=
subItem
.
data
as
navPageItem
;
if
(
navPageData
!=
null
&&
navPageData
.
navs
!=
null
&&
navPageData
.
navs
.
Count
>
0
)
{
var
subList
=
navPageData
.
navs
.
Where
(
qitem
=>
qitem
.
ShowType
==
1
)?.
ToList
()??
new
List
<
navPageIconItem
>
();
if
(
subList
!=
null
&&
subList
.
Count
>
0
)
{
string
tempIds
=
string
.
Join
(
","
,
subList
.
Select
(
qitem
=>
qitem
.
TemplateId
));
List
<
RB_Miniprogram_Template_Extend
>
tempList
=
new
List
<
RB_Miniprogram_Template_Extend
>();
if
(!
string
.
IsNullOrEmpty
(
tempIds
))
{
tempList
=
miniprogramTemplateModule
.
GetMiniprogramTemplateListModule
(
new
RB_Miniprogram_Template_Extend
()
{
QIds
=
tempIds
},
IsAnalyzePlus
:
true
);
}
foreach
(
var
item
in
navPageData
.
navs
)
{
if
(
item
.
ShowType
==
1
)
{
var
tempModel
=
tempList
?.
Where
(
qitem
=>
qitem
.
Id
==
item
.
TemplateId
)?.
FirstOrDefault
();
if
(
tempModel
!=
null
&&
tempModel
.
Id
>
0
)
{
item
.
TemplateData
=
tempModel
.
ComponentDataList
;
}
}
}
}
}
obj
=
new
{
id
=
subItem
.
Id
,
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
a3ff3c25
...
...
@@ -48,6 +48,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
private
readonly
CommerceConsultModule
consultModule
=
new
CommerceConsultModule
();
/// <summary>
/// 新闻处理类对象
/// </summary>
private
readonly
CommerceNewsModule
commerceNewsModule
=
new
CommerceNewsModule
();
/// <summary>
/// 新增修改公司信息
/// </summary>
...
...
@@ -182,7 +187,25 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
public
ApiResult
GetNewsTop
()
{
return
null
;
var
userInfo
=
AppletUserInfo
;
var
query
=
new
RB_Commerce_News_Extend
();
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
userInfo
?.
TenantId
??
0
;
var
list
=
commerceNewsModule
.
GetCommerceNewsTopListModule
(
5
,
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取新闻信息详情
/// </summary>
/// <returns></returns>
public
ApiResult
GetCommerceNews
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
extModel
=
commerceNewsModule
.
GetCommerceNewsModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
}
}
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