示例#1
0
        /// <summary>
        /// 获取二维码登录信息
        /// </summary>
        /// <returns></returns>
        public async Task <ReturnModel <QRAuthInfo> > GetQRAuthInfo()
        {
            try
            {
                var result = await loginAPI.QRLoginAuthCode(guid).Request();

                if (result.status)
                {
                    var data = await result.GetData <QRAuthInfo>();

                    if (data.success)
                    {
                        return(new ReturnModel <QRAuthInfo>()
                        {
                            success = true,
                            data = data.data
                        });
                    }
                    else
                    {
                        return(new ReturnModel <QRAuthInfo>()
                        {
                            success = false,
                            message = data.message
                        });
                    }
                }
                else
                {
                    return(new ReturnModel <QRAuthInfo>()
                    {
                        success = false,
                        message = result.message
                    });
                }
            }
            catch (Exception ex)
            {
                return(HandelError <QRAuthInfo>(ex));
            }
        }