33 lines
629 B
C#
33 lines
629 B
C#
|
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 }) });
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|