Bläddra i källkod

首页 header 添加 开放平台按钮

Ryuiso 3 månader sedan
förälder
incheckning
6db50a89ad
3 ändrade filer med 59 tillägg och 8 borttagningar
  1. 11 0
      app/components/DeekSeekHome.tsx
  2. 43 3
      app/components/deepSeekHome.scss
  3. 5 5
      app/components/home.tsx

+ 11 - 0
app/components/DeekSeekHome.tsx

@@ -117,6 +117,17 @@ const DeekSeek: React.FC = () => {
                     {/*}}>*/}
                     {/*    DeepSeek问答*/}
                     {/*</div>*/}
+
+                {/* 右侧区域 - 开放平台按钮 */}
+                <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end' }}>
+                    <button 
+                        className='open-platform-btn'
+                        onClick={() => window.open('https://llm.jkec.info:11431', '_blank')}
+                    >
+                    建科 • 小智开放平台
+                    </button>
+                </div>
+
                 </div>
                 <div className='deekSeek-content'>
                     <div className='deekSeek-content-title'>

+ 43 - 3
app/components/deepSeekHome.scss

@@ -11,14 +11,26 @@
   &-header {
     width: 100%;
     height: 60px;
-    border: 1px solid rgba(24, 126, 255, 1);
+    border: 1px solid rgba(24, 126, 255, 0.5);
     display: flex;
     color: #FFFFFF;
-    justify-content: center;
+    // justify-content: center;
+    justify-content: space-between;
     align-items: center;
     overflow-x: auto;
     overflow-y: hidden;
     box-sizing: border-box;
+    // position: relative;
+    background-color: blur(10px);
+    background: rgba(24, 126, 255, 0.3);
+
+    &::before {
+      content: '';
+      position: absolute;
+      top: 0;
+      left: 0;
+
+    }
   }
 
   &-content {
@@ -69,4 +81,32 @@
       overflow: hidden;
     }
   }
-}
+}
+
+// 开放平台按钮样式
+.open-platform-btn {
+  @media (max-width: 768px) {
+    display: none; // 移动端隐藏
+  }
+  background: #FFFFFF;
+  color: #1890FF;
+  border: 1px solid #1890FF;
+  border-radius: 6px;
+  padding: 8px 16px;
+  font-size: 14px;
+  font-weight: 500;
+  cursor: pointer;
+  transition: all 0.3s ease;
+  white-space: nowrap;
+  
+  &:hover {
+    background: #F0F8FF;
+    border-color: #40A9FF;
+  }
+  
+  &:active {
+    background: #E6F7FF;
+    border-color: #1890FF;
+  }
+}
+

+ 5 - 5
app/components/home.tsx

@@ -382,11 +382,11 @@ export function Home() {
     //  1) 临时禁用:NEXT_PUBLIC_DISABLE_UNIN_LOGIN=1 yarn dev
     //  2) 或在 .env.local 中加入 NEXT_PUBLIC_DISABLE_UNIN_LOGIN=1
     // ==============
-    // const DISABLE_UNIN_LOGIN = typeof process !== 'undefined' && process.env.NEXT_PUBLIC_DISABLE_UNIN_LOGIN === '1';
-    // if (DISABLE_UNIN_LOGIN) {
-    //   console.log('[Home] 统一登录验证已禁用,跳过 toUninLogin 验证');
-    //   return;
-    // }
+    const DISABLE_UNIN_LOGIN = typeof process !== 'undefined' && process.env.NEXT_PUBLIC_DISABLE_UNIN_LOGIN === '1';
+    if (DISABLE_UNIN_LOGIN) {
+      console.log('[Home] 统一登录验证已禁用,跳过 toUninLogin 验证');
+      return;
+    }
 
     // const loginRes = { "nickName": "建科咨询虚拟账号", "userId": "2222331845498970571", "token": "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAyMDE4Mzg0LTFmNjctNDhkYi05NjNiLTJkOGNhMDMxNTkzMiJ9.zTkTv8gDgJN7tfyxJko_zG1VsESlZACeYkpdMbITqnIpIfvHkZo8l8_Kcv6zo77GnuDyzdpOEt-GzPufD2Ye8A" };
     // if (loginRes) {