注册用户密码 取消校验

This commit is contained in:
hnsqzyc 2026-06-13 11:01:23 +08:00
parent 4e80203d54
commit 852bef7b8c
2 changed files with 7 additions and 7 deletions

View File

@ -136,10 +136,10 @@ async def registerUser(ns):
if not ns.get('username'):
ns['username'] = ns['mobile']
if ns.get('password'):
# 至少8位包含大小写字母、特殊字符、数字
if len(ns.get('password')) < 8 or not re.search(r'[a-zA-Z]', ns.get('password')) or not re.search(r'[0-9]', ns.get('password')):
return {'status': False, 'msg': '密码至少8位包含大小写字母、特殊字符、数字'}
# if ns.get('password'):
# # 至少8位包含大小写字母、特殊字符、数字
# if len(ns.get('password')) < 8 or not re.search(r'[a-zA-Z]', ns.get('password')) or not re.search(r'[0-9]', ns.get('password')):
# return {'status': False, 'msg': '密码至少8位包含大小写字母、特殊字符、数字'}
if not ns.get('codeid'):
return {'status': False, 'msg': '验证码ID不能为空'}

View File

@ -108,9 +108,9 @@ async def get_resource_expire_time(ns={}):
'data': data,
# 分页
'pagination': {
'total': baidu_resource_data['data'].get('totalCount'),
'page_size': baidu_resource_data['data'].get('pageSize'),
'current_page': baidu_resource_data['data'].get('pageNo')
'total': baidu_resource_data['data'].get('totalCount') if baidu_resource_data.get('data') else 0,
'page_size': baidu_resource_data['data'].get('pageSize') if baidu_resource_data.get('data') else 10,
'current_page': baidu_resource_data['data'].get('pageNo') if baidu_resource_data.get('data') else 1
}
}