diff --git a/api/handler/chat_handler.go b/api/handler/chat_handler.go
index 9785a185..7c28e164 100644
--- a/api/handler/chat_handler.go
+++ b/api/handler/chat_handler.go
@@ -338,16 +338,13 @@ func (h *ChatHandler) sendMessage(ctx context.Context, input ChatInput, c *gin.C
},
})
} else {
- // 如果不是逆向模型,则提取文件内容
- modelValue := input.ChatModel.Value
- if !(strings.Contains(modelValue, "-all") || strings.HasPrefix(modelValue, "gpt-4-gizmo") || strings.HasPrefix(modelValue, "claude")) {
- content, err := utils.ReadFileContent(file.URL, h.App.Config.TikaHost)
- if err != nil {
- logger.Error("error with read file: ", err)
- continue
- } else {
- fileContents = append(fileContents, fmt.Sprintf("%s 文件内容:%s", file.Name, content))
- }
+ // 处理文件,提取文件内容
+ content, err := utils.ReadFileContent(file.URL, h.App.Config.TikaHost)
+ if err != nil {
+ logger.Error("error with read file: ", err)
+ continue
+ } else {
+ fileContents = append(fileContents, fmt.Sprintf("%s 文件内容:%s", file.Name, content))
}
}
}
diff --git a/api/handler/user_handler.go b/api/handler/user_handler.go
index 79fbb684..c70ecb90 100644
--- a/api/handler/user_handler.go
+++ b/api/handler/user_handler.go
@@ -112,8 +112,8 @@ func (h *UserHandler) Register(c *gin.Context) {
return
}
- // 如果注册方式不是账号密码,则需要验证码
- if h.captchaService.GetConfig().Enabled && data.RegWay != "username" {
+ // 人机验证
+ if h.captchaService.GetConfig().Enabled {
var check bool
if data.X != 0 {
check = h.captchaService.SlideCheck(data)
diff --git a/api/service/sms/service.go b/api/service/sms/service.go
index 14d12ca9..82d0a914 100644
--- a/api/service/sms/service.go
+++ b/api/service/sms/service.go
@@ -7,8 +7,8 @@ package sms
// * @Author yangjian102621@163.com
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-const Ali = "ALI"
-const Bao = "BAO"
+const Ali = "aliyun"
+const Bao = "bao"
type Service interface {
SendVerifyCode(mobile string, code int) error
diff --git a/web/src/components/LoginDialog.vue b/web/src/components/LoginDialog.vue
index 9c585d0f..9653df50 100644
--- a/web/src/components/LoginDialog.vue
+++ b/web/src/components/LoginDialog.vue
@@ -398,7 +398,7 @@ const activeName = ref('')
const wxImg = ref('/images/wx.png')
const captchaRef = ref(null)
// eslint-disable-next-line no-undef
-const emits = defineEmits(['hide', 'success'])
+const emits = defineEmits(['hide', 'success', 'changeActive'])
const action = ref('login')
const enableCaptcha = ref(false)
const captchaType = ref('')
@@ -411,6 +411,13 @@ const showPrivacy = ref(false)
const agreementHtml = ref('')
const privacyHtml = ref('')
+watch(
+ () => login.value,
+ (newValue) => {
+ emits('changeActive', newValue)
+ }
+)
+
onMounted(() => {
getSystemInfo()
.then((res) => {
@@ -649,7 +656,7 @@ const submitRegister = () => {
if (!agreeChecked.value) {
return ElMessage.error('请先阅读并同意《用户协议》和《隐私政策》')
}
- if (enableCaptcha.value && activeName.value === 'username') {
+ if (enableCaptcha.value) {
captchaRef.value.loadCaptcha()
action.value = 'register'
} else {
diff --git a/web/src/components/SendMsg.vue b/web/src/components/SendMsg.vue
index 8149c63d..08ece2f2 100644
--- a/web/src/components/SendMsg.vue
+++ b/web/src/components/SendMsg.vue
@@ -4,15 +4,14 @@
{{ btnText }}
-
+
diff --git a/web/src/views/Register.vue b/web/src/views/Register.vue
deleted file mode 100644
index d61f58f6..00000000
--- a/web/src/views/Register.vue
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 用户注册
-
-
- 创建您的账户以开始使用服务
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-