wankeda
2025-03-13 a6a33f6916afbf1fc629baecb772939cda2ee981
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
 
namespace WIDESEA_Core
{
    public class WebResponseContent
    {
        public WebResponseContent()
        {
        }
        public WebResponseContent(bool status)
        {
            Status = status;
        }
        public bool Status { get; set; }
        public bool success { get; set; }
 
        public int Code { get; set; }
 
        public string Message { get; set; }
        public string msg { get; set; }
 
        public object Data { get; set; }
 
        public string DevMessage { get; set; }
 
        public WebResponseContent OK()
        {
            Status = true;
            return this;
        }
 
        public static WebResponseContent Instance
        {
            get { return new WebResponseContent(); }
        }
        public WebResponseContent OK(string message = null, object data = null)
        {
            Status = true;
            Message = message;
            Data = data;
            return this;
        }
 
        public WebResponseContent Error(string message = null)
        {
            Status = false;
            Message = message;
            return this;
        }
    }
 
    public class WCSback
    {
        /// <summary>
        /// 是否成功,成功返回空,异常返回异常信息
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 1成功,0失败
        /// </summary>
        public int code { get; set; }
        public bool success { get; set; }
        public bool data { get; set; }
 
        public string msg { get; set; }
 
        public static WCSback Instance
        {
            get { return new WCSback(); }
        }
        public WCSback OK(string message = null, object data = null)
        {
            success = true;
            code = 200;
            msg = "请求成功";
            data = true;
            return this;
        }
 
        public WCSback Error(string message = null)
        {
            code = 999;
            message = message;
            return this;
        }
    }
}