johnsen 1 день назад
Родитель
Сommit
10bd3dc257
2 измененных файлов с 75 добавлено и 0 удалено
  1. 6 0
      src/router/routes.js
  2. 69 0
      src/views/platform/ai/index.vue

+ 6 - 0
src/router/routes.js

@@ -257,6 +257,12 @@ const frameCustom = [
     redirect: 'pending',
     component: LayoutDefault,
     children: [
+      {
+        path: 'ai/index',
+        name: 'ai',
+        meta: { title: '智能助手' },
+        component: _import('/platform/ai/index')
+      },
       {
         path: 'pending/index',
         name: 'pending',

+ 69 - 0
src/views/platform/ai/index.vue

@@ -0,0 +1,69 @@
+<template>
+  <div class="ai-page">
+    <header class="ai-header">
+      <button class="ai-back" aria-label="back" @click="$router.back()">
+        <svg viewBox="0 0 24 24" width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
+          <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" fill="currentColor"/>
+        </svg>
+      </button>
+      <div class="ai-title">智能助手</div>
+    </header>
+
+    <div class="ai-body">
+      <iframe
+        src="http://192.168.2.63:8080/chat/e1ebf5ced3b66d8b?mode=mobile"
+        style="width: 100%; height: 100%;"
+        frameborder="0"
+        allow="microphone">
+      </iframe>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+}
+</script>
+
+<style lang="scss" scoped>
+.ai-page {
+  height: 100vh;
+  display: flex;
+  flex-direction: column;
+}
+
+.ai-header {
+  height: 44px;
+  display: flex;
+  align-items: center;
+  padding: 0 12px;
+  background: #fff;
+  border-bottom: 1px solid #eaeaea;
+  box-sizing: border-box;
+}
+
+.ai-back {
+  border: none;
+  background: transparent;
+  padding: 6px;
+  margin-right: 8px;
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
+
+.ai-back svg {
+  color: #333;
+}
+
+.ai-title {
+  font-size: 16px;
+  font-weight: 500;
+  color: #333;
+}
+
+.ai-body {
+  flex: 1 1 auto;
+  min-height: 0; /* ensure iframe can shrink properly */
+}
+</style>