| | |
| | | using ExportMap.cs; |
| | | using LFServer.cs; |
| | | using LFServer.Models; |
| | | using ExportMap.Models; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | |
| | | namespace LFServer.Controllers |
| | | namespace ExportMap.Controllers |
| | | { |
| | | public class ExportController : ApiController |
| | | { |
| | |
| | | string imgPath = ExportUtil.Generate(args, ref err); |
| | | if (string.IsNullOrEmpty(imgPath)) |
| | | { |
| | | return ResponseMsg<string>.fail(err); |
| | | return ResponseMsg<string>.fail(null == err ? "生成失败" : err); |
| | | } |
| | | |
| | | return ResponseMsg<string>.success("成功", imgPath); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogOut.Error(ex.StackTrace); |
| | | LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); |
| | | return ResponseMsg<string>.fail(ex.Message); |
| | | } |
| | | } |