Commit 7b582720 authored by 黄奎's avatar 黄奎

页面修改

parent 4a733c10
......@@ -85,6 +85,11 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
private readonly IntegralModule integralModule = new IntegralModule();
/// <summary>
/// 小程序页面处理类
/// </summary>
private Module.User.MiniProgramPageModule programPageModule = new Module.User.MiniProgramPageModule();
/// <summary>
/// 小程序首页
/// </summary>
......@@ -111,6 +116,8 @@ namespace Mall.WebApi.Controllers.MallBase
var setting = new object();
var share_setting = new object();
var cat_style = new object();
//授权页面
var auth_page = new object();
if (MiniAppId != null && !string.IsNullOrEmpty(MiniAppId))
{
//获取小程序信息
......@@ -141,6 +148,30 @@ namespace Mall.WebApi.Controllers.MallBase
key = qitem.TagLink == "/pages/live/index" ? "live" : "",
}),
};
//授权页面热区
var hotspotCancel = new object();
var hotspotLogin = new object();
if (miniProgram.AuthDataList != null && miniProgram.AuthDataList.Count > 0)
{
var first = miniProgram.AuthDataList[0];
var second = miniProgram.AuthDataList[1];
if (first.open_type == "login")
{
hotspotLogin = first;
hotspotCancel = second;
}
else
{
hotspotLogin = second;
hotspotCancel = first;
}
}
auth_page = new
{
pic_url = miniProgram.AuthUrl,
hotspot = hotspotLogin,
hotspot_cancel = hotspotCancel
};
var selfHomePage = miniprogramPageTemplModule.GetMiniprogramPageTemplModule(new RB_Miniprogram_Page_Templ_Extend()
{
......@@ -1508,7 +1539,7 @@ namespace Mall.WebApi.Controllers.MallBase
var memberModel = userModule.GetAppletUserCenterStatistics(RequestParm.OpenId);
user_info = memberModel;
}
var miniPageList = programPageModule.GetMiniprogram_Page_ListExtModule(new RB_MiniProgram_Page_Extend() { MallBaseId = RequestParm.MallBaseId });
var objResult = new
{
home_pages = homePage,
......@@ -1516,8 +1547,9 @@ namespace Mall.WebApi.Controllers.MallBase
user_info,
setting,
share_setting,
cat_style
cat_style,
auth_page,//授权页面
bar_title = miniPageList?.Select(qitem => new { name = qitem.PageName, value = qitem.PageUrl, new_name = qitem.SelfPageName }),//导航标题
};
return ApiResult.Success(data: objResult);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment