예제 #1
0
        /// <summary>
        /// 在未登录的情况下重置密码
        /// </summary>
        /// <param name="code"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public static bool ResetPassword(string code, string password)
        {
            var u =
                YunClient.Instance.Execute(new ResetPasswordRequest
            {
                Password  = password,
                Code      = code,
                UserFlag  = MallBrowseTrace.GetUserGuid(),
                AppSecret = YunClient.AppSecret
            });

            return(!u.IsError && u.Result);
        }
예제 #2
0
        /// <summary>
        /// 手机注册
        /// </summary>
        /// <returns></returns>
        public static KeyValuePair <bool, string> PhoneRegisterRequest(string phone, string core, string password, string ip, string userFlag)
        {
            var r = YunClient.Instance.Execute(new PhoneRegisterRequest
            {
                Ip        = ip,
                Phone     = phone,
                Password  = password,
                Code      = core,
                CompanyId = GlobeInfo.InitiatedCompanyId,
                ShopId    = GlobeInfo.InitiatedShopId,
                UserFlag  = MallBrowseTrace.GetUserGuid(),
                Secret    = YunClient.AppSecret
            });

            if (r.UserId > 0)
            {
                Token = r.Token;
            }

            return(new KeyValuePair <bool, string>(r.UserId > 0, r.ErrMsg));
        }