Administrator
3 days ago 6011c6cb62d37bd8addd5ddc939f7bd244350297
style(ai): 优化产品问题AI生成页面的加载提示样式

- 将简单的加载框替换为美观的自定义加载弹窗
- 添加了图标、阴影和圆角等视觉效果
- 增大了字体大小并居中显示加载文本
- 调整了图标的大小和位置
- 统一了加载弹窗的关闭注释描述
1 files modified
33 ■■■■ changed files
src/main/resources/templates/febs/views/modules/ai/productQuestion/aiAdd.html 33 ●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/ai/productQuestion/aiAdd.html
@@ -121,11 +121,30 @@
        form.on('submit(productQuestion-add-form-submit)', function (data) {
            data.field.productCategoryId = category.getValue('valueStr');
            // 显示加载框
            var loadIndex = layer.load(1, {
                shade: [0.3, '#000'],
                content: '正在生成题目,请稍候...',
                shadeClose: false
            // 显示美观的加载弹窗
            var loadIndex = layer.msg('正在生成题目,请稍候...', {
                icon: 16,
                shade: [0.4, '#000'],
                time: 0,
                shadeClose: false,
                area: ['300px', '120px'],
                success: function(layero) {
                    // 自定义样式,增大字体
                    layero.css({
                        'font-size': '18px',
                        'text-align': 'center',
                        'line-height': '120px',
                        'border-radius': '8px',
                        'background-color': 'rgba(255, 255, 255, 0.95)',
                        'box-shadow': '0 4px 20px rgba(0, 0, 0, 0.2)'
                    });
                    // 调整图标位置
                    var icon = layero.find('.layui-layer-ico');
                    icon.css({
                        'margin-right': '15px',
                        'font-size': '24px'
                    });
                }
            });
            $.ajax({
                'url':ctx + 'admin/productQuestion/aiAdd',
@@ -135,7 +154,7 @@
                'traditional': true,//ajax传递数组必须添加属性
                'data':JSON.stringify(data.field),
                'success':function (data) {
                    // 关闭加载框
                    // 关闭加载弹窗
                    layer.close(loadIndex);
                    if(data.code==200){
                        layer.closeAll();
@@ -146,7 +165,7 @@
                    }
                },
                'error':function () {
                    // 关闭加载框
                    // 关闭加载弹窗
                    layer.close(loadIndex);
                    febs.alert.warn('服务器繁忙');
                }