Esempio n. 1
0
        /// <summary>
        /// 设置默认微信用户session信息来绕过微信授权检测,仅用于电脑测试。
        /// </summary>
        private void SetWeChatUserSessionForTestingUseOnly()
        {
            WeChatUser wechatUser = new UserService().GetWeChatUserByWeChatUserId(112820);// 112816
            if (wechatUser.IsNotNull())
            {
                CurrentWeChatUser = wechatUser;
                if (wechatUser.UserId.HasValue)
                {

                    User user = new UserService().GetUserById(wechatUser.UserId.Value);
                    if (user.IsNotNull())
                    {
                        CurrentUser = user;

                        wechatUser.IsUserLoggedIn = IsUserLogin;
                        wechatUser.IsUserIdentified = IsIdentified;
                        wechatUser.IsUserVip = IsVip;
                    }
                }
            }
        }