From be974ad0a8f3a036eb7578f4c394c122572e7db7 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Fri, 23 Dec 2022 11:12:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/helper.go | 10 ---------- frontend/src/lang/modules/zh.ts | 2 +- frontend/src/views/app-store/detail/install/index.vue | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/backend/app/service/helper.go b/backend/app/service/helper.go index f95e80b43..d498ec1b6 100644 --- a/backend/app/service/helper.go +++ b/backend/app/service/helper.go @@ -12,13 +12,3 @@ func getTxAndContext() (tx *gorm.DB, ctx context.Context) { ctx = context.WithValue(context.Background(), constant.DB, tx) return } - -func getTxByContext(ctx context.Context) (*gorm.DB, context.Context) { - tx, ok := ctx.Value(constant.DB).(*gorm.DB) - if ok { - return tx, ctx - } - tx = global.DB.Begin() - ctx = context.WithValue(context.Background(), constant.DB, tx) - return tx, ctx -} diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 709da95a9..0f94b3569 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -108,7 +108,7 @@ export default { imageName: '支持英文、中文、数字、:.-_,长度1-30', complexityPassword: '请输入 8 位以上、必须含有字母、数字、特殊符号的密码', commonPassword: '请输入 6 位以上长度密码', - linuxName: '支持英文、数字、._长度1-30', + linuxName: '支持英文、数字、._-长度1-30', email: '请输入正确的邮箱', number: '请输入正确的数字', ip: '请输入正确的 IP 地址', diff --git a/frontend/src/views/app-store/detail/install/index.vue b/frontend/src/views/app-store/detail/install/index.vue index 4b84dff82..21613d928 100644 --- a/frontend/src/views/app-store/detail/install/index.vue +++ b/frontend/src/views/app-store/detail/install/index.vue @@ -46,7 +46,7 @@ const installData = ref({ let open = ref(false); let form = ref<{ [key: string]: any }>({}); let rules = ref({ - NAME: [Rules.simpleName], + NAME: [Rules.linuxName], }); let loading = false; const paramForm = ref();