Пример #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
Пример #2
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