Ejemplo n.º 1
0
    //检测用户是否关联用户,未关联用户则直接返回,否则返回用户信息
    //帐户在所有公众号通用
    public M_UserInfo UserBindCheck(M_WxTextMsg reqMod)
    {
        B_User_Token tokenBll = new B_User_Token();
        M_User_Token tokenMod = tokenBll.SelByOpenID(reqMod.FromUserName, "WX");
        M_UserInfo   mu       = new M_UserInfo(true);

        if (tokenMod == null)
        {
        }
        else
        {
            mu = buser.SelReturnModel(tokenMod.uid);
        }
        return(mu);
    }
Ejemplo n.º 2
0
        //新浪社会化登录(跳转链接)
        public void Login_Sina()
        {
            B_User_Token tokenBll = new B_User_Token();
            M_User_Token tokenMod = tokenBll.SelModelByUid(buser.GetLogin().UserID);

            if (tokenMod != null)//已存有用户信息,则直接登录
            {
                SinaHelper sinaBll = new SinaHelper(tokenMod.SinaToken);
                Response.Redirect(sinaBll.GetAuthUrl()); return;
            }
            else
            {
                SinaHelper sinaBll = new SinaHelper("");
                Response.Redirect(sinaBll.GetAuthUrl()); return;
            }
        }