diff --git a/api/handler/user_handler.go b/api/handler/user_handler.go index 014dfe76..d03efbc4 100644 --- a/api/handler/user_handler.go +++ b/api/handler/user_handler.go @@ -70,7 +70,6 @@ func (h *UserHandler) Register(c *gin.Context) { var code int err := h.leveldb.Get(key, &code) if err != nil || code != data.Code { - logger.Info(code) resp.ERROR(c, "短信验证码错误") return } diff --git a/database/update-v3.1.0.sql b/database/update-v3.1.0.sql index 9748b34d..7aedcf6d 100644 --- a/database/update-v3.1.0.sql +++ b/database/update-v3.1.0.sql @@ -21,11 +21,11 @@ ALTER TABLE `chatgpt_chat_models` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; INSERT INTO `chatgpt_chat_models` (`id`, `platform`, `name`, `value`, `sort_num`, `enabled`, `created_at`, `updated_at`) VALUES - (1, 'OpenAI', 'Bot GPT-3.5', 'gpt-3.5-turbo', 0, 1, '2023-08-23 12:06:36', '2023-09-02 16:49:36'), - (2, 'Azure', 'Bot Azure-3.5', 'gpt-3.5-turbo', 0, 1, '2023-08-23 12:15:30', '2023-09-02 16:49:46'), - (3, 'ChatGML', 'ChatGML-Pro', 'chatglm_pro', 3, 1, '2023-08-23 13:35:45', '2023-08-29 11:41:29'), - (5, 'ChatGML', 'ChatGLM-Std', 'chatglm_std', 2, 1, '2023-08-24 15:05:38', '2023-08-29 11:41:28'), - (6, 'ChatGML', 'ChatGLM-Lite', 'chatglm_lite', 4, 1, '2023-08-24 15:06:15', '2023-08-29 11:41:29'); + (1, 'OpenAI', 'GPT-3.5', 'gpt-3.5-turbo', 0, 1, '2023-08-23 12:06:36', '2023-09-02 16:49:36'), + (2, 'Azure', 'Azure-3.5', 'gpt-3.5-turbo', 0, 1, '2023-08-23 12:15:30', '2023-09-02 16:49:46'), + (3, 'ChatGLM', 'ChatGML-Pro', 'chatglm_pro', 3, 1, '2023-08-23 13:35:45', '2023-08-29 11:41:29'), + (5, 'ChatGLM', 'ChatGLM-Std', 'chatglm_std', 2, 1, '2023-08-24 15:05:38', '2023-08-29 11:41:28'), + (6, 'ChatGLM', 'ChatGLM-Lite', 'chatglm_lite', 4, 1, '2023-08-24 15:06:15', '2023-08-29 11:41:29'); ALTER TABLE `chatgpt_users` DROP `username`, diff --git a/docker/build.sh b/docker/build.sh index 95ad81b3..add656e3 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -12,15 +12,15 @@ npm run build cd ../docker # remove docker image if exists -docker rmi -f registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version +docker rmi -f registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version # build docker image for chatgpt-plus-go -docker build -t registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version -f dockerfile-api-go ../ +docker build -t registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version -f dockerfile-api-go ../ # build docker image for chatgpt-plus-vue -docker rmi -f registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version -docker build --platform linux/amd64 -t registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version -f dockerfile-vue ../ +docker rmi -f registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-web:$version +docker build --platform linux/amd64 -t registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-web:$version -f dockerfile-vue ../ if [ "$2" = "push" ];then - docker push registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version - docker push registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version + docker push registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version + docker push registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-web:$version fi \ No newline at end of file diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 27684f89..120a5a96 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -2,7 +2,7 @@ version: '3' services: # 后端 API 程序 chatgpt-plus-api: - image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-api:v3.0.7.4 + image: registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:v3.1.0 container_name: chatgpt-plus-api restart: always environment: @@ -13,14 +13,14 @@ services: - "5678:5678" volumes: - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime - - ./conf/config.toml:/var/www/app/config.toml + - ./conf/config.toml:/var/www/app/config.toml - ./logs:/var/www/app/logs - ./static:/var/www/app/static # 前端应用 - chatgpt-plus-vue: - image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:v3.0.7.4 - container_name: chatgpt-plus-vue + chatgpt-plus-web: + image: registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-web:v3.1.0 + container_name: chatgpt-plus-web restart: always ports: - "8080:8080" diff --git a/web/.env.development b/web/.env.development index 430349e1..015e33cc 100644 --- a/web/.env.development +++ b/web/.env.development @@ -4,5 +4,5 @@ VUE_APP_USER=18575670125 VUE_APP_PASS=12345678 VUE_APP_ADMIN_USER=admin VUE_APP_ADMIN_PASS=admin123 -VUE_APP_KEY_PREFIX=ChatPLUS_ +VUE_APP_KEY_PREFIX=ChatPLUS_DEV_ VUE_APP_TITLE="ChatGPT-PLUS V3" diff --git a/web/src/components/CaptchaPlus.vue b/web/src/components/CaptchaPlus.vue index f9084793..8d4cc358 100644 --- a/web/src/components/CaptchaPlus.vue +++ b/web/src/components/CaptchaPlus.vue @@ -1,257 +1,265 @@ - diff --git a/web/src/components/SendMsg.vue b/web/src/components/SendMsg.vue index b3622005..b7b14a6e 100644 --- a/web/src/components/SendMsg.vue +++ b/web/src/components/SendMsg.vue @@ -1,29 +1,26 @@ @@ -75,6 +72,7 @@ const handleConfirm = (dots) => { dots: dots.value, key: captKey.value }).then(() => { + // ElMessage.success('人机验证成功') showCaptcha.value = false sendMsg() }).catch(() => { @@ -120,6 +118,21 @@ const sendMsg = () => { - \ No newline at end of file diff --git a/web/src/components/mobile/BindMobile.vue b/web/src/components/mobile/BindMobile.vue index 5952dfd2..b03f4a9c 100644 --- a/web/src/components/mobile/BindMobile.vue +++ b/web/src/components/mobile/BindMobile.vue @@ -18,7 +18,7 @@ placeholder="请输入短信验证码" > @@ -30,7 +30,7 @@ import {computed, ref} from "vue"; import {httpPost} from "@/utils/http"; import {validateMobile} from "@/utils/validate"; import {showNotify} from "vant"; -import SendMsgMobile from "@/components/mobile/SendMsgMobile.vue"; +import SendMsg from "@/components/SendMsg.vue"; const props = defineProps({ show: Boolean, diff --git a/web/src/components/mobile/SendMsgMobile.vue b/web/src/components/mobile/SendMsgMobile.vue deleted file mode 100644 index 112bb8a7..00000000 --- a/web/src/components/mobile/SendMsgMobile.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - \ No newline at end of file diff --git a/web/src/views/Login.vue b/web/src/views/Login.vue index e696d300..e6323092 100644 --- a/web/src/views/Login.vue +++ b/web/src/views/Login.vue @@ -9,7 +9,7 @@
{{ title }}
- +