old_flsystem/应用/WebAPi/Pack/Common.cs

33 lines
629 B
C#
Raw Normal View History

2022-09-20 03:10:29 +00:00
using CsharpHttpHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebAPi.Pack
{
public class BaseMsg
{
public int Code { get; set; }
public string Msg { get; set; }
}
public class DataJson
{
public string Data { get; set; }
}
public class Common
{
public static string ErrorJson(string msg, int code = -1)
{
return HttpHelper.ObjectToJson(new DataJson() { Data = HttpHelper.ObjectToJson(new BaseMsg() { Code = code, Msg = msg }) });
}
}
}