Ejemplo n.º 1
0
        /// <summary>
        /// handler oauth2 snsapi_userinfo
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Eyousoft_yhq.Model.MWeiXinYongHuInfo handler_oauth2_snsapi_userinfo(weixin_oauth2_snsapi_userinfo info)
        {
            var info1 = new Eyousoft_yhq.Model.MWeiXinYongHuInfo();

            info1.city           = info.city;
            info1.country        = info.country;
            info1.createtime     = DateTime.Now;
            info1.headimgurl     = info.headimgurl;
            info1.language       = "zh_CN";
            info1.latesttime     = DateTime.Now;
            info1.nickname       = info.nickname;
            info1.openid         = info.openid;
            info1.province       = info.province;
            info1.sex            = info.sex;
            info1.subscribe      = "0";
            info1.subscribe_time = "";
            info1.unionid        = string.Empty;
            info1.YongHuId       = Guid.NewGuid().ToString();
            info1.LeiXing        = 1;

            new Eyousoft_yhq.BLL.BWeiXin().YongHu_C(info1);

            return(info1);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// handler oauth2 snsapi_userinfo
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Eyousoft_yhq.Model.MWeiXinYongHuInfo handler_oauth2_snsapi_userinfo(weixin_oauth2_snsapi_userinfo info)
        {
            var info1 = new Eyousoft_yhq.Model.MWeiXinYongHuInfo();

            info1.city = info.city;
            info1.country = info.country;
            info1.createtime = DateTime.Now;
            info1.headimgurl = info.headimgurl;
            info1.language = "zh_CN";
            info1.latesttime = DateTime.Now;
            info1.nickname = info.nickname;
            info1.openid = info.openid;
            info1.province = info.province;
            info1.sex = info.sex;
            info1.subscribe = "0";
            info1.subscribe_time = "";
            info1.unionid = string.Empty;
            info1.YongHuId = Guid.NewGuid().ToString();
            info1.LeiXing = 1;

            new Eyousoft_yhq.BLL.BWeiXin().YongHu_C(info1);

            return info1;
        }