Пример #1
0
        public ActionResult <Dictionary <string, object> > QuerySystemDate()
        {
            RspMsg rspMsg = new RspMsg(RspType.OK);

            rspMsg.Add("DateTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            rspMsg.Add("Timestamp", TimestampHelper.GetTimestampMilliSecond());
            return(rspMsg.GetKeyValues());
        }
Пример #2
0
        public ActionResult <Dictionary <string, object> > QueryVerifyCode()
        {
            RspMsg rspMsg = new RspMsg(RspType.OK);
            string code   = string.Empty;

            rspMsg.Add("VerifyBase64Str", VerifyCodeHelper.GetVerifyCodeBase64String(out code));
            rspMsg.Add("VerifyToken", DBCenter.JwtImage.SetJwtEncode(new Dictionary <string, object>
            {
                { "CheckCode", code },
                { "exp", TimestampHelper.GetTimestampSecond() + 300 }
            }));
            return(rspMsg.GetKeyValues());
        }