From 7f46b731a0ffb65fa6890e5bdf417b65a4bbb825 Mon Sep 17 00:00:00 2001
From: Gary <3489015381@qq.com>
Date: Fri, 29 Nov 2024 20:43:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9AI=E8=81=8A=E5=A4=A9=E9=83=A8?=
=?UTF-8?q?=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 25 +--
.../ai_recognize_hot/ai_recognize_hot.vue | 18 +-
.../ai_recognize_recipe.vue | 6 +-
.../homes/choice_book/choice_book.vue | 39 +++-
.../homepages/homes/dictionary/Page/Page.vue | 17 --
.../fried egg.vue => fried_egg/fried_egg.vue} | 0
.../kiwi_fruit.vue} | 0
.../homes/dictionary/page1/page1.vue | 17 --
.../pulled_noodles.vue} | 0
.../knowledge_dictionary.vue | 178 +++++++++++++++++-
pages/homepages/puppy_chat/puppy_chat.vue | 4 +-
.../basic_information/basic_information.vue | 5 +-
.../user/bmi_information/bmi_information.vue | 16 --
.../user/exercise_plans/exercise_plans.vue | 1 -
pages/homepages/user/user/user.vue | 1 -
.../pictures/background.png | Bin 0 -> 362761 bytes
.../knowledge_dictionary/pictures/banana.png | Bin 0 -> 102557 bytes
.../knowledge_dictionary/pictures/carrot.png | Bin 0 -> 54991 bytes
.../pictures/go_back_button.png | Bin 0 -> 1162 bytes
.../knowledge_dictionary/pictures/orange.png | Bin 0 -> 68302 bytes
.../knowledge_dictionary/pictures/peach.png | Bin 0 -> 107019 bytes
.../pictures/pineapple.png | Bin 0 -> 67320 bytes
.../pictures/search_button.png | Bin 0 -> 3867 bytes
.../pictures/strawberry.png | Bin 0 -> 115357 bytes
.../homepages/puppy_chat/css/puppy_chat.scss | 18 +-
25 files changed, 247 insertions(+), 98 deletions(-)
delete mode 100644 pages/homepages/homes/dictionary/Page/Page.vue
rename pages/homepages/homes/dictionary/{fried egg/fried egg.vue => fried_egg/fried_egg.vue} (100%)
rename pages/homepages/homes/dictionary/{kiwi fruit/kiwi fruit.vue => kiwi_fruit/kiwi_fruit.vue} (100%)
delete mode 100644 pages/homepages/homes/dictionary/page1/page1.vue
rename pages/homepages/homes/dictionary/{pulled noodles/pulled noodles.vue => pulled_noodles/pulled_noodles.vue} (100%)
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/background.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/banana.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/carrot.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/go_back_button.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/orange.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/peach.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/pineapple.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/search_button.png
create mode 100644 static/homepages/homes/knowledge_dictionary/pictures/strawberry.png
diff --git a/pages.json b/pages.json
index 4f7ca1f..454922d 100644
--- a/pages.json
+++ b/pages.json
@@ -236,19 +236,6 @@
}
},//阅读专区的两个界面
-
-
-
-
-
-
-
- /* {
- "path": "pages/homepages/temp/temp",
- "style": {
- "navigationStyle": "custom"
- }
- }*/
/*-----------------------------------------------------------------------主界面----------------------------------------------------------*/
{
"path": "pages/homepages/puppy_chat/puppy_chat",
@@ -257,7 +244,7 @@
}
},
/*----------------------------------------------------------------------聊天界面--------------------------------------------------------*/
- /* {
+ /* {
"path": "pages/homepages/community/community",
"style": {
"navigationStyle": "custom"
@@ -271,9 +258,9 @@
}
},
/*---------------------------------------------------------------------个人信息界面以及跳转的几个界面----------------------------------------------------*/
- /*
- {
- "path": "pages/homepages/user/user_information/user_information",
+
+ /* {
+ "path": "pages/homepages/user/basic_information/basic_information",
"style": {
"navigationStyle": "custom"
}
@@ -289,8 +276,8 @@
"style": {
"navigationStyle": "custom"
}
- },
- {
+ },*/
+ /* {
"path": "pages/homepages/user/exercise_plans/exercise_plans",
"style": {
"navigationStyle": "custom"
diff --git a/pages/homepages/homes/ai_recognize_hot/ai_recognize_hot.vue b/pages/homepages/homes/ai_recognize_hot/ai_recognize_hot.vue
index 6691d22..392e995 100644
--- a/pages/homepages/homes/ai_recognize_hot/ai_recognize_hot.vue
+++ b/pages/homepages/homes/ai_recognize_hot/ai_recognize_hot.vue
@@ -38,7 +38,11 @@ export default {
const app = getApp();
const serverAddress = app.globalData.fit_journey_ai_address;
console.log("后端服务器的地址是:"+serverAddress);
-
+ /* uni.showToast({
+ title: 'AI正在识别中呢~',
+ icon: 'loading',
+ duration: 2000
+ });*/
// 调用选择图片的 API
uni.file
uni.chooseImage({
@@ -58,6 +62,18 @@ export default {
filePath: filePath,
name: 'file', // 后端接收的文件参数名称
success: (uploadFileRes) => {
+
+
+
+ uni.showToast({
+ title: 'AI正在识别中呢~',
+ icon: 'loading',
+ duration: 2000
+ });
+
+
+
+
console.log('上传结果:', uploadFileRes);
const response = JSON.parse(uploadFileRes.data); // 解析返回的数据
if (response && response.data) {
diff --git a/pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe.vue b/pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe.vue
index c28b6a2..f90f49b 100644
--- a/pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe.vue
+++ b/pages/homepages/homes/ai_recognize_recipe/ai_recognize_recipe.vue
@@ -41,7 +41,7 @@
can_generate_button_click: true, // 控制生成按钮是否可点击
recipeImage: null, // 用于存储图片的本地路径
- result: '这个',
+ result: '对不起,AI生成有点慢哦,请耐心等待~',
token:uni.getStorageSync("access_token"),
};
},
@@ -55,7 +55,7 @@
uni.showToast({
title: '正在生成...',
icon: 'loading',
- duration: 12000, // Toast 显示时间为 2 秒
+ duration: 15000, // Toast 显示时间为 2 秒
});
//向后端发送请求生成结果
const app= getApp();
@@ -90,7 +90,7 @@
setTimeout(() => {
this.can_generate_button_click= false;
this.is_create_success = 0;
- }, 12000);
+ }, 20000);
/* //在20秒的时候清空result
setTimeout(() => {
this.result="";
diff --git a/pages/homepages/homes/choice_book/choice_book.vue b/pages/homepages/homes/choice_book/choice_book.vue
index 342846f..42310dd 100644
--- a/pages/homepages/homes/choice_book/choice_book.vue
+++ b/pages/homepages/homes/choice_book/choice_book.vue
@@ -7,8 +7,45 @@
diff --git a/pages/homepages/homes/dictionary/Page/Page.vue b/pages/homepages/homes/dictionary/Page/Page.vue
deleted file mode 100644
index 342846f..0000000
--- a/pages/homepages/homes/dictionary/Page/Page.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/pages/homepages/homes/dictionary/fried egg/fried egg.vue b/pages/homepages/homes/dictionary/fried_egg/fried_egg.vue
similarity index 100%
rename from pages/homepages/homes/dictionary/fried egg/fried egg.vue
rename to pages/homepages/homes/dictionary/fried_egg/fried_egg.vue
diff --git a/pages/homepages/homes/dictionary/kiwi fruit/kiwi fruit.vue b/pages/homepages/homes/dictionary/kiwi_fruit/kiwi_fruit.vue
similarity index 100%
rename from pages/homepages/homes/dictionary/kiwi fruit/kiwi fruit.vue
rename to pages/homepages/homes/dictionary/kiwi_fruit/kiwi_fruit.vue
diff --git a/pages/homepages/homes/dictionary/page1/page1.vue b/pages/homepages/homes/dictionary/page1/page1.vue
deleted file mode 100644
index 342846f..0000000
--- a/pages/homepages/homes/dictionary/page1/page1.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/pages/homepages/homes/dictionary/pulled noodles/pulled noodles.vue b/pages/homepages/homes/dictionary/pulled_noodles/pulled_noodles.vue
similarity index 100%
rename from pages/homepages/homes/dictionary/pulled noodles/pulled noodles.vue
rename to pages/homepages/homes/dictionary/pulled_noodles/pulled_noodles.vue
diff --git a/pages/homepages/homes/knowledge_dictionary/knowledge_dictionary.vue b/pages/homepages/homes/knowledge_dictionary/knowledge_dictionary.vue
index 342846f..46cb2f1 100644
--- a/pages/homepages/homes/knowledge_dictionary/knowledge_dictionary.vue
+++ b/pages/homepages/homes/knowledge_dictionary/knowledge_dictionary.vue
@@ -1,5 +1,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -7,11 +20,172 @@
diff --git a/pages/homepages/puppy_chat/puppy_chat.vue b/pages/homepages/puppy_chat/puppy_chat.vue
index 26c5333..80f4208 100644
--- a/pages/homepages/puppy_chat/puppy_chat.vue
+++ b/pages/homepages/puppy_chat/puppy_chat.vue
@@ -85,10 +85,10 @@ export default {
// 获取发送消息的用户的消息数量
const userMessageCount = this.send_messages.filter(msg => msg.sender === 'user').length;
- if (userMessageCount >= 2) {
+ if (userMessageCount >= 1) {
// 如果用户已经发送了2条消息,提示用户不能再发送
uni.showToast({
- title: "AI 可是要交钱的哦,最多发送两条消息",
+ title: "AI 可是要交钱的哦,最多发送1条消息,刷新之后再试试吧~",
icon: "none",
});
} else {
diff --git a/pages/homepages/user/basic_information/basic_information.vue b/pages/homepages/user/basic_information/basic_information.vue
index 4a47e2e..ddd0d86 100644
--- a/pages/homepages/user/basic_information/basic_information.vue
+++ b/pages/homepages/user/basic_information/basic_information.vue
@@ -36,7 +36,7 @@ export default {
diff --git a/pages/homepages/user/exercise_plans/exercise_plans.vue b/pages/homepages/user/exercise_plans/exercise_plans.vue
index 6cd6784..fcc1e30 100644
--- a/pages/homepages/user/exercise_plans/exercise_plans.vue
+++ b/pages/homepages/user/exercise_plans/exercise_plans.vue
@@ -17,7 +17,6 @@
-