Commit 8b5b52b9 authored by 黄奎's avatar 黄奎

新增页面

parent 39e2d283
......@@ -22,6 +22,11 @@ namespace Mall.Common.API
/// </summary>
public int MallBaseId { get; set; }
/// <summary>
/// 命令
/// </summary>
public string cmd { get; set; }
/// <summary>
/// 用户ID
/// </summary>
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Mall.Common.API;
using Microsoft.AspNetCore.Mvc;
namespace Mall.WebApi.Controllers.Export
{
/// <summary>
/// 文件下载
/// </summary>
public class ExportController : BaseController
{
/// <summary>
/// 文件流下载
/// </summary>
/// <param name="requestData"></param>
/// <returns></returns>
[HttpPost]
public HttpResponseMessage DownLoad()
{
try
{
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
switch (RequestParm.cmd)
{
//商品购买力TOP排行
case "getSalesGoodTop":
var file_SalesGood = new Services.DMCService.BusService().DownLoadBusConfig(requestData);
Stream stream_SalesGood = new MemoryStream(file_SalesGood);
response.Content = new StreamContent(stream);
break;
//用户购买力TOP排行
case "getSalesUserTop":
var file_SalesUser = new Services.DMCService.BusService().DownLoadBusConfig(requestData);
Stream stream_SalesUser = new MemoryStream(file_SalesUser);
response.Content = new StreamContent(stream_SalesUser);
break;
}
response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
{
FileName = "Test.xls"
};
return response;
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, string.Format("DownLoad_requestData: {0}", Common.Plugin.JsonHelper.Serialize(requestData)));
return new HttpResponseMessage(HttpStatusCode.NoContent);
}
}
}
}
\ No newline at end of file
......@@ -151,7 +151,7 @@ namespace Mall.WebApi.Controllers.MallBase
//授权页面热区
var hotspotCancel = new object();
var hotspotLogin = new object();
if (miniProgram.AuthDataList != null && miniProgram.AuthDataList.Count > 0)
if (miniProgram.AuthDataList != null && miniProgram.AuthDataList.Count > 0 && miniProgram.AuthDataList.Count==2)
{
var first = miniProgram.AuthDataList[0];
var second = miniProgram.AuthDataList[1];
......@@ -166,6 +166,31 @@ namespace Mall.WebApi.Controllers.MallBase
hotspotCancel = first;
}
}
else
{
hotspotLogin = new AuthItem()
{
width = 224,
height = 80,
left = 340,
top = 566,
defaultX = 340,
defaultY = 566,
link = "",
open_type = "login"
};
hotspotCancel = new AuthItem()
{
width = 224,
height = 80,
left = 84,
top = 566,
defaultX = 84,
defaultY = 566,
link = "",
open_type = "cancel"
};
}
auth_page = new
{
pic_url = miniProgram.AuthUrl,
......
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