main #126

Merged
charles merged 3 commits from main into prod 2026-06-15 18:04:48 +08:00
3 changed files with 21 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
}
}

View File

@ -23,6 +23,10 @@
<a>基础云</a>
</p>
<p class="nav-hover" :class="{ active: isActiveTokenMarket }" @click="handleModelSquareClick">token市集</p>
<!-- 训推平台 -->
<p class="nav-hover" @click="goTrainPlatform">训推平台</p>
<!-- 智能体商店 -->
<p class="nav-hover" @click="goAgentStore">智能体商店</p>
<p class="nav-hover" @click="goYuanjing">元境</p>
<!-- 供需广场 -->
<p :class="{ active: $route.path.includes('/supply') }">
@ -406,6 +410,16 @@ export default Vue.extend({
})
},
//
goTrainPlatform() {
window.open('http://101.200.145.167:8923/', '_blank')
},
//
goAgentStore() {
window.open('http://101.200.145.167:8923/compute-apps', '_blank')
},
//
async goYuanjing() {
const yuanJingBaseUrl = window.location.origin === 'https://dev.opencomputing.cn'