Merge pull request 'main' (#106) from main into prod

Reviewed-on: #106
This commit is contained in:
charles 2026-05-12 18:00:14 +08:00
commit a343bb4bec
5 changed files with 26 additions and 6 deletions

View File

@ -26,8 +26,9 @@ async def registerUser(ns):
ns['username'] = ns['mobile']
if ns.get('password'):
if len(ns.get('password')) < 6:
return {'status': False, 'msg': '密码必须6位数以上'}
# 至少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')) or not re.search(r'[!@#$%^&*()_+{}|:"<>?]', ns.get('password')):
return {'status': False, 'msg': '密码至少8位包含大小写字母、特殊字符、数字'}
if not ns.get('codeid'):
return {'status': False, 'msg': '验证码ID不能为空'}

View File

@ -140,7 +140,7 @@ async def logintype(ns):
async with db.sqlorContext('kboss') as sor:
domain_name = ns.get('domain_name')
if domain_name in ['www.opencomputing.cn', 'dev.opencomputing.cn', 'localhost:9527'] and ns.get('username') not in ['开元云(北京)科技有限公司', 'admin', 'kyy_root', 'kyy_kaiyuan', 'kyacloud', 'kyy_运营', 'kyy_销售', 'kyy_财务']:
if domain_name in ['www.opencomputing.cn', 'dev.opencomputing.cn', 'localhost:9527'] and ns.get('username') not in ['开元云(北京)科技有限公司', 'admin', 'kyy_root', 'kyy_kaiyuan', 'kyacloud', 'kyy_运营', 'kyy_销售', 'kyy_财务', '测试用户', 'kycloud']:
# 登录失败次数限制
login_allowed = await check_login_allowed(ns.get('username'))

View File

@ -22,6 +22,8 @@
<p @mouseleave="sildeOut" @mouseenter="sildeIn(product_service)">
<a>产品与服务</a>
</p>
<p class="nav-hover" @click="$router.push('/product')">模型广场</p>
<p class="nav-hover" @click="goYuanjing">元境</p>
<!-- 供需广场 -->
<p :class="{ active: $route.path.includes('/supply') }">
<a @click="$router.push('/ncmatchHome/supplyAndDemandSquare')">供需广场</a>
@ -374,7 +376,10 @@ export default Vue.extend({
}
},
methods: {
// https://ai.opencomputing.cn/#/index
goYuanjing() {
window.open('https://ai.opencomputing.cn/#/index')
},
// AI
handleAIClick() {
this.aiDialogVisible = true
@ -1042,6 +1047,15 @@ export default Vue.extend({
padding-right: 40px;
position: relative;
&.nav-hover {
cursor: pointer;
transition: all 0.3s;
&:hover {
color: #1E6FFF;
}
}
a {
text-decoration: none;
font-size: 18px !important;

View File

@ -5,7 +5,7 @@
<div class="category-nav">
<div v-for="category in panelData"
:key="category.firTitle"
class="nav-item"
class="nav-item"
:class="{ active: activeCategory === category.firTitle }"
@click="switchCategory(category)">
{{ category.firTitle }}

View File

@ -162,7 +162,12 @@ export default {
{ required: true, message: "请输入账户名", trigger: "blur" }
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" }
{ required: true, message: "请输入密码", trigger: "blur" },
{
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^A-Za-z\d]).{8,}$/,
message: "密码至少8位且需包含大小写字母、数字和特殊字符",
trigger: "blur"
}
]
},
// password/text