Exemplo n.º 1
0
    def doSetPasswdByVerifyCode(cls, rpath):
        # isReturn, params = AccountCheck.normal_check( rpath)
        # if isReturn :
        #     return params
        params = {}
        isReturn, mobile = AccountCheck.check_param_mobile(rpath)
        if isReturn:
            return mobile
        params['mobile'] = mobile

        isReturn, vcode = AccountCheck.check_param_verify_code(rpath)
        if isReturn:
            return vcode
        params['vcode'] = vcode

        isReturn, newpasswd = AccountCheck.check_param_password(rpath,
                                                                'newpasswd',
                                                                isSet=True)
        if isReturn:
            return newpasswd
        params['newpasswd'] = newpasswd

        mo = TyContext.Cls_MsgPack()
        AccountSms.doSetPasswordByVerifyCode(params, mo)
        return mo
Exemplo n.º 2
0
 def doBaiFenSmsBindCallBack(cls, rpath):
     try:
         params = {}
         params['mobile'] = TyContext.RunHttp.getRequestParam('Up_UserTel', '')
         params['sms'] = TyContext.RunHttp.getRequestParam('Up_UserMsg', '')
         AccountSms.doSmsBindCallBack(params)
     except:
         TyContext.ftlog.exception()
     return '0'
Exemplo n.º 3
0
 def doCheckSmsBind(cls, rpath):
     userId = TyContext.RunHttp.getRequestParamInt('userId', 0)
     if userId > 0:
         isReturn, params = AccountCheck.normal_check(rpath)
         if isReturn:
             return params
     else:
         isReturn, params = AccountCheck.onekeylogin_check(rpath)
         if isReturn:
             return params
     mo = TyContext.Cls_MsgPack()
     AccountSms.doCheckSmsBind(params, mo)
     return mo
Exemplo n.º 4
0
 def doManDaoSmsBindCallBack(cls, rpath):
     try:
         args = TyContext.RunHttp.getRequestParam('args', '')
         params = {}
         if args and len(args) > 0:
             datas = args.split(',')
             if len(datas) > 3:
                 params['mobile'] = datas[2]
                 params['sms'] = datas[3]
         AccountSms.doSmsBindCallBack(params)
     except:
         TyContext.ftlog.exception()
     return '0'
Exemplo n.º 5
0
    def doGetSmsVerifyCode(cls, rpath):
        # isReturn, params = AccountCheck.normal_check( rpath)
        # if isReturn :
        #     return params
        params = {}
        isReturn, mobile = AccountCheck.check_param_mobile(rpath)
        if isReturn:
            return mobile
        params['mobile'] = mobile
        params['whatfor'] = TyContext.RunHttp.getRequestParam('whatfor', '')

        mo = TyContext.Cls_MsgPack()
        AccountSms.doGetSmsVerifyCode(params, mo)
        return mo
Exemplo n.º 6
0
 def doManDaoSmsBindCallBack(cls, rpath):
     try:
         args = TyContext.RunHttp.getRequestParam('args', '')
         params = {}
         if args and len(args) > 0:
             datas = args.split(',')
             if len(datas) > 3:
                 params['mobile'] = datas[2]
                 content = urllib.unquote(datas[3])
                 content = content.decode('gbk').encode('utf8')
                 params['sms'] = content
         AccountSms.doSmsBindCallBack(params)
     except:
         TyContext.ftlog.exception()
     return '0'
Exemplo n.º 7
0
    def doBindMobileByVerifyCode(cls, rpath):
        isReturn, params = AccountCheck.normal_check(rpath)
        if isReturn:
            return params

        isReturn, mobile = AccountCheck.check_param_mobile(rpath)
        if isReturn:
            return mobile
        params['mobile'] = mobile

        isReturn, vcode = AccountCheck.check_param_verify_code(rpath)
        if isReturn:
            return vcode
        params['vcode'] = vcode

        mo = TyContext.Cls_MsgPack()
        AccountSms.doBindMobileByVerifyCode(params, mo)
        return mo