#
Junjie
2025-12-23 32004d6bb7db528c151cca5bd78c4e557171a9ee
src/main/webapp/views/index.html
@@ -146,71 +146,6 @@
<!-- 右下角SVG动画 -->
<div id="ai-assistant-btn" style="position: fixed; bottom: 40px; right: 20px; z-index: 9999; cursor: pointer;">
 <svg
     width="48"
     height="48"
     viewBox="0 0 64 64"
     xmlns="http://www.w3.org/2000/svg">
   <!-- 透明背景:不画任何底色即可 -->
   <!-- 一点柔和发光效果 -->
   <defs>
     <filter id="glow" x="-50%" y="-50%" width="200%" height="200%">
       <feGaussianBlur stdDeviation="2.5" result="blur"/>
       <feMerge>
         <feMergeNode in="blur"/>
         <feMergeNode in="SourceGraphic"/>
       </feMerge>
     </filter>
     <style>
       /* 整个图标旋转动画 */
       .spinner {
         animation: spin 2.8s linear infinite;
         transform-origin: 50% 50%;
       }
       @keyframes spin {
         from { transform: rotate(0deg); }
         to   { transform: rotate(360deg); }
       }
     </style>
   </defs>
   <!-- 旋转组 -->
   <g class="spinner" filter="url(#glow)">
     <!-- 每一条彩色「小弯条」 -->
     <!-- 可以通过调整 rx/ry、width/height 来改粗细和弯度 -->
     <!-- 1. 紫色 -->
     <rect x="30" y="10" width="6" height="14" rx="3" ry="3" fill="#8b5cf6" />
     <!-- 2. 粉色(顺时针旋转60°) -->
     <g transform="rotate(60 32 32)">
       <rect x="30" y="10" width="6" height="14" rx="3" ry="3" fill="#f472b6" />
     </g>
     <!-- 3. 橙色 -->
     <g transform="rotate(120 32 32)">
       <rect x="30" y="10" width="6" height="14" rx="3" ry="3" fill="#fb923c" />
     </g>
     <!-- 4. 金黄 -->
     <g transform="rotate(180 32 32)">
       <rect x="30" y="10" width="6" height="14" rx="3" ry="3" fill="#fbbf24" />
     </g>
     <!-- 5. 青色 -->
     <g transform="rotate(240 32 32)">
       <rect x="30" y="10" width="6" height="14" rx="3" ry="3" fill="#22d3ee" />
     </g>
     <!-- 6. 蓝色 -->
     <g transform="rotate(300 32 32)">
       <rect x="30" y="10" width="6" height="14" rx="3" ry="3" fill="#3b82f6" />
     </g>
   </g>
 </svg>
</div>
<script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script>
@@ -220,6 +155,9 @@
<script>
  console.log('%c 中扬立库平台 %c 1.0.0','background-color:rgb(53,73,94);color: #fff;border-radius:2px 0 0 2px;padding:2px 4px;','background-color:rgb(25,190,107);color: #fff;border-radius:0 2px 2px 0;padding:2px 4px;font: 9pt "Apercu Regular", Georgia, "Times New Roman", Times, serif;');
  $(function () {
    // 注入AI助手图标
    $('#ai-assistant-btn').html(getAiIconHtml(60, 60));
    if ("" === localStorage.getItem('token')) {
      top.location.href = baseUrl + "/login";
    }
@@ -397,6 +335,9 @@
    var url = logout.getAttribute('href');
    logout.setAttribute('href', baseUrl + "/login");
    // AI助手弹窗索引
    var aiLayerIndex = null;
    // AI助手图标悬浮提示
    $('#ai-assistant-btn').on('mouseenter', function(){
        this.index = layer.tips('AI助手', this, {
@@ -406,6 +347,23 @@
    }).on('mouseleave', function(){
        layer.close(this.index);
    }).on('click', function () {
        // 如果已经打开过且未销毁,直接显示
        if (aiLayerIndex !== null && $('#layui-layer' + aiLayerIndex).length > 0) {
            var $layero = $('#layui-layer' + aiLayerIndex);
            var $shade = $('#layui-layer-shade' + aiLayerIndex);
            // 显示并重置状态
            $shade.show().css('opacity', 0.1);
            $layero.show();
            // 重新触发进入动画
            $layero.removeClass('ai-drawer-layer-close');
            $layero.removeClass('ai-drawer-layer');
            void $layero.get(0).offsetWidth; // 触发重绘
            $layero.addClass('ai-drawer-layer');
            return;
        }
        layer.open({
            type: 2,
            title: false, // 隐藏默认标题栏,更简洁
@@ -419,6 +377,8 @@
            skin: 'ai-drawer-layer', // 自定义皮肤
            content: 'ai/diagnosis.html',
            success: function(layero, index){
                aiLayerIndex = index; // 记录索引
                // 背景模糊效果
                var shadeId = layero.attr('id').replace('layui-layer', 'layui-layer-shade');
                var $shade = $('#' + shadeId);
@@ -432,7 +392,9 @@
                    layero.addClass('ai-drawer-layer-close');
                    $shade.css('opacity', 0);
                    setTimeout(function(){
                        layer.close(index);
                        // layer.close(index); // 不销毁,改为隐藏
                        layero.hide();
                        $shade.hide();
                    }, 400);
                });
            }