Kaynağa Gözat

新增积分系统

XieXing 3 ay önce
ebeveyn
işleme
15bbaa7581

+ 3 - 3
shudao-go-backend/controllers/chat.go

@@ -1898,7 +1898,7 @@ func (c *ChatController) SendDeepSeekMessage() {
 		
 		greeting: 问候、寒暄等。如"你好"、"在吗"、"谢谢"。
 		
-		faq: 主要关于围绕"蜀安AI助手"智能问答助手展开的相关问题,比如身份、作用、使用技巧等。"你是谁?"、"你能做什么"。
+		faq: 主要关于围绕"蜀安AI助手"AI问答助手展开的相关问题,比如身份、作用、使用技巧等。"你是谁?"、"你能做什么"。
 		
 		query_knowledge_base: 除了greeting、faq外,所有用户问题一律归为此类别处理。
 		
@@ -2106,7 +2106,7 @@ func (c *ChatController) SendDeepSeekMessage() {
 																// 构建新的JSON格式提示词
 																finalPrompt := `# Role
 
-你是名为"蜀安AI助手"的专业智能问答助手,专注于提供路桥隧轨等基建建筑施工技术相关的专业咨询服务。
+你是名为"蜀安AI助手"的专业AI问答助手,专注于提供路桥隧轨等基建建筑施工技术相关的专业咨询服务。
 
 # Overall Goal
 
@@ -3292,7 +3292,7 @@ func (c *ChatController) IntentRecognition() {
 
 	greeting: 问候、寒暄等。如"你好"、"在吗"、"谢谢"。
 
-	faq: 主要关于围绕"蜀安AI助手"智能问答助手展开的相关问题,比如身份、作用、使用技巧等。"你是谁?"、"你能做什么"。
+	faq: 主要关于围绕"蜀安AI助手"AI问答助手展开的相关问题,比如身份、作用、使用技巧等。"你是谁?"、"你能做什么"。
 
 	query_knowledge_base: 除了greeting、faq外,所有用户问题一律归为此类别处理。
 

+ 3 - 3
shudao-go-backend/controllers/liushi.go

@@ -113,7 +113,7 @@ func (c *LiushiController) StreamChat() {
 
 greeting: 问候、寒暄等。如"你好"、"在吗"、"谢谢"。
 
-faq: 主要关于围绕"蜀安AI助手"智能问答助手展开的相关问题,比如身份、作用、使用技巧等。"你是谁?"、"你能做什么"。
+faq: 主要关于围绕"蜀安AI助手"AI问答助手展开的相关问题,比如身份、作用、使用技巧等。"你是谁?"、"你能做什么"。
 
 query_knowledge_base: 除了greeting、faq外,所有用户问题一律归为此类别处理。
 
@@ -350,7 +350,7 @@ func (c *LiushiController) streamRAGResponse(userMessage string, results []inter
 	// 构建最终回答的提示词(内容与原先 natural_language_answer 一致,但仅输出该段纯文本)
 	finalPrompt := ` # Role
 
-你是名为"蜀安AI助手"的专业智能问答助手,专注于提供路桥隧轨等基建建筑施工技术相关的专业咨询服务。
+你是名为"蜀安AI助手"的专业AI问答助手,专注于提供路桥隧轨等基建建筑施工技术相关的专业咨询服务。
 
 # Overall Goal
 
@@ -1059,7 +1059,7 @@ func (c *LiushiController) streamRAGResponseWithDB(userMessage string, results [
 	}
 	finalPrompt := `# Role
 
-你是名为"蜀安AI助手"的专业智能问答助手,专注于提供路桥隧轨等基建建筑施工技术相关的专业咨询服务。
+你是名为"蜀安AI助手"的专业AI问答助手,专注于提供路桥隧轨等基建建筑施工技术相关的专业咨询服务。
 
 # Overall Goal
 

+ 1 - 0
shudao-go-backend/controllers/total.go

@@ -6,6 +6,7 @@ import (
 	"io"
 	"math/rand"
 	"net/http"
+	"net/url"
 	"path/filepath"
 	"shudao-chat-go/models"
 	"shudao-chat-go/utils"

+ 1 - 1
shudao-go-backend/scripts/points_migration.sql

@@ -3,7 +3,7 @@
 -- 执行方式: mysql -u username -p database_name < points_migration.sql
 
 -- 1. 为user_data表添加积分字段
-ALTER TABLE user_data ADD COLUMN points INT DEFAULT 20 COMMENT '用户积分余额';
+ALTER TABLE user_data ADD COLUMN points INT DEFAULT 0 COMMENT '用户积分余额';
 
 -- 2. 创建积分消费记录表
 CREATE TABLE IF NOT EXISTS points_consumption_log (

BIN
shudao-vue-frontend/src/assets/new_index/chat-icon.png


BIN
shudao-vue-frontend/src/assets/new_index/chat-img-1.png


BIN
shudao-vue-frontend/src/assets/new_index/chat-img-2.png


+ 1 - 1
shudao-vue-frontend/src/request/ai.json

@@ -506,7 +506,7 @@
                 "url": "https://baike.baidu.com/item/%E6%89%BF%E8%BD%BD%E8%83%BD%E5%8A%9B/4970204"
             },
             {
-                "content": "* 你好,{{loginInfo.showname|truncate(12)}} * 注销 * 注册;) * 登录;) * 注册;) * 登录;) 国务院 省政府 市政府 网站支持IPV6 * 首页 * 政务公开  政府信息公开 重点领域信息公开 工作报告 人事信息 政策文件 财政资金 重大建设项目 统计信息  专题专栏 * 解读回应 * 办事服务  网上办事大厅 便民服务 闽政通APP 三明市网上公共服务平台 行政权力运行 政务地图 * 互动交流  咨询投诉 智能问答互动交流知识库 在线访谈 网上调查 意见征集 * 走进沙县 热门搜索: 历史搜索: 长者模式;) 退出长者模式;) 无障碍浏览;) 当前位置:首页 > 互动交流 > 互动交流知识库 > 水利局 ## 什么是水资源承载能力?日期:2024-08-14 来源:沙县区水利局 ***|* ***|* ***|* **  ** *|* ** * **微信 * **微博 * **QQ空间 水资源承载能力是指在一定流域或区域内,其自身的水资源能够持续支撑的经济社会发展规模并维系良好生态系统的能力。经济社会发展在水资源承载能力以内,就能实现可持续发展;超越了,发展就会失去物质基础,造成生态系统破坏,生存条件恶化。相关链接: 扫一扫在手机上查看当前页面 **关闭; \"关闭\") * 省级网站 + 北京市 + 天津市 + 河北省 + 山西省 + 内蒙古自治区 + 辽宁省 + 吉林省 + 黑龙江 + 上海市 + 江苏省 + 浙江省 + 福建省 + 安徽省 + 江西省 + 山东省 + 河南省 + 水利局 + 水利局",
+                "content": "* 你好,{{loginInfo.showname|truncate(12)}} * 注销 * 注册;) * 登录;) * 注册;) * 登录;) 国务院 省政府 市政府 网站支持IPV6 * 首页 * 政务公开  政府信息公开 重点领域信息公开 工作报告 人事信息 政策文件 财政资金 重大建设项目 统计信息  专题专栏 * 解读回应 * 办事服务  网上办事大厅 便民服务 闽政通APP 三明市网上公共服务平台 行政权力运行 政务地图 * 互动交流  咨询投诉 AI问答互动交流知识库 在线访谈 网上调查 意见征集 * 走进沙县 热门搜索: 历史搜索: 长者模式;) 退出长者模式;) 无障碍浏览;) 当前位置:首页 > 互动交流 > 互动交流知识库 > 水利局 ## 什么是水资源承载能力?日期:2024-08-14 来源:沙县区水利局 ***|* ***|* ***|* **  ** *|* ** * **微信 * **微博 * **QQ空间 水资源承载能力是指在一定流域或区域内,其自身的水资源能够持续支撑的经济社会发展规模并维系良好生态系统的能力。经济社会发展在水资源承载能力以内,就能实现可持续发展;超越了,发展就会失去物质基础,造成生态系统破坏,生存条件恶化。相关链接: 扫一扫在手机上查看当前页面 **关闭; \"关闭\") * 省级网站 + 北京市 + 天津市 + 河北省 + 山西省 + 内蒙古自治区 + 辽宁省 + 吉林省 + 黑龙江 + 上海市 + 江苏省 + 浙江省 + 福建省 + 安徽省 + 江西省 + 山东省 + 河南省 + 水利局 + 水利局",
                 "raw_content": null,
                 "score": 0.6612456,
                 "title": "什么是水资源承载能力? _ 水利局 - 沙县区",

+ 71 - 36
shudao-vue-frontend/src/views/Index.vue

@@ -86,7 +86,7 @@
           </div>
         </div>
 
-        <!-- 第二列:隐患提示和智能问答 -->
+        <!-- 第二列:隐患提示和AI问答 -->
         <div class="card-column">
           <div class="hazard-card" @click="goToHazardDetection">
             <div class="card-title">隐患提示</div>
@@ -94,14 +94,27 @@
           </div>
           <div class="ai-chat-card" @click="goToAIChat">
             <div class="ai-chat-icon">
-              <img src="@/assets/Chat/29.png" alt="智能问答" class="chat-icon-img">
+              <img src="@/assets/new_index/chat-icon.png" alt="AI问答" class="chat-icon-img">
             </div>
             <div class="ai-chat-images">
-              <img src="@/assets/Chat/30.png" alt="对话1" class="chat-img chat-img-back">
-              <img src="@/assets/Chat/31.png" alt="对话2" class="chat-img chat-img-front">
+              <img src="@/assets/new_index/chat-img-1.png" alt="对话1" class="chat-img chat-img-back">
+              <img src="@/assets/new_index/chat-img-2.png" alt="对话2" class="chat-img chat-img-front">
             </div>
-            <div class="card-title">智能问答</div>
+            <div class="card-title">AI问答</div>
             <div class="card-description">AI对话助手,智能解答您的问题</div>
+            
+            <!-- 波浪效果 -->
+            <div class="wave-container">
+              <svg class="wave" viewBox="0 0 1200 120" preserveAspectRatio="none">
+                <path d="M0,0 C150,60 350,0 600,30 C850,60 1050,0 1200,30 L1200,120 L0,120 Z" class="wave-path wave1"></path>
+              </svg>
+              <svg class="wave" viewBox="0 0 1200 120" preserveAspectRatio="none">
+                <path d="M0,0 C150,40 350,20 600,50 C850,80 1050,20 1200,50 L1200,120 L0,120 Z" class="wave-path wave2"></path>
+              </svg>
+              <svg class="wave" viewBox="0 0 1200 120" preserveAspectRatio="none">
+                <path d="M0,20 C150,60 350,40 600,70 C850,100 1050,40 1200,70 L1200,120 L0,120 Z" class="wave-path wave3"></path>
+              </svg>
+            </div>
           </div>
         </div>
 
@@ -162,6 +175,7 @@
         <span>川公网安备: 51010502011234号</span>
         <span>推荐电脑分辨率:1920*1080,1920*1200,3840*2160</span>
         <span>推荐浏览器:Google,Edge,火狐浏览器</span>
+        <span class="feedback-link" @click="openFeedbackModal">意见反馈</span>
       </div>
     </div>
 
@@ -171,11 +185,6 @@
       @close="closeFeedbackModal"
       @submit="handleFeedbackSubmit"
     />
-    
-    <!-- 意见反馈悬浮按钮 -->
-    <div class="feedback-float-btn" @click="openFeedbackModal">
-      <span>意见反馈</span>
-    </div>
   </div>
 </template>
 
@@ -997,9 +1006,9 @@ onUnmounted(() => {
   }
 }
 
-/* 智能问答卡片 */
+/* AI问答卡片 */
 .ai-chat-card {
-  background: rgb(235, 243, 255);
+  background: #428EFE;
   border-radius: 16px;
   width: 406px;
   height: 217px;
@@ -1062,8 +1071,9 @@ onUnmounted(() => {
     left: 40px;
     top: 119.6px;
     font-size: 22px;
-    color: #000000;
+    color: #FFFFFF;
     font-weight: 600;
+    z-index: 3;
   }
   
   .card-description {
@@ -1071,8 +1081,46 @@ onUnmounted(() => {
     left: 40px;
     top: 159.8px;
     font-size: 18px;
-    color: #4B5563;
+    color: rgba(255, 255, 255, 0.85);
     line-height: 1.4;
+    z-index: 3;
+  }
+  
+  /* 波浪效果容器 */
+  .wave-container {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    height: 80px;
+    overflow: hidden;
+    z-index: 2;
+    
+    .wave {
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+      
+      &:nth-child(1) {
+        .wave-path {
+          fill: rgba(255, 255, 255, 0.1);
+        }
+      }
+      
+      &:nth-child(2) {
+        .wave-path {
+          fill: rgba(255, 255, 255, 0.15);
+        }
+      }
+      
+      &:nth-child(3) {
+        .wave-path {
+          fill: rgba(255, 255, 255, 0.2);
+        }
+      }
+    }
   }
 }
 
@@ -1178,28 +1226,15 @@ onUnmounted(() => {
     font-size: 14px;
     color: #6B7280;
     line-height: 1;
-  }
-}
-
-/* 意见反馈悬浮按钮 */
-.feedback-float-btn {
-  position: fixed;
-  right: 30px;
-  bottom: 80px;
-  background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%);
-  color: #FFFFFF;
-  padding: 10px 20px;
-  border-radius: 20px;
-  cursor: pointer;
-  font-size: 14px;
-  font-weight: 500;
-  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
-  transition: all 0.3s ease;
-  z-index: 100;
-  
-  &:hover {
-    transform: translateY(-2px);
-    box-shadow: 0 6px 16px rgba(147, 51, 234, 0.5);
+    
+    .feedback-link {
+      cursor: pointer;
+      transition: color 0.2s ease;
+      
+      &:hover {
+        color: #2563EB;
+      }
+    }
   }
 }
 </style>

+ 38 - 60
shudao-vue-frontend/src/views/PolicyDocument.vue

@@ -136,34 +136,21 @@
                                 formatTime(file.publish_time)
                             }}</span>
                         </div>
-                        <div class="doc-tags">
-                            <span
-                                v-for="(tag, tagIndex) in getTags(
-                                    file.file_tag
-                                )"
-                                :key="tagIndex"
-                                class="tag tag-blue"
-                            >
-                                <img
-                                    src="@/assets/Policy/10.png"
-                                    alt="标签图标"
-                                    class="tag-icon"
-                                />
-                                {{ tag }}
-                            </span>
-                        </div>
-                        <p class="doc-description">
-                            {{ file.policy_content }}
-                        </p>
                         <div class="doc-footer">
                             <div class="doc-info">
-                                <span class="info-item">
+                                <span
+                                    v-for="(tag, tagIndex) in getTags(
+                                        file.file_tag
+                                    )"
+                                    :key="tagIndex"
+                                    class="tag tag-blue"
+                                >
                                     <img
-                                        src="@/assets/Policy/5.png"
-                                        alt="部门"
-                                        class="info-icon"
+                                        src="@/assets/Policy/10.png"
+                                        alt="标签图标"
+                                        class="tag-icon"
                                     />
-                                    {{ file.policy_department }}
+                                    {{ tag }}
                                 </span>
                                 <span class="info-item">
                                     <img
@@ -709,6 +696,8 @@ onUnmounted(() => {
     }
 
     .header-right {
+        margin-right: -90px;
+        
         .points-display {
             display: flex;
             align-items: center;
@@ -870,7 +859,7 @@ onUnmounted(() => {
 .document-list {
     display: flex;
     flex-direction: column;
-    gap: 10px;
+    gap: 16px;
     min-height: 400px;
     max-height: calc(100vh - 300px);
     overflow-y: auto;
@@ -882,7 +871,7 @@ onUnmounted(() => {
 .document-item {
     background: white;
     width: 100%;
-    min-height: 166px;
+    min-height: 100px;
     border-radius: 12px;
     padding: 20px 24px;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
@@ -937,47 +926,36 @@ onUnmounted(() => {
             }
         }
 
-        .doc-tags {
-            display: flex;
-            gap: 12px; /* 增加标签之间的间距 */
-            margin-bottom: 8px;
-            flex-wrap: wrap; /* 允许标签换行 */
-
-            .tag {
-                padding: 4px 12px;
-                font-size: 12px;
-                border-radius: 12px;
-                font-weight: 500;
-                display: flex;
-                align-items: center;
-                gap: 4px;
-                background: #eff6ff;
-                color: #2563eb;
-                white-space: nowrap; /* 防止标签文字换行 */
-
-                .tag-icon {
-                    width: 12px;
-                    height: 12px;
-                    flex-shrink: 0;
-                }
-            }
-        }
-
-        .doc-description {
-            font-size: 14px;
-            color: #6b7280;
-            line-height: 1.6;
-            margin: 0 0 5px 0;
-        }
-
         .doc-footer {
             display: flex;
             justify-content: space-between;
             align-items: center;
+            margin-top: 12px;
 
             .doc-info {
                 display: flex;
-                gap: 24px;
+                gap: 16px;
+                align-items: center;
+                flex-wrap: wrap;
+
+                .tag {
+                    padding: 4px 12px;
+                    font-size: 12px;
+                    border-radius: 12px;
+                    font-weight: 500;
+                    display: flex;
+                    align-items: center;
+                    gap: 4px;
+                    background: #eff6ff;
+                    color: #2563eb;
+                    white-space: nowrap;
+
+                    .tag-icon {
+                        width: 12px;
+                        height: 12px;
+                        flex-shrink: 0;
+                    }
+                }
 
                 .info-item {
                     display: flex;

+ 3 - 3
shudao-vue-frontend/src/views/mobile/m-Index.vue

@@ -88,14 +88,14 @@
 
           <div class="mobile-service-item mobile-ai-chat-item" @click="goToAIChat">
             <div class="mobile-ai-chat-icon">
-              <img src="@/assets/Chat/29.png" alt="智能问答" class="mobile-chat-icon-img">
+              <img src="@/assets/Chat/29.png" alt="AI问答" class="mobile-chat-icon-img">
             </div>
             <div class="mobile-ai-chat-images">
               <img src="@/assets/Chat/30.png" alt="对话1" class="mobile-chat-img mobile-chat-img-back">
               <img src="@/assets/Chat/31.png" alt="对话2" class="mobile-chat-img mobile-chat-img-front">
             </div>
             <div class="mobile-service-info mobile-service-info-large">
-              <div class="mobile-service-title mobile-service-title-large">智能问答</div>
+              <div class="mobile-service-title mobile-service-title-large">AI问答</div>
               <div class="mobile-service-desc mobile-service-desc-large">AI对话助手,智能解答您的问题</div>
             </div>
           </div>
@@ -877,7 +877,7 @@ onBeforeUnmount(() => {
     }
   }
   
-  // 智能问答卡片(第2个)- 黑色文字,使用自定义背景
+  // AI问答卡片(第2个)- 黑色文字,使用自定义背景
   .mobile-ai-chat-item {
     background: rgb(235, 243, 255) !important;
     background-image: none !important;