Преглед изворни кода

fix: 将AI悬浮按钮移到work页面(登录后实际首页)

simonlll пре 1 недеља
родитељ
комит
5c78e427df
1 измењених фајлова са 29 додато и 0 уклоњено
  1. 29 0
      src/pages/work/index.vue

+ 29 - 0
src/pages/work/index.vue

@@ -33,6 +33,11 @@
33
         </uni-grid>
33
         </uni-grid>
34
       </view>
34
       </view>
35
     </div>
35
     </div>
36
+
37
+    <!-- AI助手悬浮按钮 -->
38
+    <view class="ai-float-btn" @click="openAiChat">
39
+      <text class="ai-float-icon">AI</text>
40
+    </view>
36
   </home-container>
41
   </home-container>
37
 </template>
42
 </template>
38
 <script>
43
 <script>
@@ -93,6 +98,9 @@ export default {
93
     updateCurrentDate() {
98
     updateCurrentDate() {
94
       this.currentDate = this.formatDate(new Date());
99
       this.currentDate = this.formatDate(new Date());
95
     },
100
     },
101
+    openAiChat() {
102
+      uni.navigateTo({ url: '/pages/ai-chat/index' });
103
+    },
96
     handleGridClick(url) {
104
     handleGridClick(url) {
97
       console.log('点击了宫格:', url, this.role);
105
       console.log('点击了宫格:', url, this.role);
98
       uni.navigateTo({
106
       uni.navigateTo({
@@ -218,4 +226,25 @@ export default {
218
   font-size: 24rpx;
226
   font-size: 24rpx;
219
   color: #999;
227
   color: #999;
220
 }
228
 }
229
+
230
+.ai-float-btn {
231
+  position: fixed;
232
+  right: 40rpx;
233
+  bottom: 180rpx;
234
+  width: 100rpx;
235
+  height: 100rpx;
236
+  border-radius: 50%;
237
+  background: linear-gradient(135deg, #1890ff, #096dd9);
238
+  display: flex;
239
+  align-items: center;
240
+  justify-content: center;
241
+  box-shadow: 0 8rpx 24rpx rgba(24, 144, 255, 0.45);
242
+  z-index: 99;
243
+}
244
+.ai-float-icon {
245
+  color: #fff;
246
+  font-size: 28rpx;
247
+  font-weight: 700;
248
+  letter-spacing: 2rpx;
249
+}
221
 </style>
250
 </style>